Merge branch 'Develope' into Effect
This commit is contained in:
@@ -267,6 +267,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\TrailObject.h" />
|
||||
<ClInclude Include="..\Public\Troll.h" />
|
||||
<ClInclude Include="..\Public\Troll_Weapon.h" />
|
||||
<ClInclude Include="..\public\UI_Manager.h" />
|
||||
<ClInclude Include="..\Public\Wand.h" />
|
||||
<ClInclude Include="Client.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
@@ -385,6 +386,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Troll.cpp" />
|
||||
<ClCompile Include="..\Private\Troll_States.cpp" />
|
||||
<ClCompile Include="..\Private\Troll_Weapon.cpp" />
|
||||
<ClCompile Include="..\private\UI_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Wand.cpp" />
|
||||
<ClCompile Include="Broom_States.cpp" />
|
||||
<ClCompile Include="Client.cpp" />
|
||||
|
||||
@@ -340,11 +340,8 @@
|
||||
<ClInclude Include="..\public\MapElement_Light.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Light</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement_Light.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Light</Filter>
|
||||
<ClInclude Include="..\public\UI_Manager.h">
|
||||
<Filter>02.GameObjects\UI\UI_Manager</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -668,12 +665,7 @@
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement\Light">
|
||||
<UniqueIdentifier>{71f6a568-488d-4ec1-be79-8fcce6677e27}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement">
|
||||
<UniqueIdentifier>{f3f219aa-034f-4aa2-9f2e-d75d15bd1f4a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement\Light">
|
||||
<UniqueIdentifier>{71f6a568-488d-4ec1-be79-8fcce6677e27}</UniqueIdentifier>
|
||||
</Filter>
|
||||
|
||||
<Filter Include="02.GameObjects\Monster\Troll">
|
||||
<UniqueIdentifier>{a1b1f17d-ed4f-4b20-aa8e-c52e693683d4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -743,6 +735,9 @@
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header">
|
||||
<UniqueIdentifier>{00b37924-ab02-4287-b67e-80375a8d3268}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\UI_Manager">
|
||||
<UniqueIdentifier>{9cc8fea6-837e-4f68-b116-134c9dc68a26}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -1009,12 +1004,6 @@
|
||||
<ClCompile Include="..\private\MapElement_Light.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Light</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement_Light.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Light</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Troll.cpp">
|
||||
<Filter>02.GameObjects\Monster\Troll</Filter>
|
||||
</ClCompile>
|
||||
@@ -1084,6 +1073,9 @@
|
||||
<ClCompile Include="..\Private\Current_Slot_Number.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Slot_Number</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\UI_Manager.cpp">
|
||||
<Filter>02.GameObjects\UI\UI_Manager</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc">
|
||||
|
||||
@@ -47,6 +47,7 @@ HRESULT CCurrent_Slot_Number::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Pos(-805.f, 380.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_pVIBufferCom->Set_ImageUV(pUVDesc);
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ HRESULT CCurrent_Spell_Slot::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-780.f, 340.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ HRESULT CEessential_Spell::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_pVIBufferCom->Set_ImageUV(pUVDesc);
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ HRESULT CEessential_Spell_Slot::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_fDelayTime = 0.5f;
|
||||
m_iPerSpell_Slot = -1;
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "MapInfo.h"
|
||||
#include "MonsterInfo.h"
|
||||
#include "PlayerInfo.h"
|
||||
#include "Skill_Data.h"
|
||||
|
||||
IMPLEMENT_SINGLETON(CInfoInstance)
|
||||
|
||||
@@ -17,6 +18,7 @@ void CInfoInstance::Update(_float fTimeDelta)
|
||||
m_pPlayerInfo->Update(fTimeDelta);
|
||||
m_pMonsterInfo->Update(fTimeDelta);
|
||||
m_pMapInfo->Update(fTimeDelta);
|
||||
m_pSkillInfo->Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CInfoInstance::Change_Level()
|
||||
@@ -24,6 +26,7 @@ void CInfoInstance::Change_Level()
|
||||
m_pPlayerInfo->Change_Level();
|
||||
m_pMonsterInfo->Change_Level();
|
||||
m_pMapInfo->Change_Level();
|
||||
m_pSkillInfo->Change_Level();
|
||||
}
|
||||
|
||||
void CInfoInstance::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight)
|
||||
@@ -86,6 +89,21 @@ HRESULT CInfoInstance::Load_LightElements(const _char* pFilePath)
|
||||
return m_pMapInfo->Load_LightElements(pFilePath);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region SPELL_INFO
|
||||
HRESULT CInfoInstance::Load_SpellInfo(const _char* pFilePath)
|
||||
{
|
||||
return m_pSkillInfo->Load_SpellInfo(pFilePath);
|
||||
}
|
||||
SPELL_INFO CInfoInstance::Get_Spell_Info(_int Spell_Info)
|
||||
{
|
||||
return m_pSkillInfo->Get_Info(Spell_Info);
|
||||
}
|
||||
void CInfoInstance::Change_Canvas()
|
||||
{
|
||||
|
||||
}
|
||||
#pragma endregion
|
||||
LEVEL CInfoInstance::Get_RestartLevel()
|
||||
{
|
||||
return LEVEL::GAMEPLAY;
|
||||
@@ -112,6 +130,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic
|
||||
if (nullptr == m_pMonsterInfo) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pSkillInfo = CSkill_Data::Create(pDevice, pContext);
|
||||
if (nullptr == m_pSkillInfo) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
@@ -125,6 +147,7 @@ void CInfoInstance::Release_Information()
|
||||
SAFE_RELEASE(m_pMapInfo);
|
||||
SAFE_RELEASE(m_pPlayerInfo);
|
||||
SAFE_RELEASE(m_pMonsterInfo);
|
||||
SAFE_RELEASE(m_pSkillInfo);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "Light_Main.h"
|
||||
#include "Camera_Debug.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Spell_Canvas.h"
|
||||
#include "UI_Manager.h"
|
||||
#include "Layer.h"
|
||||
#include "SkyBox.h"
|
||||
#include "Broom.h"
|
||||
@@ -161,9 +160,9 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
/* Map Containters */
|
||||
/* 테스트용 맵 */
|
||||
|
||||
CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
|
||||
//CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
|
||||
/* 전체 맵 */
|
||||
//CInfoInstance::GetInstance()->Load_MapObjects("Map1129");
|
||||
CInfoInstance::GetInstance()->Load_MapObjects("Map1129");
|
||||
|
||||
/* 조명 오브젝트 */
|
||||
CInfoInstance::GetInstance()->Load_LightElements("LightElement");
|
||||
@@ -190,10 +189,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGamePlay_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CUI_Manager>(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
#pragma region UI
|
||||
|
||||
#include "UI_Manager.h"
|
||||
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Loading_Panel.h"
|
||||
#include "LoadingWidget.h"
|
||||
@@ -1628,6 +1630,11 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
/* For.Prototype_GameObject_UI_Manager*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CUI_Manager>(g_iStaticLevel, CUI_Manager::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_GameObject_GamePlay_Canvas*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGamePlay_Canvas>(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "pch.h"
|
||||
#include "Player.h"
|
||||
|
||||
#include "InfoInstance.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "CamPosition_Socket.h"
|
||||
#include "Camera_Gaze.h"
|
||||
@@ -76,6 +78,7 @@ HRESULT CPlayer::InputAction()
|
||||
|| m_pGameInstance->Key_Down(DIK_Z)
|
||||
|| m_pGameInstance->Key_Down(DIK_G)
|
||||
|| m_pGameInstance->Key_Down(DIK_B)
|
||||
|| m_pGameInstance->Key_Down(DIK_T)
|
||||
)
|
||||
{
|
||||
return S_OK;
|
||||
@@ -190,6 +193,9 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
else if (m_pGameInstance->Key_Down(DIK_B)) {
|
||||
m_pFSM->Change_State(FSMSTATE::BROOM_RIDE);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_T)) {
|
||||
m_pInfoInstance->Change_Canvas();
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,28 +6,34 @@
|
||||
|
||||
;
|
||||
|
||||
CSkill_Data::CSkill_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CGameObject(pDevice, pContext)
|
||||
CSkill_Data::CSkill_Data()
|
||||
{
|
||||
}
|
||||
|
||||
CSkill_Data::CSkill_Data(const CSkill_Data& rhs)
|
||||
:CGameObject(rhs)
|
||||
HRESULT CSkill_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Initialize(void* pArg)
|
||||
const SPELL_INFO& CSkill_Data::Get_Info(_uint SpellID) const
|
||||
{
|
||||
auto* pInfo = static_cast<CUIObject::SPELLINFO*>(pArg);
|
||||
return SpellInfo[SpellID];
|
||||
}
|
||||
|
||||
void CSkill_Data::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CSkill_Data::Change_Level()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Load_SpellInfo(const _char* pFilePath)
|
||||
{
|
||||
tinyxml2::XMLDocument doc;
|
||||
tinyxml2::XMLError Error = doc.LoadFile("../Bin/Resources/Data/UI/Spell/SpellInfo.xml");
|
||||
tinyxml2::XMLError Error = doc.LoadFile(pFilePath);
|
||||
if (Error != tinyxml2::XML_SUCCESS)
|
||||
return E_FAIL;
|
||||
|
||||
@@ -47,70 +53,32 @@ HRESULT CSkill_Data::Initialize(void* pArg)
|
||||
continue;
|
||||
}
|
||||
|
||||
pInfo[id].iSpell_ID = id;
|
||||
pInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name"));
|
||||
pInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name"));
|
||||
pSpell->QueryIntAttribute("Spell_Type", &pInfo[id].iSpell_Type);
|
||||
pSpell->QueryIntAttribute("Skill_Type", &pInfo[id].iSkill_Type);
|
||||
pSpell->QueryFloatAttribute("Spell_Cooltime", &pInfo[id].fSpell_CoolTime);
|
||||
pSpell->QueryFloatAttribute("Duration", &pInfo[id].fDuration);
|
||||
pSpell->QueryIntAttribute("AnimNum", &pInfo[id].iAnimNum);
|
||||
pInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo"));
|
||||
SpellInfo[id].iSpell_ID = id;
|
||||
SpellInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name"));
|
||||
SpellInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name"));
|
||||
pSpell->QueryIntAttribute("Spell_Type", &SpellInfo[id].iSpell_Type);
|
||||
pSpell->QueryIntAttribute("Skill_Type", &SpellInfo[id].iSkill_Type);
|
||||
pSpell->QueryFloatAttribute("Spell_Cooltime", &SpellInfo[id].fSpell_CoolTime);
|
||||
pSpell->QueryFloatAttribute("Duration", &SpellInfo[id].fDuration);
|
||||
pSpell->QueryIntAttribute("AnimNum", &SpellInfo[id].iAnimNum);
|
||||
SpellInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo"));
|
||||
int lock = 0, equip = 0;
|
||||
pSpell->QueryIntAttribute("Spell_Lock", &lock);
|
||||
pSpell->QueryIntAttribute("Equip_Spell", &equip);
|
||||
pInfo[id].bSpell_Lock = lock != 0;
|
||||
pInfo[id].bEquip_Spell = equip != 0;
|
||||
SpellInfo[id].bSpell_Lock = lock != 0;
|
||||
SpellInfo[id].bEquip_Spell = equip != 0;
|
||||
|
||||
pSpell = pSpell->NextSiblingElement("Spell");
|
||||
}
|
||||
|
||||
//pInfo = SpellInfo;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//const CUIObject::SPELLINFO& CSkill_Data::Get_Info(_uint SpellID) const
|
||||
//{
|
||||
// return SpellInfo[SpellID];
|
||||
//}
|
||||
|
||||
void CSkill_Data::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CSkill_Data::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CSkill_Data::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSkill_Data::Get_WorldPostion()
|
||||
{
|
||||
return _vector();
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Ready_Components(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSkill_Data* CSkill_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSkill_Data* pInstance = new CSkill_Data(pDevice, pContext);
|
||||
CSkill_Data* pInstance = new CSkill_Data();
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
if (FAILED(pInstance->Initialize(pDevice, pContext)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSkill_Data");
|
||||
SAFE_RELEASE(pInstance);
|
||||
@@ -119,25 +87,8 @@ CSkill_Data* CSkill_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pCo
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSkill_Data::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSkill_Data* pInstance = new CSkill_Data(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSkill_Data");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSkill_Data::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
}
|
||||
|
||||
void CSkill_Data::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Anim.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSpell_Anim::CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
@@ -8,7 +9,9 @@ CSpell_Anim::CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
}
|
||||
|
||||
CSpell_Anim::CSpell_Anim(const CSpell_Anim& rhs)
|
||||
:CElementObject(rhs)
|
||||
:CElementObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
@@ -48,6 +51,7 @@ HRESULT CSpell_Anim::Initialize(void* pArg)
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -160,8 +164,8 @@ void CSpell_Anim::Set_FadeIn()
|
||||
|
||||
void CSpell_Anim::Change_Image(_int SpellID)
|
||||
{
|
||||
_wstring pImageName = static_cast<CUIObject*>(m_pOwner)->Get_Info(SpellID).pImage_Name;
|
||||
m_iTotalFrames = static_cast<CUIObject*>(m_pOwner)->Get_Info(SpellID).iAnimNum;
|
||||
_wstring pImageName = m_pInfoInstance->Get_Spell_Info(SpellID).pImage_Name;
|
||||
m_iTotalFrames = m_pInfoInstance->Get_Spell_Info(SpellID).iAnimNum;
|
||||
if (m_pDiffuse_TextureCom)
|
||||
{
|
||||
Remove_Component<CTexture>();
|
||||
|
||||
@@ -46,6 +46,7 @@ HRESULT CSpell_Header::Initialize(void* pArg)
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg)
|
||||
m_fAlphaTime = 5.f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ HRESULT CSpell_Hover::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ HRESULT CSpell_Hover_Effect::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ HRESULT CSpell_List::Initialize(void* pArg)
|
||||
m_fDelayTime = 0.5f;
|
||||
m_iPerSpell_Slot = -1;
|
||||
Color();
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ HRESULT CSpell_List_Image::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_pVIBufferCom->Set_ImageUV(pUVDesc);
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#include "Current_Slot_Number.h"
|
||||
#include "Spell_Header.h"
|
||||
#include "Spell_Header_Line.h"
|
||||
//#include "Spell_Data.h"
|
||||
#include "Spell_Anim.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSpell_Panel::CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
@@ -23,7 +23,8 @@ CSpell_Panel::CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
}
|
||||
|
||||
CSpell_Panel::CSpell_Panel(const CSpell_Panel& rhs)
|
||||
:CPanelObject(rhs)
|
||||
:CPanelObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -58,7 +59,10 @@ HRESULT CSpell_Panel::Initialize(void* pArg)
|
||||
m_iSpellType = -1;
|
||||
m_iPendingSpell = -1;
|
||||
m_fDelayTime = 1.f;
|
||||
m_bActive = true;
|
||||
|
||||
Add_Function(TEXT("Hover"), [this](void* p) {this->Slot_Chack(p); });
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -132,11 +136,12 @@ _vector CSpell_Panel::Get_WorldPostion()
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
const CUIObject::SPELLINFO CSpell_Panel::Get_Info(_int Index)
|
||||
const Client::SPELL_INFO CSpell_Panel::Get_SpellInfo(_int SkillID)
|
||||
{
|
||||
return m_Info[Index];
|
||||
return m_pInfoInstance->Get_Spell_Info(SkillID);
|
||||
}
|
||||
|
||||
|
||||
void CSpell_Panel::Slot_Chack(void* pArg)
|
||||
{
|
||||
CUIObject::HOVER_INFO* Info = static_cast<CUIObject::HOVER_INFO*>(pArg);
|
||||
|
||||
@@ -49,6 +49,7 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
|
||||
m_fSortZ = 0.02f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ HRESULT CSpell_State::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_bActive = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg)
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
m_bActive = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ HRESULT CTroll::Initialize(void* pArg)
|
||||
|
||||
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(30.f, 10.f, 30.f, 1.f));
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(3.f, -5.f, -20.f, 1.f));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
#include "pch.h"
|
||||
#include "UI_Manager.h"
|
||||
#include "GameInstance.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Spell_Canvas.h"
|
||||
|
||||
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CUIObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CUI_Manager::CUI_Manager(const CUI_Manager& rhs)
|
||||
:CUIObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CUI_Manager::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CUI_Manager::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
m_bCanvas_Change = false;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CUI_Manager::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CUI_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_T))
|
||||
{
|
||||
m_bCanvas_Change = !m_bCanvas_Change;
|
||||
}
|
||||
|
||||
if (m_bCanvas_Change == false)
|
||||
{
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pSpell_Panel)->Visible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<CCanvasObject*>(m_pSpell_Panel)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void CUI_Manager::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CUI_Manager::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CUI_Manager::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CUI_Manager::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGamePlay_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CGamePlay_Canvas**>(&m_pGamePlay_Canves)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Canvas**>(&m_pSpell_Panel)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CUI_Manager::Clear_Penel()
|
||||
{
|
||||
}
|
||||
|
||||
CUI_Manager* CUI_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CUI_Manager* pInstance = new CUI_Manager(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CUI_Manager");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CUI_Manager::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CUI_Manager* pInstance = new CUI_Manager(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CUI_Manager");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CUI_Manager::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CUI_Manager::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -18,15 +18,16 @@ namespace Client
|
||||
|
||||
typedef struct tagSpellInfo
|
||||
{
|
||||
_uint iSpell_ID{};
|
||||
_wstring pSpell_Name;
|
||||
_uint iSpell_Type{};
|
||||
_uint iSkill_Type{};
|
||||
_float fSpell_CoolTime{};
|
||||
_float fDuration{};
|
||||
_uint iAnimNum{};
|
||||
_wstring pSpellInfo;
|
||||
_bool bSpell_Lock = false;
|
||||
_bool bEquip_Spell = false;
|
||||
}SPELLINFO;
|
||||
_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;
|
||||
}SPELL_INFO;
|
||||
};
|
||||
|
||||
@@ -44,9 +44,9 @@ class CInfoInstance final : public CBase
|
||||
#pragma endregion
|
||||
#pragma region Spell_INFO
|
||||
HRESULT Load_SpellInfo(const _char* pFilePath);
|
||||
SPELL_INFO Get_Spell_Info(_int Spell_Info);
|
||||
void Change_Canvas();
|
||||
#pragma endregion
|
||||
|
||||
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
@@ -55,6 +55,8 @@ class CInfoInstance final : public CBase
|
||||
class CPlayerInfo* m_pPlayerInfo = { nullptr };
|
||||
class CMonsterInfo* m_pMonsterInfo = { nullptr };
|
||||
class CMapInfo* m_pMapInfo = { nullptr };
|
||||
class CSkill_Data* m_pSkillInfo= { nullptr };
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
_string m_strLog = {};
|
||||
|
||||
@@ -1,62 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameInstance;
|
||||
class CUIObject;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSkill_Data final : public CGameObject
|
||||
class CSkill_Data final : public CBase
|
||||
{
|
||||
public:
|
||||
typedef struct tagSpellInfo
|
||||
{
|
||||
_int iSpell_ID{};
|
||||
_string pSpell_Name;
|
||||
_string pImage_Name;
|
||||
_int iSpell_Type{};
|
||||
_int iSkill_Type{};
|
||||
_float fSpell_CoolTime{};
|
||||
_float fDuration{};
|
||||
_int iAnimNum{};
|
||||
_string pSpellInfo;
|
||||
_bool bSpell_Lock = false;
|
||||
_bool bEquip_Spell = false;
|
||||
}SPELLINFO;
|
||||
|
||||
private:
|
||||
CSkill_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSkill_Data(const CSkill_Data& rhs);
|
||||
virtual ~CSkill_Data() = default;
|
||||
CSkill_Data();
|
||||
~CSkill_Data() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
void Update(_float fTimeDelta);
|
||||
void Change_Level();
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
//const SPELLINFO& Get_Info(_uint SpellID) const;
|
||||
HRESULT Load_SpellInfo(const _char* pFilePath);
|
||||
|
||||
public:
|
||||
const SPELL_INFO& Get_Info(_uint SpellID) const;
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pSpell_Panel = { nullptr };
|
||||
SPELL_INFO SpellInfo[34] = {};
|
||||
|
||||
private:
|
||||
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||
|
||||
|
||||
SPELLINFO SpellInfo = {};
|
||||
public:
|
||||
static CSkill_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -39,11 +39,15 @@ class CSpell_Anim final : public CElementObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDesendo_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
|
||||
_int m_iTotalFrames{}; // 전체 프레임 수
|
||||
_float m_fFrameTime{}; // 한 프레임당 시간(초)
|
||||
_int m_iCurrentFrame{}; // 현재 보여줄 프레임
|
||||
|
||||
@@ -27,7 +27,7 @@ class CSpell_Panel final : public CPanelObject
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
public:
|
||||
virtual const SPELLINFO Get_Info(_int Index) override;
|
||||
const SPELL_INFO Get_SpellInfo(_int SkillID);
|
||||
|
||||
private:
|
||||
void Slot_Chack(void* pArg);
|
||||
@@ -41,6 +41,8 @@ class CSpell_Panel final : public CPanelObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
@@ -63,7 +65,6 @@ class CSpell_Panel final : public CPanelObject
|
||||
|
||||
_int m_iHoverSlot[2] = { -1,-1 };
|
||||
|
||||
SPELLINFO m_Info[34] = {};
|
||||
CUIObject::HOVER_INFO m_Hover;
|
||||
|
||||
_int m_iPendingSpell = -1;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "UIObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CUI_Manager final : public CUIObject
|
||||
{
|
||||
private:
|
||||
CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CUI_Manager(const CUI_Manager& rhs);
|
||||
virtual ~CUI_Manager() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
//virtual HRESULT Ready_Panel(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Clear_Penel();
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pGamePlay_Canves= { nullptr };
|
||||
CGameObject* m_pSpell_Panel = { nullptr };
|
||||
_bool m_bCanvas_Change = { false };
|
||||
|
||||
public:
|
||||
static CUI_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END;
|
||||
@@ -188,8 +188,9 @@ void CCamera::Set_Fov(_float fFovy, _float fTimeDelta,_bool& bZoomIn)
|
||||
m_fFovy -= (fTimeDelta * 0.6f);
|
||||
}
|
||||
|
||||
if (fFovy == m_fFovy)
|
||||
if (fabsf(fFovy - m_fFovy) <= FLT_EPSILON3 * 10.f)
|
||||
{
|
||||
m_fFovy = fFovy;
|
||||
bZoomIn = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,24 +120,67 @@ void CChannel::Update_TransformationMatirx(
|
||||
vector<_uint> BoneMask,
|
||||
_vector vector[3])
|
||||
{
|
||||
|
||||
if (0.f == fCurrentTrackPosition)
|
||||
*pCurrentKeyFrameIndex = 0;
|
||||
|
||||
KEYFRAME LastKeyFrame = m_KeyFrames.back();
|
||||
|
||||
_vector vScale{};
|
||||
_vector vRotation{};
|
||||
_vector vTranslation{};
|
||||
|
||||
if (fCurrentTrackPosition >= LastKeyFrame.fTrackPosition)
|
||||
{
|
||||
vScale = XMLoadFloat3(&LastKeyFrame.vScale);
|
||||
vRotation = XMLoadFloat4(&LastKeyFrame.vRotation);
|
||||
vTranslation = XMVectorSetW(XMLoadFloat3(&LastKeyFrame.vTranslation), 1.f);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
while (fCurrentTrackPosition >= m_KeyFrames[*pCurrentKeyFrameIndex + 1].fTrackPosition)
|
||||
++*pCurrentKeyFrameIndex;
|
||||
|
||||
_float3 vSourScale{}, vDestScale{};
|
||||
_float4 vSourRotation{}, vDestRotation{};
|
||||
_float3 vSourTranslation{}, vDestTranslation{};
|
||||
|
||||
vSourScale = m_KeyFrames[*pCurrentKeyFrameIndex].vScale;
|
||||
vDestScale = m_KeyFrames[*pCurrentKeyFrameIndex + 1].vScale;
|
||||
|
||||
vSourRotation = m_KeyFrames[*pCurrentKeyFrameIndex].vRotation;
|
||||
vDestRotation = m_KeyFrames[*pCurrentKeyFrameIndex + 1].vRotation;
|
||||
|
||||
vSourTranslation = m_KeyFrames[*pCurrentKeyFrameIndex].vTranslation;
|
||||
vDestTranslation = m_KeyFrames[*pCurrentKeyFrameIndex + 1].vTranslation;
|
||||
|
||||
_float fRatio = (fCurrentTrackPosition - m_KeyFrames[*pCurrentKeyFrameIndex].fTrackPosition) /
|
||||
(m_KeyFrames[*pCurrentKeyFrameIndex + 1].fTrackPosition - m_KeyFrames[*pCurrentKeyFrameIndex].fTrackPosition);
|
||||
|
||||
vScale = XMVectorLerp(XMLoadFloat3(&vSourScale), XMLoadFloat3(&vDestScale), fRatio);
|
||||
vRotation = XMQuaternionSlerp(XMLoadFloat4(&vSourRotation), XMLoadFloat4(&vDestRotation), fRatio);
|
||||
vTranslation = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&vSourTranslation), XMLoadFloat3(&vDestTranslation), fRatio), 1.f);
|
||||
|
||||
}
|
||||
if (!bIsSpine)
|
||||
{
|
||||
m_IsUpper = BoneMask[m_iBoneIndex];
|
||||
m_ilayerIndex = m_IsUpper ? 1 : 0;
|
||||
LocalPos = pLocalPosArray[m_ilayerIndex][m_iBoneIndex];
|
||||
//LocalPos = pLocalPosArray[m_ilayerIndex][m_iBoneIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
LocalPos = pLocalPosArray[0][m_iBoneIndex];
|
||||
//LocalPos = pLocalPosArray[0][m_iBoneIndex];
|
||||
}
|
||||
|
||||
_vector vScale = XMLoadFloat3(&LocalPos.Scale);
|
||||
/*_vector vScale = XMLoadFloat3(&LocalPos.Scale);
|
||||
_vector vRotation = XMLoadFloat4(&LocalPos.Rotation);
|
||||
_vector vTranslation = XMVectorSet(
|
||||
LocalPos.Translation.x,
|
||||
LocalPos.Translation.y,
|
||||
LocalPos.Translation.z,
|
||||
1.f);
|
||||
1.f);*/
|
||||
|
||||
if (Bones[m_iBoneIndex]->Compare_Name("Reference")|| Bones[m_iBoneIndex]->Compare_Name("root"))
|
||||
{
|
||||
|
||||
@@ -123,13 +123,13 @@ _bool CModel::Play_Animation(_float fTimeDelta, CTransform* pTransform)
|
||||
|
||||
_bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
{
|
||||
if (m_bLoopRestarted)
|
||||
/*if (m_bLoopRestarted)
|
||||
{
|
||||
m_vPrevRootPos = { 0,0,0 };
|
||||
m_bLoopRestarted = false;
|
||||
}
|
||||
}*/
|
||||
|
||||
ComputeAnimation(m_iCurrentAnimIndex);
|
||||
//ComputeAnimation(m_iCurrentAnimIndex);
|
||||
|
||||
if (m_iPreAnimIndex >= 0 && m_iPreAnimIndex != m_iCurrentAnimIndex)
|
||||
{
|
||||
@@ -160,6 +160,19 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
m_iPreAnimIndex = m_iCurrentAnimIndex;
|
||||
}
|
||||
|
||||
|
||||
if (m_bIsFinishedAnim)
|
||||
{
|
||||
if (m_bIsLoop)
|
||||
{
|
||||
m_bLoopRestarted = true;
|
||||
m_vPrevRootPos = { 0,0,0 };
|
||||
}
|
||||
else{
|
||||
XMStoreFloat3(&m_vPrevRootPos, m_vector[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bRatio) {
|
||||
Update_RootBone(m_fAmount * m_fRatio);
|
||||
}
|
||||
@@ -170,19 +183,10 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
|
||||
if (m_bIsFinishedAnim)
|
||||
{
|
||||
if (m_bIsLoop)
|
||||
{
|
||||
m_bLoopRestarted = true;
|
||||
}
|
||||
else{
|
||||
XMStoreFloat3(&m_vPrevRootPos, m_vector[2]);
|
||||
}
|
||||
|
||||
m_vPrevRootRot = { 0.f,0.f,0.f,0.f };
|
||||
m_bInitialRootRotSaved = false;
|
||||
}
|
||||
|
||||
|
||||
for (auto& pBone : m_Bones)
|
||||
{
|
||||
pBone->Update_CombinedTransformationMatrix(m_Bones, XMLoadFloat4x4(&m_PreTransformMatrix));
|
||||
@@ -199,8 +203,8 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
m_bLoopRestarted = false;
|
||||
}
|
||||
|
||||
ComputeAnimation(m_iCurrentAnimIndex);
|
||||
ComputeAnimation_Second(m_iCurrSecondAnimIndex);
|
||||
//ComputeAnimation(m_iCurrentAnimIndex);
|
||||
//ComputeAnimation_Second(m_iCurrSecondAnimIndex);
|
||||
|
||||
if (m_iPreAnimIndex >= 0 && m_iPreAnimIndex != m_iCurrentAnimIndex)
|
||||
{
|
||||
@@ -319,8 +323,6 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _boo
|
||||
m_bIsLoop = isLoop;
|
||||
m_fAmount = fAmount;
|
||||
m_bRatio = bRatio;
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
m_iCurrentAnimIndex = -1;
|
||||
@@ -1716,7 +1718,7 @@ HRESULT CModel::Initialize(void* pArg)
|
||||
InItialize_BoneIndex();
|
||||
Initialize_BoneMasks();
|
||||
|
||||
Create_Temp();
|
||||
/*Create_Temp();
|
||||
m_Parent.resize(m_Bones.size());
|
||||
for (size_t i = 0; i < (_uint)m_Bones.size(); i++)
|
||||
{
|
||||
@@ -1728,7 +1730,7 @@ HRESULT CModel::Initialize(void* pArg)
|
||||
|
||||
Create_Con();
|
||||
Create_LocalPosVB();
|
||||
Create_ParentVB();
|
||||
Create_ParentVB();*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user