[Modify] 병합

This commit is contained in:
qordlsgur
2025-12-07 23:22:32 +09:00
78 changed files with 1453 additions and 645 deletions
@@ -268,6 +268,7 @@ call Update_Resources.bat
<ClInclude Include="..\Public\State_Blink.h" />
<ClInclude Include="..\Public\State_Broom_Ride.h" />
<ClInclude Include="..\Public\State_Combat.h" />
<ClInclude Include="..\Public\State_Dead.h" />
<ClInclude Include="..\Public\State_Dodge.h" />
<ClInclude Include="..\Public\State_Hit.h" />
<ClInclude Include="..\Public\State_Idle.h" />
@@ -408,6 +409,7 @@ call Update_Resources.bat
<ClCompile Include="..\Private\State_Blink.cpp" />
<ClCompile Include="..\Private\State_Broom_Ride.cpp" />
<ClCompile Include="..\Private\State_Combat.cpp" />
<ClCompile Include="..\Private\State_Dead.cpp" />
<ClCompile Include="..\Private\State_Dodge.cpp" />
<ClCompile Include="..\Private\State_Hit.cpp" />
<ClCompile Include="..\Private\State_Idle.cpp" />
@@ -158,10 +158,10 @@
<Filter>02.GameObjects\Cameras\Camera_Gaze</Filter>
</ClInclude>
<ClInclude Include="..\Public\Goblin.h">
<Filter>02.GameObjects\Monster\Goblin</Filter>
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin</Filter>
</ClInclude>
<ClInclude Include="..\Public\Monster.h">
<Filter>02.GameObjects\Monster</Filter>
<Filter>02.GameObjects\NPC\Hostile\Monster</Filter>
</ClInclude>
<ClInclude Include="..\public\MapContainer.h">
<Filter>02.GameObjects\Environment\00.MapContainer</Filter>
@@ -269,7 +269,7 @@
<Filter>02.GameObjects\Effect\Effects\Lumos</Filter>
</ClInclude>
<ClInclude Include="..\Public\Troll.h">
<Filter>02.GameObjects\Monster\Troll</Filter>
<Filter>02.GameObjects\NPC\Hostile\Monster\Troll</Filter>
</ClInclude>
<ClInclude Include="..\Public\Troll_Weapon.h">
<Filter>02.GameObjects\Item\Troll_Weapon</Filter>
@@ -409,6 +409,9 @@
<ClInclude Include="..\Public\Logo_Text.h">
<Filter>02.GameObjects\UI\Screen\Logo\Logo_Text</Filter>
</ClInclude>
<ClInclude Include="..\Public\State_Dead.h">
<Filter>04.Mechanic\State\State_Combat\Dead</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Client.ico">
@@ -491,9 +494,6 @@
<Filter Include="02.GameObjects\Environment\Plane">
<UniqueIdentifier>{603938cc-e4fe-44d8-890b-784174a86161}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\NPC\Hostile\Monster">
<UniqueIdentifier>{b72a9bb0-1b21-416b-bd0c-ba943cd7cc9d}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Environment\Prop">
<UniqueIdentifier>{2814c935-13d9-4b9a-94ba-c9e470219a18}</UniqueIdentifier>
</Filter>
@@ -635,12 +635,6 @@
<Filter Include="02.GameObjects\Item\Wand">
<UniqueIdentifier>{b719d948-fce3-4144-9d2c-edcab4cfceaf}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Monster">
<UniqueIdentifier>{d371e373-e343-4e0b-9a0c-34eae167c1cd}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Monster\Goblin">
<UniqueIdentifier>{1ff3d6f1-f31d-47b7-84b7-d23efe98d7d2}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Environment\00.MapContainer">
<UniqueIdentifier>{e2d84a8f-46c9-4689-bd91-cc45343d2b10}</UniqueIdentifier>
</Filter>
@@ -728,9 +722,6 @@
<Filter Include="02.GameObjects\Environment\03.MapElement\Light">
<UniqueIdentifier>{71f6a568-488d-4ec1-be79-8fcce6677e27}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Monster\Troll">
<UniqueIdentifier>{a1b1f17d-ed4f-4b20-aa8e-c52e693683d4}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Item\Troll_Weapon">
<UniqueIdentifier>{1d6c078d-dddd-493d-a6f0-f2cac2e4107e}</UniqueIdentifier>
</Filter>
@@ -851,6 +842,15 @@
<Filter Include="01.Levels\02.GamePlay">
<UniqueIdentifier>{7e641382-9dfa-4da7-a8c8-a3ee06360e7a}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\NPC\Hostile\Monster">
<UniqueIdentifier>{d371e373-e343-4e0b-9a0c-34eae167c1cd}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin">
<UniqueIdentifier>{1ff3d6f1-f31d-47b7-84b7-d23efe98d7d2}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Troll">
<UniqueIdentifier>{a1b1f17d-ed4f-4b20-aa8e-c52e693683d4}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\UI\Screen">
<UniqueIdentifier>{c02bfd67-091b-4636-a45f-34a3603ffbd8}</UniqueIdentifier>
</Filter>
@@ -869,6 +869,9 @@
<Filter Include="02.GameObjects\UI\Screen\Logo\Logo_Text">
<UniqueIdentifier>{c584798b-d7aa-4cb0-b6e8-c2aff73757ce}</UniqueIdentifier>
</Filter>
<Filter Include="04.Mechanic\State\State_Combat\Dead">
<UniqueIdentifier>{81add99f-7450-4730-8d3f-bf1de06b2b8d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Client.cpp">
@@ -1016,13 +1019,13 @@
<Filter>02.GameObjects\Cameras\Camera_Gaze</Filter>
</ClCompile>
<ClCompile Include="..\Private\Goblin.cpp">
<Filter>02.GameObjects\Monster\Goblin</Filter>
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin</Filter>
</ClCompile>
<ClCompile Include="..\Private\Goblin_States.cpp">
<Filter>02.GameObjects\Monster\Goblin</Filter>
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin</Filter>
</ClCompile>
<ClCompile Include="..\Private\Monster.cpp">
<Filter>02.GameObjects\Monster</Filter>
<Filter>02.GameObjects\NPC\Hostile\Monster</Filter>
</ClCompile>
<ClCompile Include="..\private\BuildingContainer.cpp">
<Filter>02.GameObjects\Environment\00.MapContainer\BuildingContainer</Filter>
@@ -1133,10 +1136,10 @@
<Filter>02.GameObjects\Environment\03.MapElement\Light</Filter>
</ClCompile>
<ClCompile Include="..\Private\Troll.cpp">
<Filter>02.GameObjects\Monster\Troll</Filter>
<Filter>02.GameObjects\NPC\Hostile\Monster\Troll</Filter>
</ClCompile>
<ClCompile Include="..\Private\Troll_States.cpp">
<Filter>02.GameObjects\Monster\Troll</Filter>
<Filter>02.GameObjects\NPC\Hostile\Monster\Troll</Filter>
</ClCompile>
<ClCompile Include="..\Private\Troll_Weapon.cpp">
<Filter>02.GameObjects\Item\Troll_Weapon</Filter>
@@ -1276,6 +1279,9 @@
<ClCompile Include="..\Private\Logo_Text.cpp">
<Filter>02.GameObjects\UI\Screen\Logo\Logo_Text</Filter>
</ClCompile>
<ClCompile Include="..\Private\State_Dead.cpp">
<Filter>04.Mechanic\State\State_Combat\Dead</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Client.rc">
@@ -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)
@@ -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<CRigidBody_Dynamic*>(pTargetActorData->pBody)->Add_Force(CollisionDesc.vHitDir * fLength * 100.f, PSX::PxForceMode::eIMPULSE);
static_cast<CRigidBody_Dynamic*>(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;
@@ -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();
}
@@ -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; // 장애물
@@ -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)
@@ -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 };
@@ -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;
}
+14 -11
View File
@@ -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<ON_COLLISION_INFO*>(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<CEffect_Container*>(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;
}
@@ -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
@@ -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);
@@ -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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(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<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
return S_OK;
}
+340 -308
View File
@@ -277,289 +277,288 @@ HRESULT CLoader::Loading_For_GamePlay()
#pragma region MAP_MODELS
vector<future<vector<FOLDER_LOAD*>*>> 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<CTroll>(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<FOLDER_LOAD*>* 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<FOLDER_LOAD*>* 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<FOLDER_LOAD*>* 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<FOLDER_LOAD*>* 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<FOLDER_LOAD*>* 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<FOLDER_LOAD*>* 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());
@@ -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;
@@ -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;
+24 -4
View File
@@ -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<CMonster*>::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<CMonster*>::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<CUnit*>::iterator iter = m_PlayerAllies.begin(); iter != m_PlayerAllies.end();) {
+28 -18
View File
@@ -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<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->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<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->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<CTransform>()->Set_State(STATE::POSITION, vStartPos);
m_pProjectile_Side->Get_Component<CTransform>()->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;
+12 -2
View File
@@ -150,8 +150,13 @@ void CPlayer::Late_Update(_float fTimeDelta)
__super::Late_Update(fTimeDelta);
if (nullptr != m_pLockOnMonster && false == m_pLockOnMonster->isDead()) {
static_cast<CMonster*>(m_pLockOnMonster)->Set_DrawOutLine();
if (nullptr != m_pLockOnMonster) {
if (false == m_pLockOnMonster->isDead()) {
static_cast<CMonster*>(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);
@@ -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;
+25 -23
View File
@@ -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;
@@ -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<CUIObject*>(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;
}
@@ -44,6 +44,7 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg)
m_fLerpX = m_fX;
m_fLerpY = 45;
m_bStart = false;
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
@@ -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<CModel>();
m_pFSM = m_pOwner->Get_Component<CFSM>();
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()
{
}
+3
View File
@@ -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;
}
@@ -32,5 +32,7 @@ namespace Client
_bool bSpell_Lock = false;
_bool bEquip_Spell = false;
_bool bUse_Skill = false;
_float fPreview{};
_float fVidio{};
}SPELL_INFO;
};
+4 -1
View File
@@ -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
+2
View File
@@ -40,8 +40,10 @@ class CLoader final : public CBase
private:
HRESULT Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function<HRESULT(_wstring, const _char*)> AddPrototypeEvent);
HRESULT Stat_FileLoad(const _char* pDirectoryPath);
future<vector<FOLDER_LOAD*>*> Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag);
future<pair<_wstring, CModel*>*> 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;
+3
View File
@@ -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 };
@@ -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:
+2 -1
View File
@@ -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 = {};
+1
View File
@@ -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;
@@ -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{};
@@ -39,6 +39,7 @@ class CSpell_Vidio_Border final : public CElementObject
_float m_fStertTimer{};
_int m_iPerIndex{};
_bool m_bStart = { false };
public:
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

@@ -0,0 +1,5 @@
<StatInfo>
<STAT_PLAYER HP="100" MAXHP="100" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
<STAT_GOBLIN HP="100" MAXHP="100" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
<STAT_TROLL HP="100" MAXHP="100" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
</StatInfo>
@@ -2,19 +2,19 @@
<Spell Spell_ID="0" Spell_Name="아레스토 모멘텀" Image_Name="Arresto_Momentum" Spell_Type="0" Type_Name="제어" Skill_Type="0"
Spell_Damage="10" Spell_Cooltime="15" Duration="15" AnimNum="120" SpellInfo="적과 대상의 속도를 모두 늦춰, 다음 행동을 생각할
시간을 벌 수 있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="1" Spell_Name="글래시우스" Image_Name="Glacius" Spell_Type="0" Type_Name="제어" Skill_Type="1"
Spell_Damage="10" Spell_Cooltime="10" Duration="10" AnimNum="156" SpellInfo="적을 얼려서 후속 공격 시 대미지를 증가시킵니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="2" Spell_Name="레비오소" Image_Name="Levioso" Spell_Type="0" Type_Name="제어" Skill_Type="2"
Spell_Damage="10" Spell_Cooltime="8" Duration="8" AnimNum="180" SpellInfo="물건과 적을 공중에 띄웁니다. 퍼즐을 풀거나 적을
놀라게 할 때 유용합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="3" Spell_Name="변신" Image_Name="Transformation" Spell_Type="0" Type_Name="제어" Skill_Type="3"
Spell_Damage="10" Spell_Cooltime="20" Duration="15" AnimNum="146"
SpellInfo="물건과 적의 형태를 바꿉니다. 퍼즐을 풀 때도 사용할 수
있고 무해한 장식품에도 사용할 수 있습니다." Spell_Lock="0" Equip_Spell="0"
Use_Skill="1" />
Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="4" Spell_Name="아씨오" Image_Name="Accio" Spell_Type="1" Type_Name="위력" Skill_Type="4"
Spell_Damage="10" Spell_Cooltime="8" Duration="0" AnimNum="151"
SpellInfo="다양한 물체나 적을 근처로 당기는 소환 마법입니다.
@@ -22,7 +22,7 @@
노력이 더 요구되기도 합니다. 일단 물체를 소환하면
버튼을 입력하지 않고도 자동으로 윙가디움 레비오사가
시전되어 계속 공중에 띄울 수 있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
<Spell Spell_ID="5" Spell_Name="디펄소" Image_Name="Depulso" Spell_Type="1" Type_Name="위력" Skill_Type="5"
Spell_Damage="10" Spell_Cooltime="10" Duration="0" AnimNum="152"
SpellInfo="여러 가지 물건과 적을 상당히 강력한 힘으로
@@ -30,14 +30,14 @@
물체를 서로 부딪치게 해서 큰 대미지를 줄 수 있습니다.
또한 물건을 밀거나 회전시켜서 다양한 목적을 달성할 때
유리합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
<Spell Spell_ID="6" Spell_Name="디센도" Image_Name="Descendo" Spell_Type="1" Type_Name="위력" Skill_Type="6"
Spell_Damage="10" Spell_Cooltime="10" Duration="0" AnimNum="155"
SpellInfo="직접 대미지를 주지는 않지만, 물건과 적을 바닥에 세게
떨어뜨리면 매우 겅력한 대미지를 줄 수 있습니다.
공중에 뜬 적을 떨어뜨리면 훨씬 더 강력한 대미지를
줍니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
<Spell Spell_ID="7" Spell_Name="플리펜도" Image_Name="Flipendo" Spell_Type="1" Type_Name="위력" Skill_Type="7"
Spell_Damage="10" Spell_Cooltime="5" Duration="0" AnimNum="188"
SpellInfo="물건과 적을 들어올려 거꾸로 뒤집을 수 있습니다.
@@ -45,26 +45,26 @@
이어 나갈 때 유용한 주문입니다. 물건을 즉시 뒤집어서
퍼즐을 풀거나 특정한 적의 약점을 이용할 때도
유용합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
<Spell Spell_ID="8" Spell_Name="콘프링고" Image_Name="Confringo" Spell_Type="2" Type_Name="피해" Skill_Type="8"
Spell_Damage="10" Spell_Cooltime="10" Duration="0" AnimNum="157"
SpellInfo="장거리 볼트로 적중 시 대미지를 줍니다. 불 기반 공격을
받은 적은 몇 초 동안 계속 대미지를 입습니다. 그리고
대미지를 입는 동안 적과 충돌하면 화염이 폭발합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="9" Spell_Name="디핀도" Image_Name="Diffindo" Spell_Type="2" Type_Name="피해" Skill_Type="9"
Spell_Damage="10" Spell_Cooltime="15" Duration="0" AnimNum="150" SpellInfo="멀리 떨어진 물건과 적을 베어 강력한 대미지를 줍니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="10" Spell_Name="엑스펠리아르무스" Image_Name="Expelliarmus" Spell_Type="2" Type_Name="피해" Skill_Type="10"
Spell_Damage="10" Spell_Cooltime="10" Duration="0" AnimNum="146"
SpellInfo="지팡이와 무기를 휘두르는 적을 무장해제시킵니다.
그리고 모든 적에게 대미지를 입힙니다. 무기가 없는
적에게도 대미지를 줄 수 있습니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="11" Spell_Name="봄바르다" Image_Name="Bombarda" Spell_Type="2" Type_Name="피해" Skill_Type="11"
Spell_Damage="10" Spell_Cooltime="15" Duration="0" AnimNum="262" SpellInfo="적중 시 큰 대미지를 주며, 동시에 폭발하여 대형
장애물을 부수고 주변 적에 대미지르 줍니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="12" Spell_Name="인센디오" Image_Name="Incendio" Spell_Type="2" Type_Name="피해" Skill_Type="12"
Spell_Damage="10" Spell_Cooltime="8" Duration="0" AnimNum="213"
SpellInfo="단거리 공격으로 목표물과 거리가 가까울 때만 사용할 수
@@ -73,21 +73,21 @@
있습니다. 불을 이용한 공격으로 공격을 받은 적은 몇 초
동안 계속 대미지를 받습니다. 그리고 대미지를 입는
동안 적과 충돌하면 화염이 폭발합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="140" Vidio="100" />
<Spell Spell_ID="13" Spell_Name="투영" Image_Name="Disillusionment" Spell_Type="3" Type_Name="유용" Skill_Type="13"
Spell_Damage="10" Spell_Cooltime="0.5" Duration="0" AnimNum="260"
SpellInfo="주변 환경에 녹아들어 남들이 알봐보기 어렵게 만듭니다.
적들에게 들키지 않고 몰래 접근해, 페트리피쿠스
토탈루스를 시전하려고 할 때 아주 유용합니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="14" Spell_Name="루모스" Image_Name="Lumos" Spell_Type="3" Type_Name="유용" Skill_Type="14"
Spell_Damage="10" Spell_Cooltime="0.5" Duration="0" AnimNum="365" SpellInfo="어두운 곳을 환하게 밝히거나, 퍼즐에서 추가 조명이
필요할 때 사용합니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="15" Spell_Name="레파로" Image_Name="Reparo" Spell_Type="3" Type_Name="유용" Skill_Type="15"
Spell_Damage="10" Spell_Cooltime="0.5" Duration="0" AnimNum="385" SpellInfo="손상된 특정 물체를 이전 상태로 신속하게 되돌릴 수
있습니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="16" Spell_Name="윙가디움 레비오사" Image_Name="Wingardium_Leviosa" Spell_Type="3" Type_Name="유용"
Skill_Type="16" Spell_Damage="10" Spell_Cooltime="0.5" Duration="5" AnimNum="273"
SpellInfo="이동 가능한 물체를 공중에 띄워 움직입니다. 움직임으로
@@ -95,54 +95,54 @@
거리를 조절하거나 회전시킬 수 있습니다. 윙가디움
레비오사는 아씨오로 소환된 물체에 자동으로
시전됩니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="100" />
<Spell Spell_ID="17" Spell_Name="구현 마법" Image_Name="Conjuring_Spell" Spell_Type="4" Type_Name="변환" Skill_Type="17"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="115" SpellInfo="필요의 방에서 시전하면 물체를 나타나게 할 수
있습니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="18" Spell_Name="개조 마법" Image_Name="Altering_Spell" Spell_Type="4" Type_Name="변환" Skill_Type="18"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="349" SpellInfo="필요의 방에서 시전하면 물체의 물리적 형태와 특성을
바꿉니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="19" Spell_Name="에바네스코" Image_Name="Evanesco" Spell_Type="4" Type_Name="변환" Skill_Type="19"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="136" SpellInfo="필요한 방에서 시전하면 물체를 사라지게 하고 월장석이
반환됩니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="20" Spell_Name="아바다 케다브라" Image_Name="Avada_Kedavra" Spell_Type="5" Type_Name="저주" Skill_Type="20"
Spell_Damage="10" Spell_Cooltime="90" Duration="0" AnimNum="208" SpellInfo="적을 즉시 처치합니다." Spell_Lock="0" Equip_Spell="0"
Use_Skill="1" />
Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="21" Spell_Name="크루시오" Image_Name="Crucio" Spell_Type="5" Type_Name="저주" Skill_Type="21"
Spell_Damage="10" Spell_Cooltime="20" Duration="20" AnimNum="216"
SpellInfo="시간이 소요되는 대미지를 주기에 대부분의 적이 고통에
몸서리칩니다. 또한 저주를 받은 적은 추가 대미지를
받습니다." Spell_Lock="0" Equip_Spell="0"
Use_Skill="1" />
Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="22" Spell_Name="임페리오" Image_Name="Imperio" Spell_Type="5" Type_Name="저주" Skill_Type="22"
Spell_Damage="10" Spell_Cooltime="30" Duration="20" AnimNum="462"
SpellInfo="일시적으로 적을 동료처럼 변화시켜 싸우게 합니다.
주문이 걸린 동안 동료로 바뀐 적은 다른 적들의 공격을
받았을 때 방어력이 높아지며 당신에게 충성합니다. 한편
적을 저주하면 그 적은 추가로 대미지를 받습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
<Spell Spell_ID="23" Spell_Name="마법 동물 쓰담기용 빗" Image_Name="Beast_Petting_Brush" Spell_Type="3" Type_Name="유용"
Skill_Type="23" Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="327" SpellInfo="적마법 동물들을 빗질할 때 쓰는 빗입니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="24" Spell_Name="마법 동물 먹이" Image_Name="Beast_Feed" Spell_Type="3" Type_Name="유용" Skill_Type="24"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="378" SpellInfo="마법 동물에게 줄 수 있는 먹이입니다." Spell_Lock="0" Equip_Spell="0"
Use_Skill="1" />
Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="25" Spell_Name="포획 자루" Image_Name="Nab_Sack" Spell_Type="3" Type_Name="유용" Skill_Type="25"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="235" SpellInfo="마법 동물을 구출하거나 잡을 수 있는 마법 자루입니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="26" Spell_Name="기본 주문" Image_Name="Basic_Cast" Spell_Type="6" Type_Name="필수" Skill_Type="26"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="308" SpellInfo="적과 사물에게 가벼운 대미지를 줍니다. 시전하려면
을 탭하세요." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="27" Spell_Name="레벨리오" Image_Name="Revelio" Spell_Type="6" Type_Name="필수" Skill_Type="27"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="227"
SpellInfo="숨겨진 물건, 퍼즐 아이템, 전리품, 적 등을 모두 포함해
유용하거나 상호작용할 수 있는 다양한 대상을 강조
표시합니다. R 로 시전합니다." Spell_Lock="0"
Equip_Spell="0" Use_Skill="1" />
Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="28" Spell_Name="프로테고" Image_Name="Protego" Spell_Type="6" Type_Name="필수" Skill_Type="28"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="285"
SpellInfo="주문, 무기 등 여러 가지 공격으로부터 보호합니다.
@@ -150,7 +150,7 @@
프로테고를 완벽하게 시전할 수 있습니다. 근접
공격자에게는 대미지를 주고, 공격을 반사시켜 적의
방어력을 부술 수도 있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
<Spell Spell_ID="29" Spell_Name="스투페파이" Image_Name="Stupefy" Spell_Type="6" Type_Name="필수" Skill_Type="29"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="222"
SpellInfo="적을 기절시키고 다음 주문을 걸기 쉬운 상태로
@@ -160,32 +160,32 @@
다가오는 공격에 프로테고로 성공적인 공격을 방어할
때, Q를 계속 길게 눌러 원하는 적에게 스투페파이
카운터 공격을 사용하세요"
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="140" Vidio="100" />
<Spell Spell_ID="30" Spell_Name="고대 마법 던지기" Image_Name="Ancient_Magic_Throw" Spell_Type="6" Type_Name="필수"
Skill_Type="30" Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="89"
SpellInfo="목표하는 적에게 주변에 있는 물체를 소환하여 던집니다.
적의 방어벽 마법을 무너뜨리는 데 특히 유용합니다.
물체 위에 표시가 떳을 때 Z로 시전할 수 있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="0" Vidio="0" />
<Spell Spell_ID="31" Spell_Name="고대 마법" Image_Name="Ancient_Magic" Spell_Type="6" Type_Name="필수" Skill_Type="31"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="152"
SpellInfo="고대 마법 MP가 한 부분이라도 가득 차 있으면, 엄청난
대미지를 주고 방어벽 마버을 부수는 강력한 고대 마법을
시전할 수 있게 됩니다. 적의 머리 위에 표시가
나타나면 X로 시전하세요"
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
<Spell Spell_ID="32" Spell_Name="알로호모라" Image_Name="Alohomora" Spell_Type="6" Type_Name="필수" Skill_Type="32"
Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="394"
SpellInfo="마법 세계 전역에 잠겨 있는 다양한 방이나 장소를 열 수
있지만 제대로 시전하기 위해선 마법 실력이 바탕이
되어야 합니다, 자물쇠 근처에서 F로 시전할 수
있습니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
<Spell Spell_ID="33" Spell_Name="페트리피쿠스 토탈루스" Image_Name="Petrificus_Totalus" Spell_Type="6" Type_Name="필수"
Skill_Type="33" Spell_Damage="10" Spell_Cooltime="0" Duration="0" AnimNum="275"
SpellInfo="대부분의 적을 쓰러뜨릴 만큼 강력한 주문이지만 더
위험한 적들은 약간의 대미지를 입힐 뿐, 빠르게 그
영향에서 벗어날 수 있습니다. 이 주문을들키지 않
적에게 몰래 접근한 후 F를 누르면 시전됩니다."
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" />
Spell_Lock="0" Equip_Spell="0" Use_Skill="1" Preview="90" Vidio="50" />
</SpellInfo>
@@ -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;
@@ -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;
+4 -4
View File
@@ -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<vector<FOLDER_LOAD*>*> 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))) {
@@ -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);
+7 -4
View File
@@ -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;
@@ -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<CUIObject*>(m_pOwner)->Get_Info(m_iPerSpell).fVidio;
}
__super::Update(fTimeDelta);
}
@@ -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");
}
@@ -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<CUIObject*>(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<CUIObject*>(m_pOwner)->Get_Info(m_iSpellType).pSpellInfo;
m_fPreviewOffSet = static_cast<CUIObject*>(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;
}
@@ -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<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
@@ -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<CUIObject*>(m_pOwner)->Get_Info(m_iSpellType).fVidio;
}
__super::Update(fTimeDelta);
}
@@ -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);
+1
View File
@@ -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);
@@ -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);
@@ -38,6 +38,8 @@ class CSpell_Preview final : public CElementObject
_wstring m_pSpell_Info;
_float m_fOriginPerviewSize{};
_float m_fPreviewOffSet{};
_float4 m_vHeaderBack{};
public:
@@ -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;
@@ -302,7 +302,9 @@ call Update_Lib.bat
<ClCompile Include="..\Private\Shader.cpp" />
<ClCompile Include="..\Private\Shadow.cpp" />
<ClCompile Include="..\Private\SoundSrc.cpp" />
<ClCompile Include="..\Private\Stat.cpp" />
<ClCompile Include="..\Private\State.cpp" />
<ClCompile Include="..\Private\StatEvent.cpp" />
<ClCompile Include="..\Private\Texture.cpp" />
<ClCompile Include="..\Private\ThreadHolder.cpp" />
<ClCompile Include="..\Private\Timer.cpp" />
@@ -554,7 +556,9 @@ call Update_Lib.bat
<ClInclude Include="..\Public\Shader.h" />
<ClInclude Include="..\Public\Shadow.h" />
<ClInclude Include="..\Public\SoundSrc.h" />
<ClInclude Include="..\Public\Stat.h" />
<ClInclude Include="..\Public\State.h" />
<ClInclude Include="..\Public\StatEvent.h" />
<ClInclude Include="..\Public\stb_image.h" />
<ClInclude Include="..\Public\Texture.h" />
<ClInclude Include="..\Public\ThreadHolder.h" />
@@ -301,6 +301,12 @@
<Filter Include="02.Element\01.GameObject\01. Font">
<UniqueIdentifier>{7eab7292-025e-40d7-aa71-73e7a3c71ea7}</UniqueIdentifier>
</Filter>
<Filter Include="02.Element\02.Component\12.Stat">
<UniqueIdentifier>{ea9648d8-6a9a-41d2-8b8f-ea6937017372}</UniqueIdentifier>
</Filter>
<Filter Include="02.Element\02.Component\12.Stat\Event">
<UniqueIdentifier>{b31a93a4-8bba-4e94-8008-bbb9b458a55e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Private\Base.cpp">
@@ -576,6 +582,12 @@
<ClCompile Include="..\private\Font.cpp">
<Filter>02.Element\01.GameObject\01. Font</Filter>
</ClCompile>
<ClCompile Include="..\Private\Stat.cpp">
<Filter>02.Element\02.Component\12.Stat</Filter>
</ClCompile>
<ClCompile Include="..\Private\StatEvent.cpp">
<Filter>02.Element\02.Component\12.Stat\Event</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Public\Base.h">
@@ -1217,6 +1229,12 @@
<ClInclude Include="..\public\Font.h">
<Filter>02.Element\01.GameObject\01. Font</Filter>
</ClInclude>
<ClInclude Include="..\Public\Stat.h">
<Filter>02.Element\02.Component\12.Stat</Filter>
</ClInclude>
<ClInclude Include="..\Public\StatEvent.h">
<Filter>02.Element\02.Component\12.Stat\Event</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\Public\Assimp\color4.inl">
@@ -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();
+9 -3
View File
@@ -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<XMFLOAT3*>(Vertices.data()), // dest
reinterpret_cast<_float3*>(Vertices.data()), // dest
sizeof(PSX::PxVec3),
reinterpret_cast<const XMFLOAT3*>(m_pVertexPositions), // src
reinterpret_cast<const _float3*>(m_pVertexPositions), // src
sizeof(PSX::PxVec3),
m_iNumVertices,
WorldMatrix
@@ -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;
}
@@ -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<mutex> lock(m_mtxTexture);
if (pFilePath == nullptr || pFilePath[0] == '\0'){
return nullptr;
}
filesystem::path pathFile = pFilePath;
const _wstring wstrKeyOriginal = pathFile.filename().wstring();
{ // 브레이스 해제 금지
shared_lock<shared_mutex> 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<mutex> statisticsLock(m_mtxStatistics);
m_mapCacheHit[wstrKeyOriginal]++;
#endif // _DEBUG
SAFE_ADDREF(iter->second);
return iter->second;
}
else {
#ifdef _DEBUG
lock_guard<mutex> statisticsLock(m_mtxStatistics);
m_mapCacheMiss[wstrKeyOriginal]++;
#endif // _DEBUG
}
// sharedLock 소멸
} // 브레이스 해제 금지
ID3D11ShaderResourceView* pSRV = Load_SRV(pathFile);
if (pSRV == nullptr){
return nullptr;
}
SAFE_ADDREF(pSRV);
{ // 브레이스 해제 금지
unique_lock<shared_mutex> 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<pair<_wstring, _uint>> vecHit = {};
static vector<pair<_wstring, _uint>> 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
+128
View File
@@ -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;
}
@@ -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<void()> _Equipfunc, const function<void()> _UnEquipfunc)
{
if (m_EquipEventVector.size() > 6)
return;
m_EquipEventVector.push_back(_Equipfunc);
m_UnEquipEventVector.push_back(_UnEquipfunc);
}
// 팝된 속성이 어떤 속성인지 리턴함
_uint CStatEvent::PopEvent(_uint iIndex)
{
vector<function<void()>> EquipEventVector = {};
vector<function<void()>> 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
+2 -1
View File
@@ -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;
@@ -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);
}
@@ -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 {
+16 -16
View File
@@ -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;
+1
View File
@@ -33,6 +33,7 @@ enum ESTATE : _u64Flag
SWING = 1ULL << 26,
SLAM = 1ULL << 27,
BLINK = 1ULL << 28,
DEAD = 1ULL << 29,
END
};
NS_END
+11 -1
View File
@@ -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)
@@ -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"
@@ -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
+41
View File
@@ -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
+45
View File
@@ -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<void()> _Equipfunc, const function<void()> _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<function<void()>> m_EquipEventVector = {};
vector<function<void()>> m_UnEquipEventVector = {};
vector<_uint> m_ActiveAbillityIDVec = {};
};
NS_END
+3
View File
@@ -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
{
+2 -1
View File
@@ -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<PendingEvent> m_PendingEvents;
+2 -2
View File
@@ -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
NS_END
+1
View File
@@ -58,6 +58,7 @@ using namespace DirectX;
#include <future>
#include <condition_variable>
#include <mutex>
#include <shared_mutex>
using namespace std;