diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index f1cdbb10a..7aeef6f57 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -267,6 +267,7 @@ call Update_Resources.bat
+
@@ -385,6 +386,7 @@ call Update_Resources.bat
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 1bee452e8..1baf1fe3f 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -340,11 +340,8 @@
02.GameObjects\Environment\03.MapElement\Light
-
- 02.GameObjects\Environment\03.MapElement
-
-
- 02.GameObjects\Environment\03.MapElement\Light
+
+ 02.GameObjects\UI\UI_Manager
@@ -668,12 +665,7 @@
{71f6a568-488d-4ec1-be79-8fcce6677e27}
-
- {f3f219aa-034f-4aa2-9f2e-d75d15bd1f4a}
-
-
- {71f6a568-488d-4ec1-be79-8fcce6677e27}
-
+
{a1b1f17d-ed4f-4b20-aa8e-c52e693683d4}
@@ -743,6 +735,9 @@
{00b37924-ab02-4287-b67e-80375a8d3268}
+
+ {9cc8fea6-837e-4f68-b116-134c9dc68a26}
+
@@ -1009,12 +1004,6 @@
02.GameObjects\Environment\03.MapElement\Light
-
- 02.GameObjects\Environment\03.MapElement
-
-
- 02.GameObjects\Environment\03.MapElement\Light
-
02.GameObjects\Monster\Troll
@@ -1084,6 +1073,9 @@
02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Slot_Number
+
+ 02.GameObjects\UI\UI_Manager
+
diff --git a/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp b/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp
index 62b9c3fee..e084a8135 100644
--- a/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp
+++ b/Jusin154_Team3D/Client/Private/Current_Slot_Number.cpp
@@ -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;
}
diff --git a/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp b/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp
index 7828ca304..ed1b5f8a7 100644
--- a/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp
+++ b/Jusin154_Team3D/Client/Private/Current_Spell_Slot.cpp
@@ -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;
}
diff --git a/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp b/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp
index 97b5f2e73..c07574d2f 100644
--- a/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp
+++ b/Jusin154_Team3D/Client/Private/Eessential_Spell.cpp
@@ -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;
}
diff --git a/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp b/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp
index 57ffb8784..97ed2abec 100644
--- a/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp
+++ b/Jusin154_Team3D/Client/Private/Eessential_Spell_Slot.cpp
@@ -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;
}
diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
index b56166cc9..59911012c 100644
--- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp
+++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
@@ -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);
diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
index 82d12ad02..414ca8ab8 100644
--- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
@@ -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(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) {
- return E_FAIL;
- }
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) {
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) {
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 92951e71e..4469dbea5 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -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(g_iStaticLevel, CUI_Manager::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
/* For.Prototype_GameObject_GamePlay_Canvas*/
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
index 5c13af692..0da115e0c 100644
--- a/Jusin154_Team3D/Client/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -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;
}
diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp
index 16dd73e6b..885b8b7bf 100644
--- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp
+++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp
@@ -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(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()
-{
-}
diff --git a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp
index cf6daec60..ae831bcc0 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp
@@ -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(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(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(m_pOwner)->Get_Info(SpellID).pImage_Name;
- m_iTotalFrames = static_cast(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();
diff --git a/Jusin154_Team3D/Client/Private/Spell_Header.cpp b/Jusin154_Team3D/Client/Private/Spell_Header.cpp
index f0a2db064..5625e7645 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Header.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Header.cpp
@@ -46,6 +46,7 @@ HRESULT CSpell_Header::Initialize(void* pArg)
static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
+ m_bActive = true;
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp
index 1bd1c8aa5..fc5d96073 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp
@@ -41,6 +41,7 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg)
m_fAlphaTime = 5.f;
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
+ m_bActive = true;
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_Hover.cpp b/Jusin154_Team3D/Client/Private/Spell_Hover.cpp
index 999d66fdc..3e018dd98 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Hover.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Hover.cpp
@@ -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(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
+ m_bActive = true;
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp b/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp
index 5ed2de67a..ab130ff64 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Hover_Effect.cpp
@@ -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(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
+ m_bActive = true;
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_List.cpp b/Jusin154_Team3D/Client/Private/Spell_List.cpp
index c88354197..7353cba51 100644
--- a/Jusin154_Team3D/Client/Private/Spell_List.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_List.cpp
@@ -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;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp b/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp
index 2d03173e0..26d8fa5a0 100644
--- a/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_List_Image.cpp
@@ -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;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp
index 955948fb1..242fe64c9 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp
@@ -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(pArg);
diff --git a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp
index 662d64f78..4ab5944e2 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp
@@ -49,6 +49,7 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
m_fSortZ = 0.02f;
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
+ m_bActive = true;
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_State.cpp b/Jusin154_Team3D/Client/Private/Spell_State.cpp
index a183e12cf..60391a3ed 100644
--- a/Jusin154_Team3D/Client/Private/Spell_State.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_State.cpp
@@ -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;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp
index 32ce2c9e2..0f2cd9760 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp
@@ -48,6 +48,8 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg)
static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
+ m_bActive = true;
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp
index 0357ca052..c8d1b241a 100644
--- a/Jusin154_Team3D/Client/Private/Troll.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll.cpp
@@ -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;
}
diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp
new file mode 100644
index 000000000..59a35ba05
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp
@@ -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(m_pGamePlay_Canves)->Visible(true);
+ static_cast(m_pSpell_Panel)->Visible(false);
+ }
+ else
+ {
+ static_cast(m_pSpell_Panel)->Visible(true);
+ static_cast(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(g_iStaticLevel, &m_pVIBufferCom))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CUI_Manager::Ready_Components(void* pArg)
+{
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pGamePlay_Canves)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&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
diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h
index 498525f3d..f865b6be1 100644
--- a/Jusin154_Team3D/Client/Public/Client_Struct.h
+++ b/Jusin154_Team3D/Client/Public/Client_Struct.h
@@ -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;
};
diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h
index 41b803282..989107d77 100644
--- a/Jusin154_Team3D/Client/Public/InfoInstance.h
+++ b/Jusin154_Team3D/Client/Public/InfoInstance.h
@@ -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 = {};
diff --git a/Jusin154_Team3D/Client/Public/Skill_Data.h b/Jusin154_Team3D/Client/Public/Skill_Data.h
index d5f45f0cd..00b539a71 100644
--- a/Jusin154_Team3D/Client/Public/Skill_Data.h
+++ b/Jusin154_Team3D/Client/Public/Skill_Data.h
@@ -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
diff --git a/Jusin154_Team3D/Client/Public/Spell_Anim.h b/Jusin154_Team3D/Client/Public/Spell_Anim.h
index a40ce3957..65efe6eb7 100644
--- a/Jusin154_Team3D/Client/Public/Spell_Anim.h
+++ b/Jusin154_Team3D/Client/Public/Spell_Anim.h
@@ -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{}; // 현재 보여줄 프레임
diff --git a/Jusin154_Team3D/Client/Public/Spell_Panel.h b/Jusin154_Team3D/Client/Public/Spell_Panel.h
index 9b98c857a..daab8a2ca 100644
--- a/Jusin154_Team3D/Client/Public/Spell_Panel.h
+++ b/Jusin154_Team3D/Client/Public/Spell_Panel.h
@@ -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;
diff --git a/Jusin154_Team3D/Client/Public/UI_Manager.h b/Jusin154_Team3D/Client/Public/UI_Manager.h
new file mode 100644
index 000000000..f2771c59e
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/UI_Manager.h
@@ -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;
diff --git a/Jusin154_Team3D/Engine/Private/Camera.cpp b/Jusin154_Team3D/Engine/Private/Camera.cpp
index a1591273d..0cb6df8a4 100644
--- a/Jusin154_Team3D/Engine/Private/Camera.cpp
+++ b/Jusin154_Team3D/Engine/Private/Camera.cpp
@@ -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;
}
}
diff --git a/Jusin154_Team3D/Engine/Private/Channel.cpp b/Jusin154_Team3D/Engine/Private/Channel.cpp
index bd03bf7e4..9619fed79 100644
--- a/Jusin154_Team3D/Engine/Private/Channel.cpp
+++ b/Jusin154_Team3D/Engine/Private/Channel.cpp
@@ -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"))
{
diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp
index 92974b5ad..b8179762a 100644
--- a/Jusin154_Team3D/Engine/Private/Model.cpp
+++ b/Jusin154_Team3D/Engine/Private/Model.cpp
@@ -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();*/
}