diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index a2579166f..c9a6c7f64 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -268,6 +268,7 @@ call Update_Resources.bat
+
@@ -408,6 +409,7 @@ call Update_Resources.bat
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index ea9bf389c..ee057fee4 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -158,10 +158,10 @@
02.GameObjects\Cameras\Camera_Gaze
- 02.GameObjects\Monster\Goblin
+ 02.GameObjects\NPC\Hostile\Monster\Goblin
- 02.GameObjects\Monster
+ 02.GameObjects\NPC\Hostile\Monster
02.GameObjects\Environment\00.MapContainer
@@ -269,7 +269,7 @@
02.GameObjects\Effect\Effects\Lumos
- 02.GameObjects\Monster\Troll
+ 02.GameObjects\NPC\Hostile\Monster\Troll
02.GameObjects\Item\Troll_Weapon
@@ -409,6 +409,9 @@
02.GameObjects\UI\Screen\Logo\Logo_Text
+
+ 04.Mechanic\State\State_Combat\Dead
+
@@ -491,9 +494,6 @@
{603938cc-e4fe-44d8-890b-784174a86161}
-
- {b72a9bb0-1b21-416b-bd0c-ba943cd7cc9d}
-
{2814c935-13d9-4b9a-94ba-c9e470219a18}
@@ -635,12 +635,6 @@
{b719d948-fce3-4144-9d2c-edcab4cfceaf}
-
- {d371e373-e343-4e0b-9a0c-34eae167c1cd}
-
-
- {1ff3d6f1-f31d-47b7-84b7-d23efe98d7d2}
-
{e2d84a8f-46c9-4689-bd91-cc45343d2b10}
@@ -728,9 +722,6 @@
{71f6a568-488d-4ec1-be79-8fcce6677e27}
-
- {a1b1f17d-ed4f-4b20-aa8e-c52e693683d4}
-
{1d6c078d-dddd-493d-a6f0-f2cac2e4107e}
@@ -851,6 +842,15 @@
{7e641382-9dfa-4da7-a8c8-a3ee06360e7a}
+
+ {d371e373-e343-4e0b-9a0c-34eae167c1cd}
+
+
+ {1ff3d6f1-f31d-47b7-84b7-d23efe98d7d2}
+
+
+ {a1b1f17d-ed4f-4b20-aa8e-c52e693683d4}
+
{c02bfd67-091b-4636-a45f-34a3603ffbd8}
@@ -869,6 +869,9 @@
{c584798b-d7aa-4cb0-b6e8-c2aff73757ce}
+
+ {81add99f-7450-4730-8d3f-bf1de06b2b8d}
+
@@ -1016,13 +1019,13 @@
02.GameObjects\Cameras\Camera_Gaze
- 02.GameObjects\Monster\Goblin
+ 02.GameObjects\NPC\Hostile\Monster\Goblin
- 02.GameObjects\Monster\Goblin
+ 02.GameObjects\NPC\Hostile\Monster\Goblin
- 02.GameObjects\Monster
+ 02.GameObjects\NPC\Hostile\Monster
02.GameObjects\Environment\00.MapContainer\BuildingContainer
@@ -1133,10 +1136,10 @@
02.GameObjects\Environment\03.MapElement\Light
- 02.GameObjects\Monster\Troll
+ 02.GameObjects\NPC\Hostile\Monster\Troll
- 02.GameObjects\Monster\Troll
+ 02.GameObjects\NPC\Hostile\Monster\Troll
02.GameObjects\Item\Troll_Weapon
@@ -1276,6 +1279,9 @@
02.GameObjects\UI\Screen\Logo\Logo_Text
+
+ 04.Mechanic\State\State_Combat\Dead
+
diff --git a/Jusin154_Team3D/Client/Private/CallBack_EffectHitBox_Behavior.cpp b/Jusin154_Team3D/Client/Private/CallBack_EffectHitBox_Behavior.cpp
index 140eb3454..2e11f5720 100644
--- a/Jusin154_Team3D/Client/Private/CallBack_EffectHitBox_Behavior.cpp
+++ b/Jusin154_Team3D/Client/Private/CallBack_EffectHitBox_Behavior.cpp
@@ -60,7 +60,7 @@ PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags
PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags(const PSX::PxController& controller)
{
// CCT끼리 부딪힐 때를 굳이 안 쓰면 0 리턴
- return PSX::PxControllerBehaviorFlags(0);
+ return PSX::PxControllerBehaviorFlag::eCCT_SLIDE;
}
PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags(const PSX::PxObstacle& obstacle)
diff --git a/Jusin154_Team3D/Client/Private/CallBack_EffectHitBox_HitReport.cpp b/Jusin154_Team3D/Client/Private/CallBack_EffectHitBox_HitReport.cpp
index acbbdb0ad..cb60b353a 100644
--- a/Jusin154_Team3D/Client/Private/CallBack_EffectHitBox_HitReport.cpp
+++ b/Jusin154_Team3D/Client/Private/CallBack_EffectHitBox_HitReport.cpp
@@ -43,7 +43,7 @@ void CCallBack_EffectHitBox_HitReport::onShapeHit(const PSX::PxControllerShapeHi
case PXOBJECT::WALL:
/* OnCollision 함수에 넘길 값 */
- CollisionDesc.vWorldPos = XMVectorSet( (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f);
+ CollisionDesc.vWorldPos = { (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f };
memcpy(&CollisionDesc.vWorldNomal, &vWorldNormal, sizeof(_float3));
memcpy(&CollisionDesc.vHitDir, &vDir, sizeof(_float3));
CollisionDesc.fLength = fLength;
@@ -53,13 +53,13 @@ void CCallBack_EffectHitBox_HitReport::onShapeHit(const PSX::PxControllerShapeHi
case PXOBJECT::GOBLIN_WARRIOR:
/* OnCollision 함수에 넘길 값 */
- CollisionDesc.vWorldPos = XMVectorSet( (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f);
+ CollisionDesc.vWorldPos = { (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f };
memcpy(&CollisionDesc.vWorldNomal, &vWorldNormal, sizeof(_float3));
memcpy(&CollisionDesc.vHitDir, &vDir, sizeof(_float3));
CollisionDesc.fLength = fLength;
pOwnerActorData->pOwner->Get_Owner()->OnCollision(pTargetActorData->pOwner , &CollisionDesc);
- static_cast(pTargetActorData->pBody)->Add_Force(CollisionDesc.vHitDir * fLength * 100.f, PSX::PxForceMode::eIMPULSE);
+ static_cast(pTargetActorData->pBody)->Add_Force(XMLoadFloat4(&CollisionDesc.vHitDir) * fLength * 100.f, PSX::PxForceMode::eIMPULSE);
break;
default:
{
@@ -112,7 +112,7 @@ void CCallBack_EffectHitBox_HitReport::onControllerHit(const PSX::PxControllersH
case PXOBJECT::GOBLIN_WARRIOR:
/* OnCollision 함수에 넘길 값 */
- CollisionDesc.vWorldPos = XMVectorSet((_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f);
+ CollisionDesc.vWorldPos = { (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f };
memcpy(&CollisionDesc.vWorldNomal, &vWorldNormal, sizeof(_float3));
memcpy(&CollisionDesc.vHitDir, &vDir, sizeof(_float3));
CollisionDesc.fLength = fLength;
diff --git a/Jusin154_Team3D/Client/Private/CallBack_Monster_Behavior.cpp b/Jusin154_Team3D/Client/Private/CallBack_Monster_Behavior.cpp
index 699647c82..e4b961ca8 100644
--- a/Jusin154_Team3D/Client/Private/CallBack_Monster_Behavior.cpp
+++ b/Jusin154_Team3D/Client/Private/CallBack_Monster_Behavior.cpp
@@ -60,7 +60,7 @@ PSX::PxControllerBehaviorFlags CCallBack_Monster_Behavior::getBehaviorFlags(cons
PSX::PxControllerBehaviorFlags CCallBack_Monster_Behavior::getBehaviorFlags(const PSX::PxController& controller)
{
// CCT끼리 부딪힐 때를 굳이 안 쓰면 0 리턴
- return PSX::PxControllerBehaviorFlags(0);
+ return PSX::PxControllerBehaviorFlag::eCCT_SLIDE;
}
PSX::PxControllerBehaviorFlags CCallBack_Monster_Behavior::getBehaviorFlags(const PSX::PxObstacle& obstacle)
@@ -93,5 +93,5 @@ HRESULT CCallBack_Monster_Behavior::Finalize()
CCallBack_Monster_Behavior* CCallBack_Monster_Behavior::Create()
{
- return new CCallBack_Monster_Behavior();;
+ return new CCallBack_Monster_Behavior();
}
diff --git a/Jusin154_Team3D/Client/Private/CallBack_Monster_HitReport.cpp b/Jusin154_Team3D/Client/Private/CallBack_Monster_HitReport.cpp
index 9cc701393..01f1a3bfa 100644
--- a/Jusin154_Team3D/Client/Private/CallBack_Monster_HitReport.cpp
+++ b/Jusin154_Team3D/Client/Private/CallBack_Monster_HitReport.cpp
@@ -111,10 +111,10 @@ void CCallBack_Monster_HitReport::onControllerHit(const PSX::PxControllersHit& h
void CCallBack_Monster_HitReport::onObstacleHit(const PSX::PxControllerObstacleHit& hit)
{
PSX::PxController* pController = hit.controller;
- PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점
- PSX::PxVec3 vWorldNormal = hit.worldNormal; // 접촉노말
- PSX::PxVec3 vDir = hit.dir; // 시도한 move 방향
- _float fLength = hit.length; // 시도한 move 길이
+ PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점
+ PSX::PxVec3 vWorldNormal = hit.worldNormal; // 접촉노말
+ PSX::PxVec3 vDir = hit.dir; // 시도한 move 방향
+ _float fLength = hit.length; // 시도한 move 길이
const void* pOtherController = hit.userData; // 장애물
diff --git a/Jusin154_Team3D/Client/Private/CallBack_Playable_Behavior.cpp b/Jusin154_Team3D/Client/Private/CallBack_Playable_Behavior.cpp
index b74143b2f..28678a758 100644
--- a/Jusin154_Team3D/Client/Private/CallBack_Playable_Behavior.cpp
+++ b/Jusin154_Team3D/Client/Private/CallBack_Playable_Behavior.cpp
@@ -60,7 +60,7 @@ PSX::PxControllerBehaviorFlags CCallBack_Playable_Behavior::getBehaviorFlags(con
PSX::PxControllerBehaviorFlags CCallBack_Playable_Behavior::getBehaviorFlags(const PSX::PxController& controller)
{
// CCT끼리 부딪힐 때를 굳이 안 쓰면 0 리턴
- return PSX::PxControllerBehaviorFlags(0);
+ return PSX::PxControllerBehaviorFlag::eCCT_SLIDE;
}
PSX::PxControllerBehaviorFlags CCallBack_Playable_Behavior::getBehaviorFlags(const PSX::PxObstacle& obstacle)
diff --git a/Jusin154_Team3D/Client/Private/Dummy_PhysXPlayable.cpp b/Jusin154_Team3D/Client/Private/Dummy_PhysXPlayable.cpp
index e65029f2e..7a34e1158 100644
--- a/Jusin154_Team3D/Client/Private/Dummy_PhysXPlayable.cpp
+++ b/Jusin154_Team3D/Client/Private/Dummy_PhysXPlayable.cpp
@@ -126,7 +126,7 @@ HRESULT CDummy_PhysXPlayable::Ready_Components(void* pArg)
Desc.iSubKind = pDesc->iSubKind;
Desc.pTransform = m_pTransformCom;
Desc.eBodyType = ACTOR::CAPSULE;
- Desc.fContactOffset = 0.1f;
+ Desc.fContactOffset = 0.001f;
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
Desc.bAutoStepping = { false };
Desc.fStepOffset = { 0.05f };
diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp
index 7dcecb132..b0de40811 100644
--- a/Jusin154_Team3D/Client/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp
@@ -122,7 +122,6 @@ HRESULT CEffectPool::Bind_ShaderResources()
HRESULT CEffectPool::Ready_Effect()
{
-#ifndef 기무리
if(FAILED(Create_Effect(SKILL_TYPE::JAP, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
CNomalJap* pEffect = nullptr;
@@ -168,7 +167,6 @@ HRESULT CEffectPool::Ready_Effect()
return pEffect; }
))) return E_FAIL;
-
if (FAILED(Create_Effect(SKILL_TYPE::JAP_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
CNomalJapSide* pEffect = nullptr;
@@ -226,10 +224,6 @@ HRESULT CEffectPool::Ready_Effect()
return pEffect; }
))) return E_FAIL;
-#endif // 기무리
-
-
-
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp
index a940e626d..bb92f4009 100644
--- a/Jusin154_Team3D/Client/Private/Goblin.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin.cpp
@@ -185,18 +185,13 @@ _vector CGoblin::Get_LockOnPos()
void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
{
+ if (true == m_bDead) {
+ return;
+ }
ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
- _vector vWorldPos = {}; // 접촉지점
- _vector vWorldNomal = {}; // 접촉노말
- _vector vHitDir = {}; // 시도한 move 방향
- _float fLength = {}; // 작용된 힘
- //m_pCharacter_Controller->ConvertToDO(*m_pRigidBody);
- //m_pRigidBody->Add_Force(vHitDir * fLength * 10000.f, PSX::PxForceMode::eFORCE);
-
- //m_pCharacter_Controller->ConvertToDO(*m_pRigidBody);
- //m_pRigidBody->Add_Force(vHitDir * fLength * 100.f, PSX::PxForceMode::eIMPULSE);
_uint iSkillType = dynamic_cast(pOther)->Get_SkillType();
+ m_fHitRadius = CMyTools::Get_Direction2D(m_pTransformCom->Get_State(STATE::LOOK), XMLoadFloat4(&CollisionDesc->vHitDir));
switch (iSkillType)
{
case ENUM_CLASS(SKILL_TYPE::DESCENDO):
@@ -207,6 +202,10 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
break;
case ENUM_CLASS(SKILL_TYPE::JAP):
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
+ if (true == Get_Damage(60.f)) {
+ m_pFSM->Change_State(FSMSTATE::DEAD);
+ return;
+ }
break;
case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
@@ -215,8 +214,9 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
break;
}
- if (!m_pFSM->IsEnable(FSMSTATE::BLINK))
+ if (!m_pFSM->IsEnable(FSMSTATE::BLINK)){
m_pFSM->Change_State(FSMSTATE::HIT);
+ }
}
@@ -248,7 +248,7 @@ HRESULT CGoblin::Ready_Components()
Desc.iSubKind = ENUM_CLASS(PXOBJECT::GOBLIN_WARRIOR);
Desc.pTransform = m_pTransformCom;
Desc.eBodyType = ACTOR::CAPSULE;
- Desc.fContactOffset = 0.3f;
+ Desc.fContactOffset = 0.001f;
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
Desc.bAutoStepping = { false };
Desc.fStepOffset = { 0.05f };
@@ -272,6 +272,9 @@ HRESULT CGoblin::Ready_Components()
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor());
}
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_GOBLIN"), (CComponent**)&m_pStat))) {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Goblin_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_States.cpp
index f3fd39800..e680861ed 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_States.cpp
@@ -16,6 +16,7 @@
#include "State_Throw.h"
#include "State_Blink.h"
#include "State_Hit.h"
+#include "State_Dead.h"
#pragma endregion
@@ -338,6 +339,60 @@ void CGoblin::Behavior_HitExit()
m_pFSM->Disable_State(FSMSTATE::HIT);
}
+void CGoblin::Behavior_DeadEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::DEAD);
+
+ _bool bStrongerKnockDown = { false };
+
+ switch (m_eHitSpell)
+ {
+ case STATEANIM::KNOCKDOWN_FWD:
+ bStrongerKnockDown = true;
+ break;
+ case STATEANIM::TUMBLE2:
+ bStrongerKnockDown = true;
+ break;
+ default:
+ break;
+ }
+
+ _float fabsRadius = fabsf(m_fHitRadius);
+ _uint iState = { UINT_MAX };
+
+ if (fabsRadius > 135.f) {
+ iState = STATEANIM::DEAD_BWD;
+ }
+ else if (fabsRadius < 45.f) {
+ iState = STATEANIM::DEAD_FWD;
+ }
+ else {
+ if (m_fHitRadius < 0.f) {
+ iState = STATEANIM::DEAD_R;
+ }
+ else {
+ iState = STATEANIM::DEAD_L;
+ }
+ }
+ pairAnimInfo = m_Animation[iState + bStrongerKnockDown];
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CGoblin::Behavior_DeadExitCheck(_float fTimeDelta)
+{
+ if (true == m_pModelCom->IsFinishedAnim()) {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CGoblin::Behavior_DeadExit()
+{
+ m_bDead = true;
+}
+
void CGoblin::Add_FSM()
{
@@ -374,7 +429,6 @@ void CGoblin::Add_FSM()
Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::COMBAT, CState_Combat::Create(&Desc));
}
-
{
CState_Swing::STATE_SWING_DESC Desc{};
Desc.pOwner = this;
@@ -385,7 +439,6 @@ void CGoblin::Add_FSM()
Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::SWING, CState_Swing::Create(&Desc));
}
-
{
CState_Throw::STATE_THROW_DESC Desc{};
Desc.pOwner = this;
@@ -396,7 +449,6 @@ void CGoblin::Add_FSM()
Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::SKILL, CState_Throw::Create(&Desc));
}
-
{
CState_Blink::STATE_BLINK_DESC Desc{};
Desc.pOwner = this;
@@ -409,7 +461,14 @@ void CGoblin::Add_FSM()
}
#pragma endregion
#pragma region Behavior_Combat_Focus
-
+ {
+ CState_Dead::STATE_DEAD_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_DeadEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_DeadExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_DeadExit(); };
+ m_States.emplace(FSMSTATE::DEAD, CState_Dead::Create(&Desc));
+ }
#pragma endregion
#pragma region Hit
diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
index 6256f0af1..26265cc4c 100644
--- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp
+++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
@@ -48,7 +48,7 @@ HRESULT CInfoInstance::Regist_PlayerAlly(CUnit* pUnit)
HRESULT CInfoInstance::Deregist_PlayerAlly(CUnit* pUnit)
{
- if (nullptr == m_pMonsterInfo) {
+ if (nullptr == s_pInstance || nullptr == m_pMonsterInfo) {
return S_OK; // 게임 종료 된 상태
}
return m_pMonsterInfo->Deregist_PlayerAlly(pUnit);
@@ -61,7 +61,7 @@ HRESULT CInfoInstance::Regist_ActiveMonster(CMonster* pUnit)
HRESULT CInfoInstance::Deregist_ActiveMonster(CMonster* pUnit)
{
- if (nullptr == m_pMonsterInfo) {
+ if (nullptr == s_pInstance || nullptr == m_pMonsterInfo) {
return S_OK; // 게임 종료 된 상태
}
return m_pMonsterInfo->Deregist_ActiveMonster(pUnit);
diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
index 25818fe76..1944c2aa9 100644
--- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
@@ -161,96 +161,102 @@ HRESULT CLevel_GamePlay::Ready_Background()
/* Map Containters */
/* 테스트용 맵 */
- //CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
+ CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
/* 전체 맵 */
- //CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
+ CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
- ///* 조명 오브젝트 */
- //CInfoInstance::GetInstance()->Load_LightElements("LightElement");
+ /* 조명 오브젝트 */
+ CInfoInstance::GetInstance()->Load_LightElements("LightElement");
- ///* 상호작용 오브젝트 */
- //CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel");
- //CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_PostPackage_B");
- //CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_PostPackage_F");
- //CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopTable");
- //CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopChair");
+ /* 상호작용 오브젝트 */
+ CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel");
+ CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_PostPackage_B");
+ CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_PostPackage_F");
+ CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopTable");
+ CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopChair");
- //CInstancedProp::INSTANCE_PROP_DESC Desc = {};
+ CInstancedProp::INSTANCE_PROP_DESC Desc = {};
- ///* InstanceProp Oak_Tree*/
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
- // return E_FAIL;
+ /* InstanceProp Oak_Tree*/
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
+ return E_FAIL;
+ }
+
+ /* BearBerry */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
+ return E_FAIL;
+ }
+
+ /* SM_HM_OwlPost_Window_A */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ ///* WA_Rectangle_Double_A */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ ///* WC_Retangle_Double_A */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ ///* WA_Square_Double_C */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ /* Quid_Window_A */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ /* Ollivanders_Box_Window */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ /* WC_L_DoubleS_A */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ /* WC_Round_Double_A */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ /* SM_HM_Door1a */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ /* SM_HM_Door1a */
+ Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
+ Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ return E_FAIL;
+
+ // /* SM_HM_Door1a */
+ // Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
+ // Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
+ // if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
+ // return E_FAIL;
//}
-
- ///* BearBerry */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
- // return E_FAIL;
- //}
-
- ///* SM_HM_OwlPost_Window_A */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
- /////* WA_Rectangle_Double_A */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
- /////* WC_Retangle_Double_A */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
- /////* WA_Square_Double_C */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
- ///* Quid_Window_A */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
- ///* Ollivanders_Box_Window */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
- ///* WC_L_DoubleS_A */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
- ///* WC_Round_Double_A */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
- ///* SM_HM_Door1a */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
- ///* SM_HM_Door1a */
- //Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
- //Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
- // return E_FAIL;
-
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 79f95116b..0be783738 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -277,289 +277,288 @@ HRESULT CLoader::Loading_For_GamePlay()
#pragma region MAP_MODELS
vector*>> jobMapModels;
-// {
-// { /* Terrain */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Terrain",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Terrain",
-// ".bin", false
-// ));
-// }
-//
-// { /* Ollivanders*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Collision",
-// ".bin", false
-// ));
-// }
-//
-// { /* Gatehouse*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Gatehouse/Meshes",
-// ".bin", false
-// ));
-// }
-//
-// { /* TScrolls */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Collisions",
-// ".bin", false
-// ));
-// }
-// { /* 3BroomStick*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Collision",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes/3Broom_Kit",
-// ".bin", false
-// ));
-// }
-//
-//
-// { /* BLDG_QuidditchShop */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Collision",
-// ".bin", false
-// ));
-// }
-// { /* BLDG_HogsheadInn */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision",
-// ".bin", false
-// ));
-// }
-// { /* BLDG_Honeydukes */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Collision",
-// ".bin", false
-// ));
-// }
-// { /* BLDG_OwlPost */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Collision",
-// ".bin", false
-// ));
-// }
-// { /* BLDG_TeaShop */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Collision",
-// ".bin", false
-// ));
-// }
-// { /* BLDG_Zonkos */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Collision",
-// ".bin", false
-// ));
-// }
-// { /* BLDG_DB_GR */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Collision",
-// ".bin", false
-// ));
-// }
-// { /* BLDG_Potions */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions",
-// ".bin", false
-// ));
-// }
-// { /* BLDG_Salon */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Collision",
-// ".bin", false
-// ));
-// }
-// { /* Hengist_Tree */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Vegetation/Hengist_Tree",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Vegetation",
-// ".bin", false
-// ));
-// }
-// { /* GEN A*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Collision",
-// ".bin", false
-// ));
-// }
-// { /* GEN B*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Collision",
-// ".bin", false
-// ));
-// }
-// { /* GEN C*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Collision",
-// ".bin", false
-// ));
-// }
-// { /* GEN E*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Collision",
-// ".bin", false
-// ));
-// }
-// { /* GEN F*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Collision",
-// ".bin", false
-// ));
-// }
-// { /* GEN G*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Collision",
-// ".bin", false
-// ));
-// }
-// { /* GEN H*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Collision",
-// ".bin", false
-// ));
-// }
-// { /* GEN J*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Meshes",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Collision",
-// ".bin", false
-// ));
-// }
-// {/* Light Objects */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/LightPosts",
-// ".bin", false
-// ));
-// }
-// {/* Doors */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Doors",
-// ".bin", false
-// ));
-// }
-// {/* Step and Stair */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/GroundSurfaces",
-// ".bin", false
-// ));
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/GroundSurfaces",
-// ".bin", false
-// ));
-// }
-// {/* Barrel */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Objects/Meshes",
-// ".bin", false
-// ));
-// /* Box */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/MiscProps",
-// ".bin", false
-// ));
-// /* TeaShop Table */
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Tables",
-// ".bin", false
-// ));
-// /* TeaShop Chair*/
-// jobMapModels.emplace_back(Deferred_FolderLoad(
-// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Chairs",
-// ".bin", false
-// ));
-// }
-// }
-//
-//#pragma endregion
+ {
+ { /* Terrain */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Terrain",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Terrain",
+ ".bin", false
+ ));
+ }
+ { /* Ollivanders*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Collision",
+ ".bin", false
+ ));
+ }
+
+ { /* Gatehouse*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Gatehouse/Meshes",
+ ".bin", false
+ ));
+ }
+
+ { /* TScrolls */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Collisions",
+ ".bin", false
+ ));
+ }
+ { /* 3BroomStick*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Collision",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes/3Broom_Kit",
+ ".bin", false
+ ));
+ }
+
+
+ { /* BLDG_QuidditchShop */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Collision",
+ ".bin", false
+ ));
+ }
+ { /* BLDG_HogsheadInn */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision",
+ ".bin", false
+ ));
+ }
+ { /* BLDG_Honeydukes */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Collision",
+ ".bin", false
+ ));
+ }
+ { /* BLDG_OwlPost */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Collision",
+ ".bin", false
+ ));
+ }
+ { /* BLDG_TeaShop */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Collision",
+ ".bin", false
+ ));
+ }
+ { /* BLDG_Zonkos */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Collision",
+ ".bin", false
+ ));
+ }
+ { /* BLDG_DB_GR */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Collision",
+ ".bin", false
+ ));
+ }
+ { /* BLDG_Potions */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions",
+ ".bin", false
+ ));
+ }
+ { /* BLDG_Salon */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Collision",
+ ".bin", false
+ ));
+ }
+ { /* Hengist_Tree */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Vegetation/Hengist_Tree",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Vegetation",
+ ".bin", false
+ ));
+ }
+ { /* GEN A*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Collision",
+ ".bin", false
+ ));
+ }
+ { /* GEN B*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Collision",
+ ".bin", false
+ ));
+ }
+ { /* GEN C*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Collision",
+ ".bin", false
+ ));
+ }
+ { /* GEN E*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Collision",
+ ".bin", false
+ ));
+ }
+ { /* GEN F*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Collision",
+ ".bin", false
+ ));
+ }
+ { /* GEN G*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Collision",
+ ".bin", false
+ ));
+ }
+ { /* GEN H*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Collision",
+ ".bin", false
+ ));
+ }
+ { /* GEN J*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Meshes",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Collision",
+ ".bin", false
+ ));
+ }
+ {/* Light Objects */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/LightPosts",
+ ".bin", false
+ ));
+ }
+ {/* Doors */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Doors",
+ ".bin", false
+ ));
+ }
+ {/* Step and Stair */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/GroundSurfaces",
+ ".bin", false
+ ));
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/GroundSurfaces",
+ ".bin", false
+ ));
+ }
+ {/* Barrel */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Objects/Meshes",
+ ".bin", false
+ ));
+ /* Box */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/MiscProps",
+ ".bin", false
+ ));
+ /* TeaShop Table */
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Tables",
+ ".bin", false
+ ));
+ /* TeaShop Chair*/
+ jobMapModels.emplace_back(Deferred_FolderLoad(
+ "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Chairs",
+ ".bin", false
+ ));
+ }
+ }
+
+#pragma endregion
#pragma region UI
@@ -1009,7 +1008,7 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
/* Terrain_AlphaMap */
- if(FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HogsmeadeAlphaMap"),
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HogsmeadeAlphaMap"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Terrain/Hogsmeade_AlphaMap.dds"), 0)))) {
return E_FAIL;
}
@@ -1651,7 +1650,7 @@ HRESULT CLoader::Loading_For_GamePlay()
Desc.ePxRigidBodyFlags = {};
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
- Desc.fContactOffset = 0.f;
+ Desc.fContactOffset = 0.001f;
Desc.vMatInfo = { 1.2f, 1.0f, 0.0f };
}
CRigidBody_Static* pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
@@ -1796,6 +1795,11 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTroll::Create(m_pDevice, m_pContext))))
return E_FAIL;
+#pragma endregion
+#pragma region STAT PROTOTYPE
+ if (FAILED(Stat_FileLoad("../Bin/Resources/Data/Stat/Stat.xml"))) {
+ return E_FAIL;
+ }
#pragma endregion
@@ -1858,28 +1862,28 @@ HRESULT CLoader::Loading_For_GamePlay()
#pragma region RECEIVE_THREAD
- //{ // MapModels
- // _uint iIndex = 0;
- // for (auto& JobMapModels : jobMapModels)
- // {
- // vector* pOut = JobMapModels.get();
- // for (_uint i = 0; i < pOut->size(); ++i) {
- // FOLDER_LOAD* pContents = (*pOut)[i];
- // if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) {
- // return E_FAIL;
- // }
+ { // MapModels
+ _uint iIndex = 0;
+ for (auto& JobMapModels : jobMapModels)
+ {
+ vector* pOut = JobMapModels.get();
+ for (_uint i = 0; i < pOut->size(); ++i) {
+ FOLDER_LOAD* pContents = (*pOut)[i];
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) {
+ return E_FAIL;
+ }
- // for (_uint j = 0; j < pContents->pRigidBodyTags.size(); ++j) {
- // if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[j], pContents->LoadedRigidBody[j]))) {
- // return E_FAIL;
- // }
- // }
- // Safe_Delete(pContents);
- // }
- // iIndex++;
- // Safe_Delete(pOut);
- // }
- //}
+ for (_uint j = 0; j < pContents->pRigidBodyTags.size(); ++j) {
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[j], pContents->LoadedRigidBody[j]))) {
+ return E_FAIL;
+ }
+ }
+ Safe_Delete(pContents);
+ }
+ iIndex++;
+ Safe_Delete(pOut);
+ }
+ }
#pragma endregion
m_strMessage = TEXT("정보를 불러오는 중입니다.");
@@ -1958,6 +1962,34 @@ HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreN
return S_OK;
}
+HRESULT CLoader::Stat_FileLoad(const _char* pDirectoryPath)
+{
+ filesystem::path pathStatFile = pDirectoryPath;
+
+ tinyxml2::XMLDocument doc;
+ tinyxml2::XMLError Error = doc.LoadFile(pathStatFile.string().c_str());
+ if (Error != tinyxml2::XML_SUCCESS) {
+ return E_FAIL;
+ }
+
+ tinyxml2::XMLElement* pStatInfo = doc.FirstChildElement("StatInfo");
+ if (!pStatInfo) {
+ return E_FAIL;
+ }
+
+ _uint iNumChild = pStatInfo->ChildElementCount();
+ tinyxml2::XMLNode* pChild = pStatInfo->FirstChildElement();
+ for (_uint i = 0; i < iNumChild; ++i) {
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(pChild->Value()),
+ CStat::Create(m_pDevice, m_pContext, pChild)))) {
+ return E_FAIL;
+ }
+ pChild = pChild->NextSiblingElement();
+ }
+
+ return S_OK;
+}
+
vector* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag)
{
if (FAILED(CoInitializeEx(nullptr, 0))) {
@@ -1976,7 +2008,7 @@ vector* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, I
if (strcmp(file.path().extension().string().c_str(), pFileExt)) { continue; }
FOLDER_LOAD* pContents = new FOLDER_LOAD;
-
+
{ // FOLDER_LOAD
_char szFilePath[MAX_PATH] = {};
strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str());
@@ -1984,7 +2016,7 @@ vector* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, I
_wstring wstrFileName = L"Prototype_GameObject_" + file.path().stem().wstring();
CModel* pModel = CModel::Create(pDevice, pContext, MODEL::ENVIROMENT, szFilePath);
-
+
_uint iNumMesh = pModel->Get_NumMeshes();
{
@@ -2005,7 +2037,7 @@ vector* APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, I
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
- Desc.fContactOffset = 0.f;
+ Desc.fContactOffset = 0.001f;
}
pContents->pRigidBodyTags.emplace_back(CMyTools::ToWstring(pModel->Get_MeshName(i) + to_string(i)).c_str());
diff --git a/Jusin154_Team3D/Client/Private/Magic_Item.cpp b/Jusin154_Team3D/Client/Private/Magic_Item.cpp
index f45a1d180..97b757598 100644
--- a/Jusin154_Team3D/Client/Private/Magic_Item.cpp
+++ b/Jusin154_Team3D/Client/Private/Magic_Item.cpp
@@ -47,6 +47,8 @@ HRESULT CMagic_Item::Initialize(void* pArg)
m_iArratCount = 2;
Compute_UV(0);
Compute_Image();
+ m_fFontX = 1171.f;
+ m_fFontY = 870.f;
m_iPotionIndex = 0;
m_iPerPotionIndex = -1;
return S_OK;
diff --git a/Jusin154_Team3D/Client/Private/Monster.cpp b/Jusin154_Team3D/Client/Private/Monster.cpp
index 9df271243..7b4184203 100644
--- a/Jusin154_Team3D/Client/Private/Monster.cpp
+++ b/Jusin154_Team3D/Client/Private/Monster.cpp
@@ -119,6 +119,16 @@ void CMonster::Set_DrawOutLine()
m_bDrawOutLine = true;
}
+_bool CMonster::Get_Damage(_float fDamage)
+{
+ return m_pStat->Get_Damage(fDamage);
+}
+
+_float2 CMonster::Get_Hp()
+{
+ return { m_pStat->Get_Stat(ENUM_CLASS(STAT::HP)), m_pStat->Get_Stat(ENUM_CLASS(STAT::MAXHP)) };
+}
+
HRESULT CMonster::Ready_Components(void*pArg)
{
__super::Ready_Components(pArg);
@@ -149,6 +159,7 @@ void CMonster::Free()
{
__super::Free();
+ SAFE_RELEASE(m_pStat);
SAFE_RELEASE(m_pTarget);
if (nullptr != m_pInfoInstance){
CInfoInstance* pInfo = m_pInfoInstance;
diff --git a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp
index 88190cd7a..51100c7b8 100644
--- a/Jusin154_Team3D/Client/Private/MonsterInfo.cpp
+++ b/Jusin154_Team3D/Client/Private/MonsterInfo.cpp
@@ -12,8 +12,8 @@ void CMonsterInfo::Update(_float fTimeDelta)
{
Refresh_PlayerAllies();
Refresh_LockOnMonsters();
+ Refresh_ActiveMonsters();
}
-
void CMonsterInfo::Change_Level()
{
SAFE_RELEASE(m_pLockOnMonster);
@@ -124,7 +124,11 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
for (list::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter) {
// (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상
- vMonsterPos = (*iter)->Get_WorldPostion();
+ CMonster* pMonster = (*iter);
+ if (pMonster->Get_Hp().x <= 0) {
+ continue;
+ }
+ vMonsterPos = pMonster->Get_WorldPostion();
vToMonsterDir = vMonsterPos - vCameraPos;
_float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir);
if (fDotResult <= cosf(fFovy)) {
@@ -132,13 +136,13 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
}
if (nullptr == m_pLockOnMonster) {
- m_pLockOnMonster = (*iter);
+ m_pLockOnMonster = pMonster;
fMaxDot = fDotResult;
continue;
}
if (fMaxDot < fDotResult) {
- m_pLockOnMonster = (*iter);
+ m_pLockOnMonster = pMonster;
fMaxDot = fDotResult;
}
}
@@ -149,6 +153,22 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
return S_OK;
}
+HRESULT CMonsterInfo::Refresh_ActiveMonsters()
+{
+ list::iterator iter = m_ActiveMonsters.begin();
+ for (; iter != m_ActiveMonsters.end();) {
+ if (true == (*iter)->isDead()) {
+ SAFE_RELEASE(*iter);
+ iter = m_ActiveMonsters.erase(iter);
+ }
+ else {
+ ++iter;
+ }
+ }
+ return S_OK;
+}
+
+
HRESULT CMonsterInfo::Refresh_PlayerAllies()
{
for (list::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end();) {
diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp
index 150f467bf..502976a40 100644
--- a/Jusin154_Team3D/Client/Private/NomalJap.cpp
+++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp
@@ -119,26 +119,39 @@ void CNomalJap::Update(_float fTimeDelta)
void CNomalJap::Late_Update(_float fTimeDelta)
{
- if (m_bVisible == false) {
+ if (false == m_bVisible) {
return;
}
+ if (false == m_bHit) {
+ SweepTarget();
+ }
+ Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta);
+ __super::Late_Update(fTimeDelta);
+}
+
+void CNomalJap::SweepTarget()
+{
_vector vStartPos = m_pProjectile->Get_WorldPostion();
-
_vector vEndPos = XMLoadFloat4(&m_vTargetPos);
-
_vector vDir = { vEndPos - vStartPos };
_float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
PSX::PxSweepBuffer pxBuffer = {};
- _bool bHit = m_pGameInstance->SphereCast(0.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
+ _bool bHit = m_pGameInstance->SphereCast(0.002f, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
if (bHit) {
const PSX::PxSweepHit& hit = pxBuffer.block;
PSX::PxRigidActor* pActor = hit.actor;
PSX::PxShape* pShape = hit.shape;
+ ON_COLLISION_INFO tagCollInfo = {};
+ memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
+ memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
+ XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
+ tagCollInfo.fLength = fDistance;
+
if (nullptr != pActor && nullptr != pActor->userData)
{
@@ -151,14 +164,17 @@ void CNomalJap::Late_Update(_float fTimeDelta)
switch (PXOBJECT(pUserData->iSubKind))
{
case PXOBJECT::MONSTER:
+ break;
case PXOBJECT::GOBLIN_WARRIOR:
{
- pUserData->pOwner->OnCollision(this);
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
}
- break;
+ break;
case PXOBJECT::TROLL:
{
- pUserData->pOwner->OnCollision(this);
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
}
break;
}
@@ -166,11 +182,6 @@ void CNomalJap::Late_Update(_float fTimeDelta)
}
}
}
-
- Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta);
-
-
- __super::Late_Update(fTimeDelta);
}
HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg)
@@ -186,7 +197,6 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg)
XMStoreFloat4(&m_vStartPos, vStartPos);
/* 초기 객체 위치 초기화 */
-
m_pProjectile->Get_Component()->Set_State(STATE::POSITION, vStartPos);
m_pProjectile_Side->Get_Component()->Set_State(STATE::POSITION, vStartPos);
@@ -213,7 +223,7 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg)
{ /* 대상 위치 지정 */
-
+ m_bHit = false;
CUnit* pTargetUnit = m_pInfoInstance->Get_LockOnUnit();
if (nullptr != pTargetUnit) {
XMStoreFloat4(&m_vTargetPos, pTargetUnit->Get_LockOnPos());
@@ -222,8 +232,6 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg)
XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f);
}
XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
-
-
}
else {
// 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정
@@ -314,11 +322,13 @@ void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc)
{
int iIndex = CollisionCheck();
- if (iIndex < 0)
+ if (iIndex < 0){
return;
+ }
- if (m_isCollisionEnter == true)
+ if (m_isCollisionEnter == true){
return;
+ }
m_isCollisionEnter = true;
diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp
index 911d7e028..ef120d229 100644
--- a/Jusin154_Team3D/Client/Private/Player.cpp
+++ b/Jusin154_Team3D/Client/Private/Player.cpp
@@ -150,8 +150,13 @@ void CPlayer::Late_Update(_float fTimeDelta)
__super::Late_Update(fTimeDelta);
- if (nullptr != m_pLockOnMonster && false == m_pLockOnMonster->isDead()) {
- static_cast(m_pLockOnMonster)->Set_DrawOutLine();
+ if (nullptr != m_pLockOnMonster) {
+ if (false == m_pLockOnMonster->isDead()) {
+ static_cast(m_pLockOnMonster)->Set_DrawOutLine();
+ }
+ else {
+ m_pLockOnMonster = nullptr;
+ }
}
}
@@ -321,6 +326,10 @@ HRESULT CPlayer::Ready_Components()
return E_FAIL;
}
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_PLAYER"), (CComponent**)&m_pStat))) {
+ return E_FAIL;
+ }
+
{ // CCT
CCharacter_Controller::Character_Controller_DESC Desc{};
@@ -492,6 +501,7 @@ void CPlayer::Free()
SAFE_RELEASE(m_pCharacter_Controller);
SAFE_RELEASE(m_pRigidBody);
SAFE_RELEASE(m_pLightCom);
+ SAFE_RELEASE(m_pStat);
Safe_Delete(m_pCallBack_Behavior);
Safe_Delete(m_pCallBack_HitReport);
SAFE_RELEASE(m_pCamPosition_TopDown_FollowPart);
diff --git a/Jusin154_Team3D/Client/Private/Potion.cpp b/Jusin154_Team3D/Client/Private/Potion.cpp
index fca73400c..d5b9dd923 100644
--- a/Jusin154_Team3D/Client/Private/Potion.cpp
+++ b/Jusin154_Team3D/Client/Private/Potion.cpp
@@ -42,6 +42,8 @@ HRESULT CPotion::Initialize(void* pArg)
m_fAlphaTime = 1.f;
m_vImageSlotPos = _float2(45.f, 45.f);
m_vImageSize = _float2(32.f, 32.f);
+ m_fFontX = 1163.f;
+ m_fFontY = 860.f;
m_iPotionIndex = 0;
m_iPerPotionIndex = -1;
return S_OK;
diff --git a/Jusin154_Team3D/Client/Private/Skill_Data.cpp b/Jusin154_Team3D/Client/Private/Skill_Data.cpp
index d41ded389..ad7cbb26a 100644
--- a/Jusin154_Team3D/Client/Private/Skill_Data.cpp
+++ b/Jusin154_Team3D/Client/Private/Skill_Data.cpp
@@ -96,33 +96,35 @@ HRESULT CSkill_Data::Load_SpellInfo(const _char* pFilePath)
int id = 0;
pSpell->QueryIntAttribute("Spell_ID", &id);
- if (id < 0 || id > 34)
+ if (id >= 0 && id <= 34)
{
- pSpell = pSpell->NextSiblingElement("Spell");
- continue;
+ 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);
+ SpellInfo[id].pType_Name = CMyTools::ToWstring(pSpell->Attribute("Type_Name"));
+ pSpell->QueryIntAttribute("Skill_Type", &SpellInfo[id].iSkill_Type);
+ pSpell->QueryFloatAttribute("Spell_Damage", &SpellInfo[id].fSpell_Damage);
+ 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, use = 0;
+ pSpell->QueryIntAttribute("Spell_Lock", &lock);
+ pSpell->QueryIntAttribute("Equip_Spell", &equip);
+ pSpell->QueryIntAttribute("Use_Skill", &use);
+ SpellInfo[id].bSpell_Lock = lock != 0;
+ SpellInfo[id].bEquip_Spell = equip != 0;
+ SpellInfo[id].bUse_Skill = use != 0;
+ pSpell->QueryFloatAttribute("Preview", &SpellInfo[id].fPreview);
+ pSpell->QueryFloatAttribute("Vidio", &SpellInfo[id].fVidio);
+
+ m_iSpell_Count++;
+ m_iSpell_CoolTime[id] = 1.2f;
}
- 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);
- SpellInfo[id].pType_Name = CMyTools::ToWstring(pSpell->Attribute("Type_Name"));
- pSpell->QueryIntAttribute("Skill_Type", &SpellInfo[id].iSkill_Type);
- pSpell->QueryFloatAttribute("Spell_Damage", &SpellInfo[id].fSpell_Damage);
- 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, use = 0;
- pSpell->QueryIntAttribute("Spell_Lock", &lock);
- pSpell->QueryIntAttribute("Equip_Spell", &equip);
- pSpell->QueryIntAttribute("Use_Skill", &use);
- SpellInfo[id].bSpell_Lock = lock != 0;
- SpellInfo[id].bEquip_Spell = equip != 0;
- SpellInfo[id].bUse_Skill = use != 0;
+ // 항상 다음 Spell로 이동
pSpell = pSpell->NextSiblingElement("Spell");
- m_iSpell_Count++;
- m_iSpell_CoolTime[id] = 1.2f;
}
return S_OK;
diff --git a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp
index b740afb13..6b0fe06a0 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp
@@ -45,8 +45,9 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
m_fAlphaTime = 5.f;
m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f);
m_fTopY = m_fY - m_vScale.y * 0.5f;
+ m_fOriginOffSet = 280.f;
SizeUpX(512.f);
- SizeUpY(280.f);
+ SizeUpY(m_fOriginOffSet);
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
m_fSortZ = 0.02f;
static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
@@ -104,6 +105,7 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_iSpellType != -1)
{
m_pSpell_Info = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pSpellInfo;
+ m_fOriginOffSet = m_pInfoInstance->Get_Spell_Info(m_iSpellType).fPreview;
}
m_fTime += fTimeDelta * m_fTimeMult;
@@ -139,7 +141,7 @@ HRESULT CSpell_Preview::Render()
if (m_bHover == true)
{
- m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, m_fFontY + m_fY));
+ m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, m_fFontY + m_fY - (m_fPreviewOffSet - m_fOriginOffSet) * 0.5f));
}
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp
index be702f1fb..7521a2e79 100644
--- a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp
+++ b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp
@@ -44,6 +44,7 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg)
m_fLerpX = m_fX;
m_fLerpY = 45;
m_bStart = false;
+
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(); });
diff --git a/Jusin154_Team3D/Client/Private/State_Dead.cpp b/Jusin154_Team3D/Client/Private/State_Dead.cpp
new file mode 100644
index 000000000..14e11a7ec
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/State_Dead.cpp
@@ -0,0 +1,56 @@
+#include "pch.h"
+#include "State_Dead.h"
+#include "Unit.h"
+
+
+CState_Dead::CState_Dead()
+ :CState_Root()
+{
+}
+
+void CState_Dead::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Dead::Update(_float fTimeDelta)
+{
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CState_Dead::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Dead::Initialize(STATE_DEAD_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Dead* CState_Dead::Create(STATE_DEAD_DESC* pDesc)
+{
+ CState_Dead* pInstance = new CState_Dead;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Dead::Free()
+{
+ __super::Free();
+}
+
+void CState_Dead::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp
index 688561087..fd6aa35af 100644
--- a/Jusin154_Team3D/Client/Private/Troll.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll.cpp
@@ -275,6 +275,9 @@ HRESULT CTroll::Ready_Components()
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor());
}
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_TROLL"), (CComponent**)&m_pStat))) {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h
index ee8a9e757..a3c50003b 100644
--- a/Jusin154_Team3D/Client/Public/Client_Struct.h
+++ b/Jusin154_Team3D/Client/Public/Client_Struct.h
@@ -32,5 +32,7 @@ namespace Client
_bool bSpell_Lock = false;
_bool bEquip_Spell = false;
_bool bUse_Skill = false;
+ _float fPreview{};
+ _float fVidio{};
}SPELL_INFO;
};
diff --git a/Jusin154_Team3D/Client/Public/Goblin.h b/Jusin154_Team3D/Client/Public/Goblin.h
index e70a6b496..3e467c587 100644
--- a/Jusin154_Team3D/Client/Public/Goblin.h
+++ b/Jusin154_Team3D/Client/Public/Goblin.h
@@ -67,7 +67,6 @@ class CGoblin final : public CMonster
_float m_fTpTime = {};
_float m_fAirTime = {};
-
void Behavior_IdleEnter();
HRESULT Behavior_IdleExitCheck();
void Behavior_IdleExit();
@@ -96,6 +95,10 @@ class CGoblin final : public CMonster
void Behavior_HitEnter();
HRESULT Behavior_HitExitCheck(_float fTimeDelta);
void Behavior_HitExit();
+
+ void Behavior_DeadEnter();
+ HRESULT Behavior_DeadExitCheck(_float fTimeDelta);
+ void Behavior_DeadExit();
};
NS_END
diff --git a/Jusin154_Team3D/Client/Public/Loader.h b/Jusin154_Team3D/Client/Public/Loader.h
index 86df14ee7..565eed6e8 100644
--- a/Jusin154_Team3D/Client/Public/Loader.h
+++ b/Jusin154_Team3D/Client/Public/Loader.h
@@ -40,8 +40,10 @@ class CLoader final : public CBase
private:
HRESULT Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function AddPrototypeEvent);
+ HRESULT Stat_FileLoad(const _char* pDirectoryPath);
future*> Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag);
future*> Deferred_ModelLoad(MODEL eType, const _char* pDirectoryPath, _fmatrix PreTransform, const _tchar* pPrototypeTag);
+
public:
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
virtual void Free() override;
diff --git a/Jusin154_Team3D/Client/Public/Monster.h b/Jusin154_Team3D/Client/Public/Monster.h
index 0a73f3783..84679bd8d 100644
--- a/Jusin154_Team3D/Client/Public/Monster.h
+++ b/Jusin154_Team3D/Client/Public/Monster.h
@@ -19,10 +19,13 @@ class CMonster abstract : public CUnit
virtual HRESULT Render_OutLine() override;
virtual void Set_DrawOutLine();
_float4 Get_TargetPos() { return m_vTargetPos; }
+ virtual _bool Get_Damage(_float fDamage);
+ virtual _float2 Get_Hp();
protected:
CInfoInstance* m_pInfoInstance = { nullptr };
CUnit* m_pTarget = { nullptr };
+ CStat* m_pStat = { nullptr };
_float4 m_vTargetPos = { };
_float3 m_vToTargetDir = { };
_float m_fTargetDistance = { FLT_MAX };
diff --git a/Jusin154_Team3D/Client/Public/MonsterInfo.h b/Jusin154_Team3D/Client/Public/MonsterInfo.h
index b45493079..f2c0672d0 100644
--- a/Jusin154_Team3D/Client/Public/MonsterInfo.h
+++ b/Jusin154_Team3D/Client/Public/MonsterInfo.h
@@ -42,6 +42,7 @@ class CMonsterInfo final : public CBase
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
HRESULT Refresh_LockOnMonsters();
HRESULT Refresh_PlayerAllies();
+ HRESULT Refresh_ActiveMonsters();
public:
diff --git a/Jusin154_Team3D/Client/Public/NomalJap.h b/Jusin154_Team3D/Client/Public/NomalJap.h
index 10ae59cb8..0dbdfa863 100644
--- a/Jusin154_Team3D/Client/Public/NomalJap.h
+++ b/Jusin154_Team3D/Client/Public/NomalJap.h
@@ -20,7 +20,6 @@ class CNomalJap final : public CEffect_Container
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
-
public:
virtual HRESULT Pre_Setting(CGameObject* pObject , void* pArg = nullptr) override;
@@ -31,6 +30,7 @@ class CNomalJap final : public CEffect_Container
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+ void SweepTarget();
private:
class CInfoInstance* m_pInfoInstance = { nullptr };
_wstring m_wstrEffectName = {};
@@ -57,6 +57,7 @@ class CNomalJap final : public CEffect_Container
_float m_fAngularSpeed = {};
_float m_fLinearSpeed = 35.f;
_float m_fTimeRate = {};
+ _bool m_bHit = { false };
/*좌우 무빙 관련 변수들*/
_float3 m_vRotateRight = {};
diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h
index a63fa36e4..8c7e76025 100644
--- a/Jusin154_Team3D/Client/Public/Player.h
+++ b/Jusin154_Team3D/Client/Public/Player.h
@@ -52,6 +52,7 @@ class CPlayer final : public CUnit
class CModel* m_pBroomModel = { nullptr };
class CTransform* m_pBroomTransform = { nullptr };
class CBroom* m_pBroom = { nullptr };
+ CStat* m_pStat = { nullptr };
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
diff --git a/Jusin154_Team3D/Client/Public/Spell_Preview.h b/Jusin154_Team3D/Client/Public/Spell_Preview.h
index 3f9048c54..1abea0224 100644
--- a/Jusin154_Team3D/Client/Public/Spell_Preview.h
+++ b/Jusin154_Team3D/Client/Public/Spell_Preview.h
@@ -45,6 +45,8 @@ class CSpell_Preview final : public CElementObject
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
_wstring m_pSpell_Info;
+ _float m_fOriginOffSet{};
+ _float m_fPreviewOffSet{};
_float4 m_vHeaderBack{};
diff --git a/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h
index de678b1f4..65534bc16 100644
--- a/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h
+++ b/Jusin154_Team3D/Client/Public/Spell_Vidio_Border.h
@@ -39,6 +39,7 @@ class CSpell_Vidio_Border final : public CElementObject
_float m_fStertTimer{};
_int m_iPerIndex{};
+
_bool m_bStart = { false };
public:
diff --git a/Jusin154_Team3D/Client/Public/State_Dead.h b/Jusin154_Team3D/Client/Public/State_Dead.h
new file mode 100644
index 000000000..5dea32e2b
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/State_Dead.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "Client_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Client)
+
+class CState_Dead final : public CState_Root
+{
+public:
+ typedef struct tagLand : public CState_Root::STATE_ROOT_DESC {
+
+ }STATE_DEAD_DESC;
+private:
+ CState_Dead();
+ virtual ~CState_Dead() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ HRESULT Initialize(STATE_DEAD_DESC* pDesc);
+
+public:
+ static CState_Dead* Create(STATE_DEAD_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_Height.png b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_Height.png
new file mode 100644
index 000000000..fe65c5b6a
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_Height.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/North_Hogwart.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/North_Hogwart.bin
new file mode 100644
index 000000000..3c7eb17d9
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/North_Hogwart.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f9b625ea2894a3db68ba5c5cacd361a3e5b04820240aa64b297a8c7b8cd7a28b
+size 395780
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/North_Hogwart_Height.png b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/North_Hogwart_Height.png
new file mode 100644
index 000000000..93ce9dfc9
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/North_Hogwart_Height.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/South_Hogwart_Height.png b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/South_Hogwart_Height.png
new file mode 100644
index 000000000..085134d97
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/South_Hogwart_Height.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml
new file mode 100644
index 000000000..7b45bee9a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml
index 6eadd33fe..a5487a058 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Spell/SpellInfo.xml
@@ -2,19 +2,19 @@
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Use_Skill="1" Preview="0" Vidio="0" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="140" Vidio="100" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="100" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Use_Skill="1" Preview="0" Vidio="0" />
+ Use_Skill="1" Preview="0" Vidio="0" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Use_Skill="1" Preview="0" Vidio="0" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="140" Vidio="100" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
+ Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
\ No newline at end of file
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.fbx
new file mode 100644
index 000000000..b54f244d7
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/SubTroll_Weapon/SK_WPN_Troll_Club07.fbx
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e3f2e069a3ea89e68f5658fc88633e5c9032f7c14eeb632357d83e989da32024
+size 113708
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl
index 3750acda3..580f7887a 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl
@@ -234,16 +234,16 @@ PS_OUT PS_MAIN(PS_IN In)
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
- if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_TRANSMISSION], true))
- {
- float4 vTransmission = g_TransmissionTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
- vMtrlDiffuse *= vTransmission;
- }
- if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_EMISSIVE], true))
- {
- float4 vEmissive = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
- vMtrlDiffuse += vEmissive;
- }
+ //if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_TRANSMISSION], true))
+ //{
+ // float4 vTransmission = g_TransmissionTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
+ // vMtrlDiffuse *= vTransmission;
+ //}
+ //if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_EMISSIVE], true))
+ //{
+ // float4 vEmissive = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
+ // vMtrlDiffuse += vEmissive;
+ //}
if (vMtrlDiffuse.a < 0.2f)
{
discard;
diff --git a/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_HitReport.cpp b/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_HitReport.cpp
index f4d5a5677..0a66d2d34 100644
--- a/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_HitReport.cpp
+++ b/Jusin154_Team3D/Editor/Private/CallBack_EffectHitBox_HitReport.cpp
@@ -45,8 +45,7 @@ void CCallBack_EffectHitBox_HitReport::onShapeHit(const PSX::PxControllerShapeHi
/* OnCollision 함수에 넘길 값 */
-
- CollisionDesc.vWorldPos = XMVectorSet( (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f);
+ CollisionDesc.vWorldPos = { (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f };
memcpy(&CollisionDesc.vWorldNomal, &vWorldNormal, sizeof(_float3));
memcpy(&CollisionDesc.vHitDir, &vDir, sizeof(_float3));
CollisionDesc.fLength = fLength;
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index c86d171d1..b1e4d5c35 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -1600,7 +1600,7 @@ HRESULT CLoader::Loading_For_PhysXLevel()
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
- Desc.fContactOffset = 0.f;
+ Desc.fContactOffset = 0.001f;
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(strDestName).c_str(), CRigidBody_Static::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
@@ -1807,7 +1807,7 @@ HRESULT CLoader::MapFolderLoad(const _char* pDirectoryPath, const _char* pFileEx
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
- Desc.fContactOffset = 0.f;
+ Desc.fContactOffset = 0.001f;
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(strDestName).c_str(), CRigidBody_Static::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
@@ -1860,7 +1860,7 @@ void APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContex
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
- Desc.fContactOffset = 0.f;
+ Desc.fContactOffset = 0.001f;
}
pContents->pRigidBodyTags.emplace_back(CMyTools::ToWstring(pModel->Get_MeshName(i) + to_string(i)).c_str());
pContents->LoadedRigidBody.emplace_back(CRigidBody_Static::Create(pDevice, pContext, Desc));
@@ -2867,7 +2867,7 @@ vector*> Contents(iLoadCount);
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
- Desc.fContactOffset = 0.f;
+ Desc.fContactOffset = 0.001f;
}
CRigidBody_Static* pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"), pRigid))) {
diff --git a/Jusin154_Team3D/Editor/Private/Magic_Item.cpp b/Jusin154_Team3D/Editor/Private/Magic_Item.cpp
index 5a6c504d5..e29ab9982 100644
--- a/Jusin154_Team3D/Editor/Private/Magic_Item.cpp
+++ b/Jusin154_Team3D/Editor/Private/Magic_Item.cpp
@@ -50,6 +50,7 @@ HRESULT CMagic_Item::Initialize(void* pArg)
m_fFontX = 1171.f;
m_fFontY = 870.f;
m_iPotionIndex = 0;
+ m_iPerPotionIndex = -1;
return S_OK;
}
@@ -149,9 +150,12 @@ void CMagic_Item::Update(_float fTimeDelta)
m_iPotionIndex++;
}
- m_strPotion = to_wstring(m_iPotionIndex);
-
- m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
+ if (m_iPerPotionIndex != m_iPotionIndex)
+ {
+ m_strPotion = to_wstring(m_iPotionIndex);
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
+ m_iPerPotionIndex = m_iPotionIndex;
+ }
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
diff --git a/Jusin154_Team3D/Editor/Private/Potion.cpp b/Jusin154_Team3D/Editor/Private/Potion.cpp
index aa583b953..1025ac7ce 100644
--- a/Jusin154_Team3D/Editor/Private/Potion.cpp
+++ b/Jusin154_Team3D/Editor/Private/Potion.cpp
@@ -45,6 +45,7 @@ HRESULT CPotion::Initialize(void* pArg)
m_fFontX = 1163.f;
m_fFontY = 860.f;
m_iPotionIndex = 0;
+ m_iPerPotionIndex = -1;
return S_OK;
}
@@ -103,10 +104,12 @@ void CPotion::Update(_float fTimeDelta)
m_iPotionIndex++;
}
- m_strPotion = to_wstring(m_iPotionIndex);
-
- m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
-
+ if (m_iPerPotionIndex != m_iPotionIndex)
+ {
+ m_strPotion = to_wstring(m_iPotionIndex);
+ m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f;
+ m_iPerPotionIndex = m_iPotionIndex;
+ }
m_fTime += fTimeDelta * m_fTimeMult;
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp
index b283adec6..2fbcf87d7 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp
@@ -104,6 +104,11 @@ void CSpell_Anim::Update(_float fTimeDelta)
m_iCurrentFrame = 0;
}
+ if (m_iPerSpell != -1)
+ {
+ m_fY = m_fOrigin_Position.y + static_cast(m_pOwner)->Get_Info(m_iPerSpell).fVidio;
+ }
+
__super::Update(fTimeDelta);
}
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Data.cpp b/Jusin154_Team3D/Editor/Private/Spell_Data.cpp
index dba778b18..20157c07d 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Data.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Data.cpp
@@ -58,11 +58,15 @@ HRESULT CSpell_Data::Initialize(void* pArg)
pSpell->QueryFloatAttribute("Duration", &pInfo[id].fDuration);
pSpell->QueryIntAttribute("AnimNum", &pInfo[id].iAnimNum);
pInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo"));
- int lock = 0, equip = 0;
+ _int lock = 0, equip = 0, use = 0;
pSpell->QueryIntAttribute("Spell_Lock", &lock);
pSpell->QueryIntAttribute("Equip_Spell", &equip);
+ pSpell->QueryIntAttribute("Use_Skill", &use);
pInfo[id].bSpell_Lock = lock != 0;
pInfo[id].bEquip_Spell = equip != 0;
+ pInfo[id].bUse_Skill = use != 0;
+ pSpell->QueryFloatAttribute("Preview", &pInfo[id].fPreview);
+ pSpell->QueryFloatAttribute("Vidio", &pInfo[id].fVidio);
pSpell = pSpell->NextSiblingElement("Spell");
}
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp
index 2b2b50346..b42e28429 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp
@@ -43,8 +43,10 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
m_fAlphaTime = 5.f;
m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f);
m_fTopY = m_fY - m_vScale.y * 0.5f;
+ m_fPreviewOffSet = 0.f;
+ m_fOriginPerviewSize = 280.f;
SizeUpX(512.f);
- SizeUpY(280.f);
+ SizeUpY(m_fOriginPerviewSize);
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
m_fSortZ = 0.02f;
static_cast(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
@@ -103,8 +105,12 @@ void CSpell_Preview::Update(_float fTimeDelta)
if (m_iSpellType != -1)
{
m_pSpell_Info = static_cast(m_pOwner)->Get_Info(m_iSpellType).pSpellInfo;
+ m_fPreviewOffSet = static_cast(m_pOwner)->Get_Info(m_iSpellType).fPreview;
+ SizeUpY(m_fOriginPerviewSize + m_fPreviewOffSet);
}
+
+
__super::Update(fTimeDelta);
}
@@ -137,7 +143,7 @@ HRESULT CSpell_Preview::Render()
if (m_bHover == true)
{
- m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX+ m_fX, m_fFontY + m_fY));
+ m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, (m_fFontY + m_fY) - m_fPreviewOffSet * 0.5f));
}
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp
index 826bec3a4..770ba74f8 100644
--- a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp
+++ b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp
@@ -44,6 +44,7 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg)
m_fLerpX = m_fX;
m_fLerpY = 45;
m_bStart = false;
+ m_fPreviewOffSet = 0;
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(); });
@@ -96,6 +97,11 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta)
if (m_fAlpha >= 0.3f)
m_bStart = true;
+ if (m_iSpellType != -1)
+ {
+ m_fY = m_fOrigin_Position.y + static_cast(m_pOwner)->Get_Info(m_iSpellType).fVidio;
+ }
+
__super::Update(fTimeDelta);
}
diff --git a/Jusin154_Team3D/Editor/Public/Magic_Item.h b/Jusin154_Team3D/Editor/Public/Magic_Item.h
index 08f2e7682..c29e3ffde 100644
--- a/Jusin154_Team3D/Editor/Public/Magic_Item.h
+++ b/Jusin154_Team3D/Editor/Public/Magic_Item.h
@@ -48,6 +48,7 @@ class CMagic_Item final : public CElementObject
_float2 m_vImagePos2 = {};
_int m_iPotionIndex{};
+ _int m_iPerPotionIndex{};
_wstring m_strPotion;
public:
static CMagic_Item* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Editor/Public/Potion.h b/Jusin154_Team3D/Editor/Public/Potion.h
index f823e9577..b6932407f 100644
--- a/Jusin154_Team3D/Editor/Public/Potion.h
+++ b/Jusin154_Team3D/Editor/Public/Potion.h
@@ -38,6 +38,7 @@ class CPotion final : public CElementObject
_float2 m_vImageSize{};
_int m_iPotionIndex{};
+ _int m_iPerPotionIndex{};
_wstring m_strPotion;
public:
static CPotion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Editor/Public/Spell_Data.h b/Jusin154_Team3D/Editor/Public/Spell_Data.h
index e15186a2a..1f45e81f2 100644
--- a/Jusin154_Team3D/Editor/Public/Spell_Data.h
+++ b/Jusin154_Team3D/Editor/Public/Spell_Data.h
@@ -27,6 +27,7 @@ class CSpell_Data final : public CGameObject
_string pSpellInfo;
_bool bSpell_Lock = false;
_bool bEquip_Spell = false;
+ _float fPreview{};
}SPELLINFO;
private:
CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Editor/Public/Spell_Preview.h b/Jusin154_Team3D/Editor/Public/Spell_Preview.h
index 02d1d9f12..8b0dbe8d6 100644
--- a/Jusin154_Team3D/Editor/Public/Spell_Preview.h
+++ b/Jusin154_Team3D/Editor/Public/Spell_Preview.h
@@ -38,6 +38,8 @@ class CSpell_Preview final : public CElementObject
_wstring m_pSpell_Info;
+ _float m_fOriginPerviewSize{};
+ _float m_fPreviewOffSet{};
_float4 m_vHeaderBack{};
public:
diff --git a/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h b/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h
index 515064bc2..ed81868dd 100644
--- a/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h
+++ b/Jusin154_Team3D/Editor/Public/Spell_Vidio_Border.h
@@ -35,6 +35,8 @@ class CSpell_Vidio_Border final : public CElementObject
_int m_iPerIndex{};
_bool m_bStart = { false };
+ _float m_fPreviewOffSet{};
+
public:
static CSpell_Vidio_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj
index 8ca508ea4..95e1f38f6 100644
--- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj
+++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj
@@ -302,7 +302,9 @@ call Update_Lib.bat
+
+
@@ -554,7 +556,9 @@ call Update_Lib.bat
+
+
diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
index 29a044040..67cb0c16c 100644
--- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
+++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
@@ -301,6 +301,12 @@
{7eab7292-025e-40d7-aa71-73e7a3c71ea7}
+
+ {ea9648d8-6a9a-41d2-8b8f-ea6937017372}
+
+
+ {b31a93a4-8bba-4e94-8008-bbb9b458a55e}
+
@@ -576,6 +582,12 @@
02.Element\01.GameObject\01. Font
+
+ 02.Element\02.Component\12.Stat
+
+
+ 02.Element\02.Component\12.Stat\Event
+
@@ -1217,6 +1229,12 @@
02.Element\01.GameObject\01. Font
+
+ 02.Element\02.Component\12.Stat
+
+
+ 02.Element\02.Component\12.Stat\Event
+
diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp
index 4f0742a81..55b6d75e9 100644
--- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp
+++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp
@@ -134,6 +134,7 @@ void CGameInstance::Update_Engine(_float fTimeDelta)
m_pMouse_Manager->Update();
//m_pSound_Manager->Update();
#ifdef _DEBUG
+ m_pResource_Manager->Describe_Entity();
m_pFog->Update_Fog();
#endif // _DEBUG
m_pPicking->Update();
diff --git a/Jusin154_Team3D/Engine/Private/Mesh.cpp b/Jusin154_Team3D/Engine/Private/Mesh.cpp
index 83233ea77..03fa9df24 100644
--- a/Jusin154_Team3D/Engine/Private/Mesh.cpp
+++ b/Jusin154_Team3D/Engine/Private/Mesh.cpp
@@ -185,7 +185,7 @@ HRESULT CMesh::Initialize_Prototype(MODEL eType, const CModel* pModel, SaveMesh*
m_Vertices.clear();
m_Vertices.reserve(_SaveMesh->Vertices.size());
- XMMATRIX matPre = PreTransformMatrix;
+ _matrix matPre = PreTransformMatrix;
for (size_t i = 0; i < _SaveMesh->Vertices.size(); ++i)
{
@@ -210,6 +210,11 @@ HRESULT CMesh::Initialize_Prototype(MODEL eType, const CModel* pModel, SaveMesh*
hr = Ready_VertexBuffer_For_Anim(pModel, _SaveMesh);
break;
case Engine::MODEL::ENVIROMENT:
+ m_pVertexPositions = new _float3[m_iNumVertices];
+ for (size_t i = 0; i < m_iNumVertices; ++i)
+ {
+ memcpy_s(m_pVertexPositions, sizeof(_float3) * m_iNumVertices, m_Vertices.data(), sizeof(_float3) * m_iNumVertices);
+ }
break;
default:
break;
@@ -266,6 +271,7 @@ HRESULT CMesh::Ready_VertexBuffer_For_NonAnim(SaveMesh* SaveMesh, _fmatrix PreTr
for (_uint i = 0; i < m_iNumVertices; ++i)
{
memcpy(&pVertices[i].vPosition, &SaveMesh->Vertices[i].Pos, sizeof(_float3));
+ memcpy(&m_pVertexPositions[i], &SaveMesh->Vertices[i].Pos, sizeof(_float3));
XMStoreFloat3(&pVertices[i].vPosition,
XMVector3TransformCoord(XMLoadFloat3(&pVertices[i].vPosition), PreTransformMatrix));
@@ -426,9 +432,9 @@ PSX::PxTriangleMesh* CMesh::ConvertToPxMesh(const PSX::PxCookingParams* pParam,
tMeshDesc.points.stride = sizeof(PSX::PxVec3);
Vertices.resize(m_iNumVertices);
XMVector3TransformCoordStream(
- reinterpret_cast(Vertices.data()), // dest
+ reinterpret_cast<_float3*>(Vertices.data()), // dest
sizeof(PSX::PxVec3),
- reinterpret_cast(m_pVertexPositions), // src
+ reinterpret_cast(m_pVertexPositions), // src
sizeof(PSX::PxVec3),
m_iNumVertices,
WorldMatrix
diff --git a/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp b/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp
index 9e5192594..107a7be76 100644
--- a/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp
+++ b/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp
@@ -98,7 +98,6 @@ HRESULT CPrototype_Manager::Ready_StaticComponents()
if (FAILED(Add_Prototype(g_iStaticLevel, CLight::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
-
return S_OK;
}
diff --git a/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp b/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp
index 29a6760f8..96f860c8f 100644
--- a/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp
+++ b/Jusin154_Team3D/Engine/Private/Resource_Manager.cpp
@@ -4,27 +4,65 @@
CResource_Manager::CResource_Manager(ID3D11Device* pDevice)
:m_pDevice{ pDevice }
{
- SAFE_ADDREF(pDevice);
+ SAFE_ADDREF(m_pDevice);
}
ID3D11ShaderResourceView* CResource_Manager::Add_Texture(const _char* pFilePath)
{
- lock_guard lock(m_mtxTexture);
+ if (pFilePath == nullptr || pFilePath[0] == '\0'){
+ return nullptr;
+ }
+ filesystem::path pathFile = pFilePath;
+ const _wstring wstrKeyOriginal = pathFile.filename().wstring();
+
+ { // 브레이스 해제 금지
+ shared_lock sharedLock(m_smtxTexture);
- ID3D11ShaderResourceView* pSRV = Find_SRV(pFilePath);
-
- if (nullptr == pSRV)
- {
- pSRV = Load_SRV(pFilePath);
-
- if (nullptr == pSRV)
+ auto iter = m_Resources.find(wstrKeyOriginal);
+ if (iter != m_Resources.end())
{
- return nullptr;
+#ifdef _DEBUG
+ lock_guard statisticsLock(m_mtxStatistics);
+ m_mapCacheHit[wstrKeyOriginal]++;
+#endif // _DEBUG
+ SAFE_ADDREF(iter->second);
+ return iter->second;
}
+ else {
+#ifdef _DEBUG
+ lock_guard statisticsLock(m_mtxStatistics);
+ m_mapCacheMiss[wstrKeyOriginal]++;
+#endif // _DEBUG
+ }
+ // sharedLock 소멸
+ } // 브레이스 해제 금지
+
+ ID3D11ShaderResourceView* pSRV = Load_SRV(pathFile);
+
+ if (pSRV == nullptr){
+ return nullptr;
}
- SAFE_ADDREF(pSRV);
+ { // 브레이스 해제 금지
+ unique_lock uniqueLock(m_smtxTexture);
+ auto iter = m_Resources.find(wstrKeyOriginal);
+ if (iter != m_Resources.end())
+ {
+ SAFE_RELEASE(pSRV); // 여기까지 왔는데 end가 아니다? -> 다른 스레드가 넣음 -> 이 srv는 이미 로드됨. -> 삭제해야 됨
+
+ SAFE_ADDREF(iter->second);
+ return iter->second; // sharedLock 소멸
+ }
+
+ m_Resources.emplace(wstrKeyOriginal, pSRV);
+ // sharedLock 소멸
+ } // 브레이스 해제 금지
+
+#ifdef _DEBUG
+ ++m_iCount;
+#endif // _DEBUG
+ SAFE_ADDREF(pSRV);
return pSRV;
}
@@ -35,62 +73,37 @@ HRESULT CResource_Manager::Initialize(_uint iResourceCount)
return S_OK;
}
-ID3D11ShaderResourceView* CResource_Manager::Find_SRV(const _char* pFilePath)
-{
- _char szFileName[MAX_PATH] = {};
- _splitpath_s(pFilePath, nullptr, 0, nullptr, 0, szFileName, MAX_PATH, nullptr, 0);
-
- auto iter = m_Resources.find(CMyTools::ToWstring(szFileName));
-
- if (iter == m_Resources.end())
- return nullptr;
-
- return iter->second;
-}
-
-ID3D11ShaderResourceView* CResource_Manager::Load_SRV(const _char* pFilePath)
+ID3D11ShaderResourceView* CResource_Manager::Load_SRV(const filesystem::path& pathFile)
{
ID3D11ShaderResourceView* pSRV = nullptr;
- _char szTextureFileName[MAX_PATH] = {};
- _char szTextureFilePath[MAX_PATH] = {};
- _char szDrive[MAX_PATH] = {};
- _char szDir[MAX_PATH] = {};
- _char szFileName[MAX_PATH] = {};
- _char szEXT[MAX_PATH] = {};
- _splitpath_s(pFilePath, szDrive, MAX_PATH, szDir, MAX_PATH, szFileName, MAX_PATH, szEXT, MAX_PATH);
- strcpy_s(szTextureFileName, szDrive);
- strcat_s(szTextureFileName, szDir);
- strcat_s(szTextureFileName, szFileName);
+ const filesystem::path pathExtensionOriginal = pathFile.extension();
- strcat_s(szTextureFilePath, szTextureFileName);
- strcat_s(szTextureFilePath, ".dds");
+ filesystem::path pathDDSFile = pathFile;
+ pathDDSFile.replace_extension(L".dds");
- HRESULT hr = {};
+ HRESULT hr = CreateDDSTextureFromFile(
+ m_pDevice,
+ pathDDSFile.wstring().c_str(),
+ nullptr,
+ &pSRV
+ );
- hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV); // 일단 dds로 시도하고
if (FAILED(hr)) {
- memset(szTextureFilePath, 0, sizeof(_char) * MAX_PATH); // 실패하면 원래 확장자로 다시 시도
- strcat_s(szTextureFilePath, szTextureFileName);
- strcat_s(szTextureFilePath, szEXT);
+ filesystem::path pathFileOriginal = pathFile;
+ pathFileOriginal.replace_extension(pathExtensionOriginal);
- if (false == strcmp(".tga", szEXT)) {
- assert(false); // trying to Load TGA
- hr = S_OK;
- }
- else {
- hr = CreateWICTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV);
+ hr = CreateWICTextureFromFile(
+ m_pDevice,
+ pathFileOriginal.wstring().c_str(),
+ nullptr,
+ &pSRV
+ );
+
+ if (FAILED(hr)){
+ return nullptr;
}
}
-
- if (E_FAIL == hr)
- return nullptr;
-
- m_Resources.emplace(CMyTools::ToWstring(szFileName), pSRV);
-#ifdef _DEBUG
- ++m_iCount;
-#endif // _DEBUG
-
return pSRV;
}
@@ -122,3 +135,80 @@ void CResource_Manager::Free()
}
m_Resources.clear();
}
+
+
+#ifdef _DEBUG
+
+void CResource_Manager::Describe_Entity()
+{
+ static vector> vecHit = {};
+ static vector> vecMiss = {};
+ GUI::Begin("ResourceManager");
+ if (GUI::Button("Refresh")) {
+ vecHit.clear();
+ vecMiss.clear();
+ for (auto& element : m_mapCacheHit){
+ vecHit.emplace_back(element);
+ }
+ for (auto& element : m_mapCacheMiss){
+ vecMiss.emplace_back(element);
+ }
+ sort(vecHit.begin(), vecHit.end(),
+ [](const pair<_wstring, _uint>& leftPair,
+ const pair<_wstring, _uint>& rightPair)
+ {
+ return leftPair.second > rightPair.second;
+ });
+
+ sort(vecMiss.begin(), vecMiss.end(),
+ [](const pair<_wstring, _uint>& leftPair,
+ const pair<_wstring, _uint>& rightPair)
+ {
+ return leftPair.second > rightPair.second;
+ });
+ }
+ if (GUI::CollapsingHeader("Statistics")) {
+ _uint iTotalHitCount = 0;
+ _uint iTotalMissCount = 0;
+
+ for (const auto& element : m_mapCacheHit) {
+ iTotalHitCount += element.second;
+ }
+ for (const auto& element : m_mapCacheMiss) {
+ iTotalMissCount += element.second;
+ }
+ _uint iTotalRequestCount = iTotalHitCount + iTotalMissCount;
+
+ _float fHitRatePercent = 0.0f;
+ if (iTotalRequestCount > 0) {
+ fHitRatePercent = (_float)iTotalHitCount * 100.0f / (_float)iTotalRequestCount;
+ }
+
+ GUI::Text("Total Requests: %u", iTotalRequestCount);
+ GUI::Text("Hit: %u Miss: %u HitRate: %.2f%%", iTotalHitCount, iTotalMissCount, fHitRatePercent);
+
+ }
+ if (GUI::CollapsingHeader("CacheHit")) {
+ GUI::Text("%d", vecHit.size());
+ GUI::BeginChild("CacheHit", { 300, 300 });
+ GUI::GetScrollY();
+ for (auto& element : vecHit) {
+ GUI::Text("%d", element.second); GUI::SameLine();
+ GUI::Text(CMyTools::ToString(element.first).c_str());
+ }
+ GUI::EndChild();
+ }
+ if (GUI::CollapsingHeader("CacheMiss")) {
+ GUI::Text("%d", vecMiss.size());
+ GUI::BeginChild("CacheMiss", { 300, 300 });
+ GUI::GetScrollY();
+ for (auto& element : vecMiss) {
+ GUI::Text("%d", element.second); GUI::SameLine();
+ GUI::Text(CMyTools::ToString(element.first).c_str());
+ }
+ GUI::EndChild();
+ }
+ GUI::End();
+}
+
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Engine/Private/Stat.cpp b/Jusin154_Team3D/Engine/Private/Stat.cpp
new file mode 100644
index 000000000..e4ec49302
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Private/Stat.cpp
@@ -0,0 +1,128 @@
+#include "pch.h"
+#include "Stat.h"
+#include "StatEvent.h"
+
+CStat::CStat(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CComponent{ pDevice, pContext }
+{
+ ZeroMemory(m_StatArr, sizeof(m_StatArr));
+}
+
+CStat::CStat(const CStat& rhs)
+ : CComponent(rhs)
+{
+ ZeroMemory(m_StatArr, sizeof(m_StatArr));
+
+ memcpy_s(m_StatArr, sizeof(m_StatArr), rhs.m_StatArr, sizeof(m_StatArr));
+ memcpy_s(m_ConditionArr, sizeof(m_ConditionArr), rhs.m_ConditionArr, sizeof(m_ConditionArr));
+}
+
+HRESULT CStat::Initialize_Prototype(tinyxml2::XMLNode* pChild)
+{
+ auto pElement = pChild->ToElement();
+ pElement->QueryFloatAttribute("HP", &m_StatArr[ENUM_CLASS(STAT::HP)]);
+ pElement->QueryFloatAttribute("MAXHP", &m_StatArr[ENUM_CLASS(STAT::MAXHP)]);
+ pElement->QueryFloatAttribute("MELEE", &m_StatArr[ENUM_CLASS(STAT::MELEE)]);
+ pElement->QueryFloatAttribute("MAGIC", &m_StatArr[ENUM_CLASS(STAT::MAGIC)]);
+ pElement->QueryFloatAttribute("DEFENSE", &m_StatArr[ENUM_CLASS(STAT::DEFENSE)]);
+ pElement->QueryFloatAttribute("SPEED", &m_StatArr[ENUM_CLASS(STAT::SPEED)]);
+ pElement->QueryFloatAttribute("AGILITY", &m_StatArr[ENUM_CLASS(STAT::AGILITY)]);
+ pElement->QueryFloatAttribute("LEVEL", &m_StatArr[ENUM_CLASS(STAT::LEVEL)]);
+ pElement->QueryFloatAttribute("EXPERIENCE", &m_StatArr[ENUM_CLASS(STAT::EXPERIENCE)]);
+ pElement->QueryFloatAttribute("MAX_EXPERIENCE", &m_StatArr[ENUM_CLASS(STAT::MAX_EXPERIENCE)]);
+ pElement->QueryFloatAttribute("GOLD", &m_StatArr[ENUM_CLASS(STAT::GOLD)]);
+ memset(m_ConditionArr, 0, sizeof(m_ConditionArr));
+
+ return S_OK;
+}
+
+HRESULT CStat::Initialize(void* pArg)
+{
+ return S_OK;
+}
+
+CStat* CStat::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, tinyxml2::XMLNode* pChild)
+{
+ CStat* pInstance = new CStat(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype(pChild)))
+ {
+ MSG_BOX("Failed to Created : CStat");
+ Safe_Release(pInstance);
+ }
+
+ return pInstance;
+}
+
+CComponent* CStat::Clone(void* pArg, class CGameObject* pOwner)
+{
+ CStat* pInstance = new CStat(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CStat");
+ Safe_Release(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CStat::Free()
+{
+ __super::Free();
+}
+#ifdef _DEBUG
+
+void CStat::Describe_Entity()
+{
+
+}
+
+#endif // _DEBUG
+
+_float CStat::Get_Stat(_int _iStatIndex)
+{
+ return m_StatArr[_iStatIndex];
+}
+
+void CStat::Set_Stat(_int _iStatIndex, _float _iAmount)
+{
+ m_StatArr[_iStatIndex] = _iAmount;
+}
+
+void CStat::Add_Stat(_int _iStatIndex, _float _iAmount)
+{
+ m_StatArr[_iStatIndex] += _iAmount;
+}
+
+_bool CStat::Get_Condition(_uint _iConditionIndex) const
+{
+ return m_ConditionArr[_iConditionIndex];
+}
+
+void CStat::Set_Condition(_uint _iConditionIndex, _bool _Condition)
+{
+ m_ConditionArr[_iConditionIndex] = _Condition;
+}
+
+void CStat::Add_Hp(_float iAmount)
+{
+ _float fMaxHp = Get_Stat(ENUM_CLASS(STAT::MAXHP));
+ _float fCurHp = Get_Stat(ENUM_CLASS(STAT::HP));
+ if (fCurHp < fMaxHp) {
+ _float iNewHP = fCurHp + iAmount;
+ if (iNewHP > fMaxHp) {
+ iAmount = fMaxHp - fCurHp;
+ }
+ Add_Stat(ENUM_CLASS(STAT::HP), iAmount);
+ }
+}
+
+_bool CStat::Get_Damage(_float fDamage)
+{
+ _bool bResultDead = { false };
+ _float fCurHp = Get_Stat(ENUM_CLASS(STAT::HP)) - fDamage;
+ if (fCurHp < 0) { fCurHp = 0; bResultDead = true; }
+ Set_Stat(ENUM_CLASS(STAT::HP), fCurHp);
+ return bResultDead;
+}
diff --git a/Jusin154_Team3D/Engine/Private/StatEvent.cpp b/Jusin154_Team3D/Engine/Private/StatEvent.cpp
new file mode 100644
index 000000000..fbf66eca5
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Private/StatEvent.cpp
@@ -0,0 +1,130 @@
+#include "pch.h"
+#include "StatEvent.h"
+
+CStatEvent::CStatEvent(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CComponent{ pDevice, pContext }
+{
+}
+
+CStatEvent::CStatEvent(const CStatEvent& Prototype)
+ : CComponent(Prototype)
+{
+}
+
+void CStatEvent::AddEvent(const function _Equipfunc, const function _UnEquipfunc)
+{
+ if (m_EquipEventVector.size() > 6)
+ return;
+
+ m_EquipEventVector.push_back(_Equipfunc);
+ m_UnEquipEventVector.push_back(_UnEquipfunc);
+
+}
+
+// 팝된 속성이 어떤 속성인지 리턴함
+_uint CStatEvent::PopEvent(_uint iIndex)
+{
+ vector> EquipEventVector = {};
+ vector> UnEquipEventVector = {};
+ vector<_uint> ActiveAbillityIDVec = {};
+
+ _uint iReturnStat(0);
+
+ EquipEventVector = move(m_EquipEventVector);
+ UnEquipEventVector = move(m_UnEquipEventVector);
+ ActiveAbillityIDVec = move(m_ActiveAbillityIDVec);
+
+ for (size_t i = 0; i < EquipEventVector.size(); i++)
+ {
+ if (i == iIndex)
+ {
+ iReturnStat = ActiveAbillityIDVec[i];
+ continue;
+ }
+
+
+ m_EquipEventVector.push_back(EquipEventVector[i]);
+ m_UnEquipEventVector.push_back(UnEquipEventVector[i]);
+ m_ActiveAbillityIDVec.push_back(ActiveAbillityIDVec[i]);
+ }
+
+ return iReturnStat;
+}
+
+HRESULT CStatEvent::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CStatEvent::Initialize(void* pArg)
+{
+
+ return S_OK;
+}
+
+CStatEvent* CStatEvent::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CStatEvent* pInstance = new CStatEvent(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CStatEvent");
+ Safe_Release(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CStatEvent::Equip()
+{
+ for (auto& func : m_EquipEventVector)
+ {
+ func();
+ }
+}
+
+void CStatEvent::UnEquip()
+{
+ for (auto& func : m_UnEquipEventVector)
+ {
+ func();
+ }
+}
+
+void CStatEvent::Clear()
+{
+ m_EquipEventVector.clear();
+ m_UnEquipEventVector.clear();
+ m_ActiveAbillityIDVec.clear();
+}
+
+void CStatEvent::Push_Order(_uint _iId)
+{
+ m_ActiveAbillityIDVec.push_back(_iId);
+}
+
+CComponent* CStatEvent::Clone(void* pArg, class CGameObject* pOwner)
+{
+ CStatEvent* pInstance = new CStatEvent(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CStatEvent");
+ Safe_Release(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CStatEvent::Free()
+{
+ __super::Free();
+}
+#ifdef _DEBUG
+
+void CStatEvent::Describe_Entity()
+{
+
+}
+
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Engine/Private/Texture.cpp b/Jusin154_Team3D/Engine/Private/Texture.cpp
index 611e7278c..d30efd096 100644
--- a/Jusin154_Team3D/Engine/Private/Texture.cpp
+++ b/Jusin154_Team3D/Engine/Private/Texture.cpp
@@ -97,8 +97,9 @@ HRESULT CTexture::Load_SRV(const _char* szPath, ID3D11ShaderResourceView** ppSRV
{
ID3D11ShaderResourceView* pSRV = m_pGameInstance->Add_Resource(szPath);
- if (nullptr == pSRV)
+ if (nullptr == pSRV){
return E_FAIL;
+ }
*ppSRV = pSRV;
diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp
index d267d8180..21575c4a5 100644
--- a/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp
+++ b/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp
@@ -272,8 +272,9 @@ HRESULT CVIBuffer_Model_Instance::Ready_Materials()
pSRV = m_pGameInstance->Add_Resource(m_MeshMaterialPathes[i][j].c_str());
- if (nullptr == pSRV)
+ if (nullptr == pSRV){
return E_FAIL;
+ }
SRVs.push_back(pSRV);
}
diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h
index eabe15c3d..705856a69 100644
--- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h
+++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h
@@ -9,6 +9,8 @@ enum class RENDER {PRIORITY, SHADOW, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BL
enum class RAY { LOCAL, WORLD, END };
enum class ACTOR { BOX, CAPSULE, SPHERE, PLANE, TRIANGLEMESH, HEIGHTFIELD, END };
enum class BLEND_BONE{SPINE,SHOULDER_L,SHOULDER_R,NECK,SHOULDER_NECK_L, SHOULDER_NECK_R,END};
+enum class STAT { HP, MAXHP, MELEE, MAGIC, DEFENSE, SPEED, AGILITY, LEVEL, EXPERIENCE, MAX_EXPERIENCE, GOLD, END };
+enum class CONDITION { POISON, HPREGENERATION, PANIC, GRAP, END };
enum class TEXTURE_LOAD_TYPE {
diff --git a/Jusin154_Team3D/Engine/Public/Engine_Struct.h b/Jusin154_Team3D/Engine/Public/Engine_Struct.h
index fc083eb5b..9d6a54f57 100644
--- a/Jusin154_Team3D/Engine/Public/Engine_Struct.h
+++ b/Jusin154_Team3D/Engine/Public/Engine_Struct.h
@@ -24,9 +24,9 @@ typedef struct tagModelDesc {
typedef struct tagKeyFrame
{
- XMFLOAT3 vScale = {};
- XMFLOAT4 vRotation = {};
- XMFLOAT3 vTranslation = {};
+ _float3 vScale = {};
+ _float4 vRotation = {};
+ _float3 vTranslation = {};
_float fTrackPosition = {};
}KEYFRAME;
@@ -43,8 +43,8 @@ typedef struct tagLightDesc
_float4 vAmbient = {};
_float4 vSpecular = {};
- const XMFLOAT4* pDirection = nullptr;
- const XMFLOAT4* pPosition = nullptr;
+ const _float4* pDirection = nullptr;
+ const _float4* pPosition = nullptr;
_float4 vPosOffset = {};
@@ -62,18 +62,18 @@ typedef struct tagShadowLight
struct SaveVertex
{
- XMFLOAT3 Pos;
- XMFLOAT3 Normal;
- XMFLOAT3 Tan;
- XMFLOAT3 BiNoraml;
- XMFLOAT2 UV;
+ _float3 Pos;
+ _float3 Normal;
+ _float3 Tan;
+ _float3 BiNoraml;
+ _float2 UV;
bool bHasNormal;
bool bHasTan;
bool bHasUV;
XMUINT4 BlendIndex;
- XMFLOAT4 BlendWeight;
+ _float4 BlendWeight;
};
struct SaveBoneWeight
@@ -129,13 +129,13 @@ struct SaveMaterial
struct SaveKeyFrameVec
{
float Time;
- XMFLOAT3 Value;
+ _float3 Value;
};
struct SaveKeyFrameRotation
{
float Time;
- XMFLOAT4 Value;
+ _float4 Value;
};
struct SaveChannel
@@ -396,9 +396,9 @@ typedef struct tagPhsXUserData {
typedef struct tagOnCollsionInfo
{
- _vector vWorldPos = {}; // 접촉지점
- _vector vWorldNomal = {}; // 접촉노말
- _vector vHitDir = {}; // 시도한 move 방향
+ _float4 vWorldPos = {}; // 접촉지점
+ _float4 vWorldNomal = {}; // 접촉노말
+ _float4 vHitDir = {}; // 시도한 move 방향
_float fLength = {}; // 작용된 힘
}ON_COLLISION_INFO;
diff --git a/Jusin154_Team3D/Engine/Public/FSM.h b/Jusin154_Team3D/Engine/Public/FSM.h
index a889c479b..48cec542c 100644
--- a/Jusin154_Team3D/Engine/Public/FSM.h
+++ b/Jusin154_Team3D/Engine/Public/FSM.h
@@ -33,6 +33,7 @@ enum ESTATE : _u64Flag
SWING = 1ULL << 26,
SLAM = 1ULL << 27,
BLINK = 1ULL << 28,
+ DEAD = 1ULL << 29,
END
};
NS_END
diff --git a/Jusin154_Team3D/Engine/Public/MyTools.h b/Jusin154_Team3D/Engine/Public/MyTools.h
index a5e8e0cfc..16166d7f0 100644
--- a/Jusin154_Team3D/Engine/Public/MyTools.h
+++ b/Jusin154_Team3D/Engine/Public/MyTools.h
@@ -202,7 +202,8 @@ class CMyTools {
// 2D 평면에 사상된 방향을 교정해서 리턴
// float -> Radian값
- // -, +
+ // - 시계방향
+ // + 반시계방향
inline static _float Get_Direction2D(_float2 vOrigianlDir, _float2 vInputDir) {
_vector vOriginal = XMVector2Normalize(XMLoadFloat2(&vOrigianlDir));
_vector vInput = XMVector2Normalize(XMLoadFloat2(&vInputDir));
@@ -212,6 +213,15 @@ class CMyTools {
return fDiffAngle * (fCross < 0 ? -1.f : 1.f);
}
+ inline static _float Get_Direction2D(_vector vOriginalDir, _vector vInputDir) {
+ _vector vOriginal = XMVector2Normalize(XMVectorSet(XMVectorGetX(vOriginalDir), XMVectorGetZ(vOriginalDir), 0.f, 0.f));
+ _vector vInput = XMVector2Normalize(XMVectorSet(XMVectorGetX(vInputDir), XMVectorGetZ(vInputDir), 0.f, 0.f));
+
+ _float fDiffAngle = XMVectorGetX(XMVector2AngleBetweenNormals(vOriginal, vInput));
+ _float fCross = XMVectorGetZ(XMVector2Cross(vOriginal, vInput));
+
+ return fDiffAngle * (fCross < 0 ? -1.f : 1.f);
+ }
// yaw 360도 자동 커트
// pitch 80도 클램프
inline static void AdjustAccumulateDegreePitchYawDegree(_float2& vAccumulateDegreePitchYaw, float fPitchLimitDegree = 80.f)
diff --git a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h
index ada92f205..67caa7a82 100644
--- a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h
+++ b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h
@@ -11,6 +11,8 @@
#include "Cell.h"
#include "Model.h"
#include "Instance_Model.h"
+#include "Stat.h"
+#include "StatEvent.h"
#include "Character_Controller.h"
#include "Light.h"
#include "FSM.h"
diff --git a/Jusin154_Team3D/Engine/Public/Resource_Manager.h b/Jusin154_Team3D/Engine/Public/Resource_Manager.h
index 3b27f4892..6dd4ff6b6 100644
--- a/Jusin154_Team3D/Engine/Public/Resource_Manager.h
+++ b/Jusin154_Team3D/Engine/Public/Resource_Manager.h
@@ -9,15 +9,18 @@ class CResource_Manager final : public CBase
private:
CResource_Manager(ID3D11Device* pDevice);
virtual ~CResource_Manager() = default;
- mutex m_mtxTexture = {};
+ shared_mutex m_smtxTexture = {};
+#ifdef _DEBUG
+ mutex m_mtxStatistics = {};
+#endif // _DEBUG
+
public:
ID3D11ShaderResourceView* Add_Texture(const _char* pFilePath);
private:
HRESULT Initialize(_uint iResourceCount);
- ID3D11ShaderResourceView* Find_SRV(const _char* pFilePath);
- ID3D11ShaderResourceView* Load_SRV(const _char* pFilePath);
+ ID3D11ShaderResourceView* Load_SRV(const filesystem::path& pathFile);
private:
#ifdef _DEBUG
@@ -27,10 +30,18 @@ class CResource_Manager final : public CBase
ID3D11Device* m_pDevice = { nullptr };
unordered_map<_wstring, ID3D11ShaderResourceView*> m_Resources;
+#ifdef _DEBUG
+ unordered_map<_wstring, atomic_int> m_mapCacheHit;
+ unordered_map<_wstring, atomic_int> m_mapCacheMiss;
+#endif // _DEBUG
public:
static CResource_Manager* Create(ID3D11Device* pDevice, _uint iResourceCount);
virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity();
+#endif // _DEBUG
+
};
NS_END
diff --git a/Jusin154_Team3D/Engine/Public/Stat.h b/Jusin154_Team3D/Engine/Public/Stat.h
new file mode 100644
index 000000000..51dd4934e
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Public/Stat.h
@@ -0,0 +1,41 @@
+#pragma once
+
+#include "Component.h"
+
+NS_BEGIN(Engine)
+
+class ENGINE_DLL CStat final : public CComponent
+{
+private:
+ CStat(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CStat(const CStat& rhs);
+ virtual ~CStat() = default;
+
+private:
+ virtual HRESULT Initialize_Prototype(tinyxml2::XMLNode* pChild);
+ virtual HRESULT Initialize(void* pArg);
+
+public:
+ static CStat* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, tinyxml2::XMLNode* pChild);
+ virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+
+public:
+ _float Get_Stat(_int _iStatIndex);
+ void Set_Stat(_int _iStatIndex, _float _iAmount);
+ void Add_Stat(_int _iStatIndex, _float _iAmount);
+ _bool Get_Condition(_uint _iConditionIndex) const;
+ void Set_Condition(_uint _iConditionIndex, _bool _Condition);
+
+ void Add_Hp(_float iAmount);
+ _bool Get_Damage(_float fDamage);
+
+private:
+ _float m_StatArr[ENUM_CLASS(STAT::END)];
+ _bool m_ConditionArr[ENUM_CLASS(CONDITION::END)] = { false };
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Engine/Public/StatEvent.h b/Jusin154_Team3D/Engine/Public/StatEvent.h
new file mode 100644
index 000000000..dfd13b576
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Public/StatEvent.h
@@ -0,0 +1,45 @@
+#pragma once
+
+#include "Component.h"
+
+NS_BEGIN(Engine)
+
+class ENGINE_DLL CStatEvent final : public CComponent
+{
+private:
+ CStatEvent(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CStatEvent(const CStatEvent& Prototype);
+ virtual ~CStatEvent() = default;
+private:
+ virtual HRESULT Initialize_Prototype();
+ virtual HRESULT Initialize(void* pArg);
+
+public:
+ void AddEvent(const function _Equipfunc, const function _UnEquipfunc);
+ _uint PopEvent(_uint iIndex);
+
+
+ void Equip();
+ void UnEquip();
+ void Clear();
+
+ void Push_Order(_uint _iId);
+
+public:
+ static CStatEvent* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+
+
+
+private:
+ vector> m_EquipEventVector = {};
+ vector> m_UnEquipEventVector = {};
+ vector<_uint> m_ActiveAbillityIDVec = {};
+
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h
index 320a1a3c7..c411d326f 100644
--- a/Jusin154_Team3D/Engine/Public/UIObject.h
+++ b/Jusin154_Team3D/Engine/Public/UIObject.h
@@ -32,6 +32,9 @@ typedef struct tagSpellInfo
_wstring pSpellInfo;
_bool bSpell_Lock = false;
_bool bEquip_Spell = false;
+ _bool bUse_Skill = false;
+ _float fPreview{};
+ _float fVidio{};
}SPELLINFO;
typedef struct SlotHover
{
diff --git a/Jusin154_Team3D/Engine/Public/Unit.h b/Jusin154_Team3D/Engine/Public/Unit.h
index 9809ca0fc..fd9a2fad5 100644
--- a/Jusin154_Team3D/Engine/Public/Unit.h
+++ b/Jusin154_Team3D/Engine/Public/Unit.h
@@ -50,6 +50,7 @@ class ENGINE_DLL CUnit abstract : public CContainerObject
_float Get_KeyFrame(_string FrameName);
_bool IsCurrentKeyFrame(_string FrameName);
virtual _vector Get_LockOnPos() { return Get_WorldPostion(); }
+ virtual _bool Get_Damage(_float fDamage) { return false; }
virtual void Reset_Sprint() {};
virtual void Reset_Walk() {};
@@ -60,7 +61,6 @@ class ENGINE_DLL CUnit abstract : public CContainerObject
CModel* m_pModelCom = { nullptr };
CFSM* m_pFSM = { nullptr };
_wstring m_strModelPrototypeTag;
- _float2 m_vHP = { 230.f, 350.f };
_bool m_bRimLight = { true };
_float m_fRimLightPower = { 3.2f };
_float m_fRimLightStrength = { 3.04f };
@@ -76,6 +76,7 @@ class ENGINE_DLL CUnit abstract : public CContainerObject
_int m_eSpell = { };
_int m_eHitSpell = {};
+ _float m_fHitRadius = {};
vector m_PendingEvents;
diff --git a/Jusin154_Team3D/Engine/Public/VIBuffer.h b/Jusin154_Team3D/Engine/Public/VIBuffer.h
index bef2f6308..dd273ce00 100644
--- a/Jusin154_Team3D/Engine/Public/VIBuffer.h
+++ b/Jusin154_Team3D/Engine/Public/VIBuffer.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include "Component.h"
NS_BEGIN(Engine)
@@ -33,4 +33,4 @@ public CComponent
virtual void Free();
};
-NS_END
\ No newline at end of file
+NS_END
diff --git a/Jusin154_Team3D/Engine/Public/pch.h b/Jusin154_Team3D/Engine/Public/pch.h
index c27ab5229..c226fdfe9 100644
--- a/Jusin154_Team3D/Engine/Public/pch.h
+++ b/Jusin154_Team3D/Engine/Public/pch.h
@@ -58,6 +58,7 @@ using namespace DirectX;
#include
#include
#include
+#include
using namespace std;