Merge branch 'Shader' into Develope
This commit is contained in:
@@ -161,6 +161,8 @@ call Update_Resources.bat
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Action_Panel.h" />
|
||||
<ClInclude Include="..\Public\Barral_Splesh.h" />
|
||||
<ClInclude Include="..\Public\CallBack_NonPlayable_Behavior.h" />
|
||||
<ClInclude Include="..\Public\CallBack_NonPlayable_HitReport.h" />
|
||||
<ClInclude Include="..\Public\TransformationSide.h" />
|
||||
<ClInclude Include="..\Public\Transformation.h" />
|
||||
<ClInclude Include="..\Public\LightningSide.h" />
|
||||
@@ -389,6 +391,8 @@ call Update_Resources.bat
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_NonPlayable_Behavior.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_NonPlayable_HitReport.cpp" />
|
||||
<ClCompile Include="..\Private\TransformationSide.cpp" />
|
||||
<ClCompile Include="..\Private\Transformation.cpp" />
|
||||
<ClCompile Include="..\Private\LightningSide.cpp" />
|
||||
|
||||
@@ -688,7 +688,7 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\TransformationSide.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Transformation\TransformationSide</Filter>
|
||||
</ClInclude>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\SpellLearn_Slot.h">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot</Filter>
|
||||
</ClInclude>
|
||||
@@ -704,6 +704,12 @@
|
||||
<ClInclude Include="..\Public\SpellLearn_Booster.h">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\CallBack_NonPlayable_Behavior.h">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\Behavior\NPC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\CallBack_NonPlayable_HitReport.h">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\HitReport\NPC</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1451,7 +1457,7 @@
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Transformation\TransformationSide">
|
||||
<UniqueIdentifier>{064b5e2f-dcde-47fd-a43d-43e25800393d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer">
|
||||
<UniqueIdentifier>{d9c0bcb6-64f6-4b58-a68d-ff04c91b9861}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -1467,6 +1473,12 @@
|
||||
<Filter Include="02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot">
|
||||
<UniqueIdentifier>{dd7d2910-1d3d-42c4-9390-ac60685357ee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\PhysX\CallBack\Behavior\NPC">
|
||||
<UniqueIdentifier>{954ad10f-edc4-4dda-a2e1-741a418831e8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\PhysX\CallBack\HitReport\NPC">
|
||||
<UniqueIdentifier>{b265ac30-97f5-4dac-bc6b-b11fba1c5ad8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -2102,7 +2114,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\NPC_EleazarFig.cpp">
|
||||
<Filter>02.GameObjects\NPC\Ally\GateKeeper</Filter>
|
||||
</ClCompile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\SpellLearn_Slot.cpp">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot</Filter>
|
||||
</ClCompile>
|
||||
@@ -2118,6 +2130,12 @@
|
||||
<ClCompile Include="..\Private\SpellLearn_Booster.cpp">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\CallBack_NonPlayable_Behavior.cpp">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\Behavior\NPC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\CallBack_NonPlayable_HitReport.cpp">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\HitReport\NPC</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
#include "pch.h"
|
||||
#include "CallBack_NonPlayable_Behavior.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
|
||||
CCallBack_NonPlayable_Behavior::CCallBack_NonPlayable_Behavior()
|
||||
{
|
||||
}
|
||||
|
||||
CCallBack_NonPlayable_Behavior::~CCallBack_NonPlayable_Behavior()
|
||||
{
|
||||
}
|
||||
|
||||
PSX::PxControllerBehaviorFlags CCallBack_NonPlayable_Behavior::getBehaviorFlags(const PSX::PxShape& shape, const PSX::PxActor& actor)
|
||||
{
|
||||
if (nullptr == actor.userData) {
|
||||
return PSX::PxControllerBehaviorFlags(0);
|
||||
}
|
||||
PSX::PxControllerBehaviorFlags eResults = PSX::PxControllerBehaviorFlags(0);
|
||||
PhsXUserData* pActorData = static_cast<PhsXUserData*>(actor.userData);
|
||||
switch (pActorData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
eResults = PSX::PxControllerBehaviorFlag::eCCT_SLIDE | PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||
break;
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
switch (pActorData->iSubKind)
|
||||
{
|
||||
case 20:
|
||||
eResults = PSX::PxControllerBehaviorFlag::eCCT_SLIDE;
|
||||
break;
|
||||
case 21:
|
||||
eResults = PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||
break;
|
||||
case 22:
|
||||
eResults = PSX::PxControllerBehaviorFlag::eCCT_SLIDE | PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||
break;
|
||||
case 23:
|
||||
eResults = PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||
break;
|
||||
case 24:
|
||||
eResults = PSX::PxControllerBehaviorFlags(0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
// Action
|
||||
break;
|
||||
case PHYSX_KIND::OBSTACLEActor:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return eResults;
|
||||
}
|
||||
|
||||
PSX::PxControllerBehaviorFlags CCallBack_NonPlayable_Behavior::getBehaviorFlags(const PSX::PxController& controller)
|
||||
{
|
||||
// CCT끼리 부딪힐 때를 굳이 안 쓰면 0 리턴
|
||||
return PSX::PxControllerBehaviorFlag::eCCT_SLIDE;
|
||||
}
|
||||
|
||||
PSX::PxControllerBehaviorFlags CCallBack_NonPlayable_Behavior::getBehaviorFlags(const PSX::PxObstacle& obstacle)
|
||||
{
|
||||
// Obstacle이 움직이는 발판이다?
|
||||
// 여기서 ride/slide 세팅
|
||||
//return PSX::PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT;
|
||||
|
||||
return PSX::PxControllerBehaviorFlags(0);
|
||||
}
|
||||
|
||||
HRESULT CCallBack_NonPlayable_Behavior::Initialize(CCharacter_Controller* pController)
|
||||
{
|
||||
m_pController = pController;
|
||||
m_pGameInstance = CGameInstance::GetInstance();
|
||||
SAFE_ADDREF(m_pController);
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCallBack_NonPlayable_Behavior::Finalize()
|
||||
{
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
SAFE_RELEASE(m_pController);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CCallBack_NonPlayable_Behavior* CCallBack_NonPlayable_Behavior::Create()
|
||||
{
|
||||
return new CCallBack_NonPlayable_Behavior();
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
#include "pch.h"
|
||||
#include "CallBack_NonPlayable_HitReport.h"
|
||||
#include "GameInstance.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
CCallBack_NonPlayable_HitReport::CCallBack_NonPlayable_HitReport()
|
||||
{
|
||||
}
|
||||
|
||||
CCallBack_NonPlayable_HitReport::~CCallBack_NonPlayable_HitReport()
|
||||
{
|
||||
}
|
||||
|
||||
void CCallBack_NonPlayable_HitReport::BeginFrame()
|
||||
{
|
||||
// 매 프레임 초기화
|
||||
m_vClimbNormal = { 0.f, 1.f, 0.f };
|
||||
m_bGroundHit = { false };
|
||||
m_fBestNormal = { 0.f };
|
||||
}
|
||||
|
||||
void CCallBack_NonPlayable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& 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::PxShape* pShape = hit.shape;
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
|
||||
if (nullptr != pController && nullptr != pActor) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
if (nullptr == pTargetActorData) { // missing user data
|
||||
return;
|
||||
}
|
||||
|
||||
switch (pTargetActorData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
switch (PXOBJECT(pTargetActorData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::TERRAIN:
|
||||
case PXOBJECT::FLOOR:
|
||||
case PXOBJECT::ROAD:
|
||||
if (vWorldNormal.y > 0) {
|
||||
_float fDotValue = vWorldNormal.dot({ 0.f, 1.f, 0.f });
|
||||
if (m_fBestNormal < fDotValue) {
|
||||
m_bGroundHit = true;
|
||||
m_fBestNormal = fDotValue;
|
||||
m_vClimbNormal = { vWorldNormal.x, vWorldNormal.y, vWorldNormal.z };
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
{
|
||||
switch (PXOBJECT(pTargetActorData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::END:
|
||||
break;
|
||||
case PXOBJECT::BOX:
|
||||
{
|
||||
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
|
||||
//pDynamic->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
|
||||
PSX::PxVec3 vCompressedDir = -vWorldNormal;
|
||||
vCompressedDir.normalize();
|
||||
pDynamic->addForce(vCompressedDir * fLength * 1000.f, PSX::PxForceMode::eFORCE);
|
||||
} break;
|
||||
case PXOBJECT::DOOR:
|
||||
{
|
||||
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
|
||||
_float fDot = vDir.dot(PSX::PxVec3(0.f, 1.f, 0.f));
|
||||
if (fDot > 0) {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, 1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
else {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, -1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
{
|
||||
} break;
|
||||
}
|
||||
} break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
assert(false);
|
||||
break;
|
||||
case PHYSX_KIND::OBSTACLEActor:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CCallBack_NonPlayable_HitReport::onControllerHit(const PSX::PxControllersHit& 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::PxController* pOtherController = hit.other; // 다른 컨트롤러
|
||||
|
||||
if (nullptr != pController && nullptr != pOtherController) {
|
||||
PhsXUserData* pActorData = static_cast<PhsXUserData*>(pOtherController->getActor()->userData);
|
||||
assert(nullptr != pActorData); // missing user data
|
||||
|
||||
switch (pActorData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
assert(false);
|
||||
break;
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
assert(false);
|
||||
break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
// Action
|
||||
break;
|
||||
case PHYSX_KIND::OBSTACLEActor:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CCallBack_NonPlayable_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 길이
|
||||
|
||||
const void* pOtherController = hit.userData; // 장애물
|
||||
|
||||
//switch (pOtherController.member)
|
||||
//{
|
||||
//default:
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
|
||||
void CCallBack_NonPlayable_HitReport::Set_CurrentSlop()
|
||||
{
|
||||
m_pController->Rewind_Grounded();
|
||||
if (m_bGroundHit)
|
||||
{
|
||||
m_pController->Set_OnGroundFlag(m_bGroundHit);
|
||||
float fDot = clamp(m_fBestNormal, -1.0f, 1.0f);
|
||||
float fAngleRad = acosf(fDot);
|
||||
float fAngleDeg = XMConvertToDegrees(fAngleRad);
|
||||
|
||||
m_pController->Set_CurrentSlope(fAngleDeg, m_vClimbNormal);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CCallBack_NonPlayable_HitReport::Initialize(CCharacter_Controller* pController)
|
||||
{
|
||||
m_pController = pController;
|
||||
m_pGameInstance = CGameInstance::GetInstance();
|
||||
SAFE_ADDREF(m_pController);
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCallBack_NonPlayable_HitReport::Finalize()
|
||||
{
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
SAFE_RELEASE(m_pController);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CCallBack_NonPlayable_HitReport::IsOnGround()
|
||||
{
|
||||
return m_bGroundHit;
|
||||
}
|
||||
|
||||
_vector CCallBack_NonPlayable_HitReport::Get_GroundVector()
|
||||
{
|
||||
return XMLoadFloat3(&m_vClimbNormal);
|
||||
}
|
||||
|
||||
CCallBack_NonPlayable_HitReport* CCallBack_NonPlayable_HitReport::Create()
|
||||
{
|
||||
return new CCallBack_NonPlayable_HitReport();
|
||||
}
|
||||
@@ -358,8 +358,8 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_Camera(g_iStaticLevel, m_pBinded_Camera, CAMERA_SHOULDER);
|
||||
if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, true))) {
|
||||
m_pGameInstance->Add_Camera(NEXT_LEVEL, m_pBinded_Camera, CAMERA_SHOULDER);
|
||||
if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_SHOULDER, true))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs)
|
||||
void CCamera_Debug::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, false);
|
||||
m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_DEBUG, false);
|
||||
#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_DEBUG))) {
|
||||
|
||||
@@ -105,7 +105,7 @@ void CCamera_Gaze::Toggle_Priority()
|
||||
}
|
||||
else {
|
||||
m_iPriority = 55;
|
||||
m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, false);
|
||||
m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_SHOULDER, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ HRESULT CEffectPool::Bind_ShaderResources()
|
||||
|
||||
HRESULT CEffectPool::Ready_Effect()
|
||||
{
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::JAP, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::JAP, 10, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
CNomalJap* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CNomalJap>(iPrototypeLevel, nullptr);
|
||||
@@ -223,7 +223,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CBombard* pEffect = nullptr;
|
||||
|
||||
@@ -232,7 +232,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CDecendo* pEffect = nullptr;
|
||||
|
||||
@@ -241,7 +241,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::PROTEGO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::PROTEGO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CProtego* pEffect = nullptr;
|
||||
|
||||
@@ -250,7 +250,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::REVELIO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::REVELIO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CRevelio* pEffect = nullptr;
|
||||
|
||||
@@ -259,7 +259,7 @@ 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* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::JAP_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CNomalJapSide* pEffect = nullptr;
|
||||
|
||||
@@ -268,7 +268,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLevioso* pEffect = nullptr;
|
||||
|
||||
@@ -278,7 +278,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LUMOS, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LUMOS, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLumos* pEffect = nullptr;
|
||||
|
||||
@@ -288,7 +288,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::ACCIO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::ACCIO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CAccio* pEffect = nullptr;
|
||||
|
||||
@@ -298,7 +298,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CBombardSide* pEffect = nullptr;
|
||||
|
||||
@@ -307,7 +307,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLeviosoSide* pEffect = nullptr;
|
||||
|
||||
@@ -317,7 +317,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CDecendoSide* pEffect = nullptr;
|
||||
|
||||
@@ -327,7 +327,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::WAND_END, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::WAND_END, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CWandEnd* pEffect = nullptr;
|
||||
|
||||
@@ -337,7 +337,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BOX_SPLESH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BOX_SPLESH, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CBox_Splesh* pEffect = nullptr;
|
||||
|
||||
@@ -347,7 +347,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::CHAIL_SPLESH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::CHAIL_SPLESH, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CChair_Splesh* pEffect = nullptr;
|
||||
|
||||
@@ -357,7 +357,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BARRAL_SPLASH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BARRAL_SPLASH, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CBarral_Splesh* pEffect = nullptr;
|
||||
|
||||
@@ -367,7 +367,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::SCREEN_WIND, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::SCREEN_WIND, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CScreen_Wind* pEffect = nullptr;
|
||||
|
||||
@@ -377,7 +377,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::STUPEFY, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::STUPEFY, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CStupefy* pEffect = nullptr;
|
||||
|
||||
@@ -386,7 +386,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLightning* pEffect = nullptr;
|
||||
|
||||
@@ -395,7 +395,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING_SIDE, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LIGHTNING_SIDE, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLightningSide* pEffect = nullptr;
|
||||
|
||||
@@ -405,7 +405,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BLINK, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BLINK, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CBlink* pEffect = nullptr;
|
||||
|
||||
@@ -414,7 +414,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TRANSFORMATION, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TRANSFORMATION, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CTransformation* pEffect = nullptr;
|
||||
|
||||
@@ -423,7 +423,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TRANSFORMATION_SIDE, 3, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TRANSFORMATION_SIDE, 3, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CTransformationSide* pEffect = nullptr;
|
||||
|
||||
@@ -440,7 +440,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
{
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TROLL_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TROLL_ATTACK, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CTrollSwing* pEffect = nullptr;
|
||||
|
||||
@@ -449,7 +449,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TROLL_NOMAL_SMOKE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TROLL_NOMAL_SMOKE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CTroll_Nomal_Smoke* pEffect = nullptr;
|
||||
|
||||
@@ -458,7 +458,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TROLL_RUSH_HIT, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::TROLL_RUSH_HIT, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CTroll_Rush_Hit* pEffect = nullptr;
|
||||
|
||||
@@ -468,7 +468,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_PROTEGO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_PROTEGO, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CGoblin_Protego* pEffect = nullptr;
|
||||
|
||||
@@ -477,7 +477,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_ATTACK, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CGoblin_Attack* pEffect = nullptr;
|
||||
|
||||
@@ -487,7 +487,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_ATTACK, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CMage_Nomal_Attack* pEffect = nullptr;
|
||||
|
||||
@@ -497,7 +497,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_DOWN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_DOWN, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CMage_Down_Attack* pEffect = nullptr;
|
||||
|
||||
@@ -508,7 +508,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_MAGE_SIDE, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CMageSide* pEffect = nullptr;
|
||||
|
||||
@@ -519,7 +519,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CStunEffect* pEffect = nullptr;
|
||||
|
||||
@@ -529,7 +529,7 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBILN_TELEPORT, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBILN_TELEPORT, 5, g_iStaticLevel, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CGoblin_Teleport* pEffect = nullptr;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Player.h"
|
||||
#include "EffectPool.h"
|
||||
#include "Light_Main.h"
|
||||
#include "Layer.h"
|
||||
#include "Camera_Debug.h"
|
||||
@@ -33,6 +35,13 @@ HRESULT CLevel_Field::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Reday_Layer_EffectPool())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Markers())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -157,11 +166,11 @@ HRESULT CLevel_Field::Ready_Camera()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG);
|
||||
m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, CAMERA_DEBUG);
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) {
|
||||
if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_DEBUG, true))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
@@ -208,6 +217,18 @@ HRESULT CLevel_Field::Ready_Markers()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_Field::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
{
|
||||
CPlayer::PLAYERDESC playerDesc = {};
|
||||
playerDesc.vPos = _float4(-17.96f, 18.74f, 9.11f, 1.f);
|
||||
playerDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &playerDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_Field::Ready_Layer_Effect(const _wstring& strLayerTag)
|
||||
{
|
||||
return S_OK;
|
||||
@@ -222,6 +243,14 @@ HRESULT CLevel_Field::Ready_Layer_Monster()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_Field::Reday_Layer_EffectPool()
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, LAYER_EFFECTPOOL))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
pair<CLevel*, function<void()>> CLevel_Field::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg)
|
||||
{
|
||||
CLevel_Field* pInstance = new CLevel_Field(pDevice, pContext, eLevelID);
|
||||
|
||||
@@ -549,11 +549,11 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG);
|
||||
m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, CAMERA_DEBUG);
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, true))) {
|
||||
if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_SHOULDER, true))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -573,15 +573,16 @@ HRESULT CLevel_GamePlay::Ready_Markers()
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) {
|
||||
CPlayer::PLAYERDESC playerDesc = {};
|
||||
playerDesc.vPos = _float4(-21.f, 0.f, -14.f, 1.f);
|
||||
playerDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &playerDesc))) {
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < 1; ++i) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_Ollivander>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_Ollivander>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -1870,7 +1870,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GerboldOlivander_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -1943,131 +1943,131 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBombard>(NEXT_LEVEL, CBombard::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBombard>(g_iStaticLevel, CBombard::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDecendo>(NEXT_LEVEL, CDecendo::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDecendo>(g_iStaticLevel, CDecendo::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CNomalJap>(NEXT_LEVEL, CNomalJap::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CNomalJap>(g_iStaticLevel, CNomalJap::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CProtego>(NEXT_LEVEL, CProtego::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CProtego>(g_iStaticLevel, CProtego::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRevelio>(NEXT_LEVEL, CRevelio::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRevelio>(g_iStaticLevel, CRevelio::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CNomalJapSide>(NEXT_LEVEL, CNomalJapSide::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CNomalJapSide>(g_iStaticLevel, CNomalJapSide::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLevioso>(NEXT_LEVEL, CLevioso::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLevioso>(g_iStaticLevel, CLevioso::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLumos>(NEXT_LEVEL, CLumos::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLumos>(g_iStaticLevel, CLumos::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CAccio>(NEXT_LEVEL, CAccio::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CAccio>(g_iStaticLevel, CAccio::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLeviosoSide>(NEXT_LEVEL, CLeviosoSide::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLeviosoSide>(g_iStaticLevel, CLeviosoSide::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBombardSide>(NEXT_LEVEL, CBombardSide::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBombardSide>(g_iStaticLevel, CBombardSide::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDecendoSide>(NEXT_LEVEL, CDecendoSide::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDecendoSide>(g_iStaticLevel, CDecendoSide::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTransformationSide>(NEXT_LEVEL, CTransformationSide::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTransformationSide>(g_iStaticLevel, CTransformationSide::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTrollSwing>(NEXT_LEVEL, CTrollSwing::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTrollSwing>(g_iStaticLevel, CTrollSwing::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTroll_Nomal_Smoke>(NEXT_LEVEL, CTroll_Nomal_Smoke::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTroll_Nomal_Smoke>(g_iStaticLevel, CTroll_Nomal_Smoke::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTroll_Rush_Hit>(NEXT_LEVEL, CTroll_Rush_Hit::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTroll_Rush_Hit>(g_iStaticLevel, CTroll_Rush_Hit::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Protego>(NEXT_LEVEL, CGoblin_Protego::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Protego>(g_iStaticLevel, CGoblin_Protego::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Attack>(NEXT_LEVEL, CGoblin_Attack::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Attack>(g_iStaticLevel, CGoblin_Attack::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMage_Down_Attack>(NEXT_LEVEL, CMage_Down_Attack::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMage_Down_Attack>(g_iStaticLevel, CMage_Down_Attack::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMage_Nomal_Attack>(NEXT_LEVEL, CMage_Nomal_Attack::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMage_Nomal_Attack>(g_iStaticLevel, CMage_Nomal_Attack::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMageSide>(NEXT_LEVEL, CMageSide::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMageSide>(g_iStaticLevel, CMageSide::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CStunEffect>(NEXT_LEVEL, CStunEffect::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CStunEffect>(g_iStaticLevel, CStunEffect::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBox_Splesh>(NEXT_LEVEL, CBox_Splesh::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBox_Splesh>(g_iStaticLevel, CBox_Splesh::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBarral_Splesh>(NEXT_LEVEL, CBarral_Splesh::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBarral_Splesh>(g_iStaticLevel, CBarral_Splesh::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CChair_Splesh>(NEXT_LEVEL, CChair_Splesh::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CChair_Splesh>(g_iStaticLevel, CChair_Splesh::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CWandEnd>(NEXT_LEVEL, CWandEnd::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CWandEnd>(g_iStaticLevel, CWandEnd::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CStupefy>(NEXT_LEVEL, CStupefy::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CStupefy>(g_iStaticLevel, CStupefy::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLightning>(NEXT_LEVEL, CLightning::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLightning>(g_iStaticLevel, CLightning::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLightningSide>(NEXT_LEVEL, CLightningSide::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLightningSide>(g_iStaticLevel, CLightningSide::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBlink>(NEXT_LEVEL, CBlink::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBlink>(g_iStaticLevel, CBlink::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTransformation>(NEXT_LEVEL, CTransformation::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTransformation>(g_iStaticLevel, CTransformation::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Teleport>(NEXT_LEVEL, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Teleport>(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CScreen_Wind>(NEXT_LEVEL, CScreen_Wind::Create(m_pDevice, m_pContext)))) {
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CScreen_Wind>(g_iStaticLevel, CScreen_Wind::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -315,9 +315,9 @@ CGameObject* CMapElement_Chest::Clone(void* pArg, CGameObject* pOwner)
|
||||
|
||||
void CMapElement_Chest::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
}
|
||||
//if (nullptr != m_pRigidBody) {
|
||||
// m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
//}
|
||||
__super::Free();
|
||||
|
||||
if (m_bCloned)
|
||||
|
||||
@@ -299,7 +299,7 @@ CGameObject* CMapElement_Door::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CMapElement_Door::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
|
||||
@@ -482,9 +482,6 @@ CGameObject* CMapElement_Interactable::Clone(void* pArg, CGameObject* pOwner)
|
||||
|
||||
void CMapElement_Interactable::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
|
||||
@@ -154,7 +154,7 @@ void CMapElement_Static::ReadyForPhysX()
|
||||
{
|
||||
CModel* pModel = m_pModelComs[iIndexLOD];
|
||||
|
||||
if (FAILED(pModel->Ready_PhysXMeshes(m_pTransformCom->Get_XMWorldMatrix(), iLevel))) {
|
||||
if (FAILED(pModel->Ready_PhysXMeshes(XMMatrixIdentity(), iLevel))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Player.h"
|
||||
#include "CallBack_NonPlayable_Behavior.h"
|
||||
#include "CallBack_NonPlayable_HitReport.h"
|
||||
|
||||
CNPC_Ollivander::CNPC_Ollivander(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CUnit(pDevice, pContext)
|
||||
@@ -25,23 +27,86 @@ void CNPC_Ollivander::Priority_Update(_float fTimeDelta)
|
||||
void CNPC_Ollivander::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pModelCom->Set_AnimationIndex(m_pGameInstance->Random_Int(0, 19), false);
|
||||
}
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
__super::Update(fTimeDelta);
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
if (false == m_bEntered) {
|
||||
if (true == CastToPlayer()) {
|
||||
m_vEnteringTimer.x += fTimeDelta;
|
||||
if (m_vEnteringTimer.x > m_vEnteringTimer.y) {
|
||||
m_vEnteringTimer.x -= m_vEnteringTimer.y;
|
||||
m_bEntered = true;
|
||||
// Active();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
|
||||
GUI::Text("Hello");
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (false == CastToPlayer()) {
|
||||
m_vEnteringTimer.x += fTimeDelta;
|
||||
if (m_vEnteringTimer.x > m_vEnteringTimer.y) {
|
||||
m_vEnteringTimer.x -= m_vEnteringTimer.y;
|
||||
m_bEntered = false;
|
||||
// DeActive(), Ready To Enter;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
|
||||
GUI::Text("CoolTime");
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
else {
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
|
||||
GUI::Text("You must go Out");
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
}
|
||||
|
||||
if (false == CastToPlayer() && false == m_bEntered) {
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
|
||||
GUI::Text("Waiting For ReEnter");
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
|
||||
{ // 세트
|
||||
m_pCallBack_HitReport->BeginFrame();
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
}
|
||||
|
||||
void CNPC_Ollivander::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pTransformCom->Get_EstimatedPositionByMomentum());
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -72,6 +137,7 @@ HRESULT CNPC_Ollivander::Render()
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
@@ -145,6 +211,19 @@ HRESULT CNPC_Ollivander::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CNPC_Ollivander::CastToPlayer()
|
||||
{
|
||||
_vector vCurrentPos = m_pTransformCom->Get_State(STATE::POSITION);
|
||||
_vector vTargetPos = {};
|
||||
pair<CUnit*, CTransform*> pairAllyInfo = m_pInfoInstance->Get_NearestPlayerAlly(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
vTargetPos = pairAllyInfo.second->Get_State(STATE::POSITION);
|
||||
_float fLength = XMVectorGetX(XMVector4Length(vTargetPos - vCurrentPos));
|
||||
if (fLength < m_fEncounterDistance) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
HRESULT CNPC_Ollivander::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
@@ -159,13 +238,22 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(40.f, 4.f, 68.9f, 1.f));
|
||||
m_pModelCom->Set_AnimationIndex(m_pGameInstance->Random_Int(0, 19), false);
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(40.f, 4.f, 68.9f, 1.f));
|
||||
m_pModelCom->Set_AnimationIndex(0, true);
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
|
||||
Desc.fSpeedPerSec = 10.f;
|
||||
Desc.fRotationPerSec = XMConvertToRadians(180.0f);
|
||||
Desc.fRadius = 10.f;
|
||||
|
||||
if (FAILED(__super::Ready_Components(&Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -179,6 +267,28 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.0001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 0.6f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -209,30 +319,25 @@ CGameObject* CNPC_Ollivander::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CNPC_Ollivander::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
}
|
||||
if (nullptr != m_pCallBack_Behavior) {
|
||||
m_pCallBack_Behavior->Finalize();
|
||||
}
|
||||
if (nullptr != m_pCallBack_HitReport) {
|
||||
m_pCallBack_HitReport->Finalize();
|
||||
}
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CNPC_Ollivander::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
m_pModelCom->Describe_Entity();
|
||||
if (ImGui::TreeNode("ANIM STATE")) {
|
||||
|
||||
for (auto& pState : m_States)
|
||||
{
|
||||
if (ImGui::Button(to_string(pState.first).c_str()))
|
||||
{
|
||||
m_pFSM->Change_State(pState.first);
|
||||
}
|
||||
}
|
||||
|
||||
GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str());
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
#include "Wand.h"
|
||||
#include "Item_Potion.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CamPosition_Shoulder.h"
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
#include "Monster.h"
|
||||
#include "Broom.h"
|
||||
@@ -95,10 +95,14 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
|
||||
m_pInfoInstance->Regist_PlayerAlly(this);
|
||||
m_pInfoInstance->Set_Damage(m_pStat->Get_Stat().fDamage);
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(-21.f, 0.f, -14.f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-21.f, 0.f, -14.f, 1.f));
|
||||
|
||||
{
|
||||
PLAYERDESC* pDesc = static_cast<PLAYERDESC*>(pArg);
|
||||
_vector vPos = XMLoadFloat4(&pDesc->vPos);
|
||||
_vector vRotQ = XMLoadFloat4(&pDesc->vRotQ);
|
||||
m_pCharacter_Controller->Set_Position(vPos);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vPos);
|
||||
m_pTransformCom->Rotation(vRotQ);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_BasicEffect = make_unique<BasicEffect>(m_pDevice);
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CCallBack_NonPlayable_Behavior final : public PSX::PxControllerBehaviorCallback
|
||||
{
|
||||
// 구현 예시
|
||||
// CCT는 RigidBody의 PxSimulationEventCallback에 안걸리고, 이 전용 콜백에서 처리되는 구조임
|
||||
//
|
||||
// PxUserControllerHitReport = "무엇과 부딪혔는지 알려줌(이벤트 알림)"
|
||||
// PxControllerBehaviorCallback = "부딪힌 것에 대해 어떤 행동 정책을 쓸지 물어봄(질의)"
|
||||
// PxSimulationEventCallback = "씬 전체에 대한 글로벌 콜백(일반 물리 이벤트)"
|
||||
private:
|
||||
CCallBack_NonPlayable_Behavior();
|
||||
public:
|
||||
~CCallBack_NonPlayable_Behavior();
|
||||
|
||||
public:
|
||||
// PxControllerBehaviorCallback을(를) 통해 상속됨
|
||||
// 충돌알림이 아닌, 행동정책 정해주기. CCT vs CCT는 지원안함
|
||||
// slopeLimit로 미끄러져 갈 수 있는지 없는지 이분법적인 계산 대신, 원하는 물체에 대해서만 미끄러운 표면으로 정의해줌
|
||||
// 주인이 되는 CCT가 이 물체에 대해 이 물체를 어떻게 해야 할까? -> (타고 올라갈까? Ride?) (미끄러져갈까? Slide?) ( 직접 내가 구현할까? user defined ride? )
|
||||
virtual PSX::PxControllerBehaviorFlags getBehaviorFlags(const PSX::PxShape& shape, const PSX::PxActor& actor) override;
|
||||
|
||||
virtual PSX::PxControllerBehaviorFlags getBehaviorFlags(const PSX::PxController& controller) override;
|
||||
|
||||
virtual PSX::PxControllerBehaviorFlags getBehaviorFlags(const PSX::PxObstacle& obstacle) override;
|
||||
|
||||
public:
|
||||
HRESULT Initialize(CCharacter_Controller* pController);
|
||||
HRESULT Finalize();
|
||||
private:
|
||||
CCharacter_Controller* m_pController = { nullptr };
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
|
||||
public:
|
||||
static CCallBack_NonPlayable_Behavior* Create();
|
||||
};
|
||||
NS_END
|
||||
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CCallBack_NonPlayable_HitReport final : public PSX::PxUserControllerHitReport
|
||||
{
|
||||
// 구현 예시
|
||||
// CCT는 RigidBody의 PxSimulationEventCallback에 안걸리고, 이 전용 콜백에서 처리되는 구조임
|
||||
//
|
||||
// PxUserControllerHitReport = "무엇과 부딪혔는지 알려줌(이벤트 알림)"
|
||||
// PxControllerBehaviorCallback = "부딪힌 것에 대해 어떤 행동 정책을 쓸지 물어봄(질의)"
|
||||
// PxSimulationEventCallback = "씬 전체에 대한 글로벌 콜백(일반 물리 이벤트)"
|
||||
private:
|
||||
CCallBack_NonPlayable_HitReport();
|
||||
public:
|
||||
~CCallBack_NonPlayable_HitReport();
|
||||
|
||||
void BeginFrame();
|
||||
|
||||
public:
|
||||
// PxUserControllerHitReport을(를) 통해 상속됨
|
||||
// 충돌알림!!
|
||||
// 주인이 되는 CCT가 이 물체에 대해 어떻게 반응해야 할까?
|
||||
virtual void onShapeHit(const PSX::PxControllerShapeHit& hit) override; // statc, rigid 등과 부딪힌 경우
|
||||
|
||||
virtual void onControllerHit(const PSX::PxControllersHit& hit) override; // 다른 CCT와 부딪힌 경우
|
||||
|
||||
virtual void onObstacleHit(const PSX::PxControllerObstacleHit& hit) override; // 사용자 정의 장애물과 부딪힌 경우
|
||||
|
||||
void Set_CurrentSlop();
|
||||
|
||||
public:
|
||||
HRESULT Initialize(CCharacter_Controller* pController);
|
||||
HRESULT Finalize();
|
||||
_bool IsOnGround();
|
||||
_vector Get_GroundVector();
|
||||
private:
|
||||
CCharacter_Controller* m_pController = { nullptr };
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
|
||||
_float3 m_vClimbNormal = { 0.f, 1.f, 0.f };
|
||||
_float m_fBestNormal = { 0.f };
|
||||
_bool m_bGroundHit = { false };
|
||||
public:
|
||||
static CCallBack_NonPlayable_HitReport* Create();
|
||||
};
|
||||
NS_END
|
||||
@@ -26,11 +26,13 @@ class CLevel_Field final : public CLevel
|
||||
HRESULT Ready_Layer_SkyBox();
|
||||
HRESULT Ready_Background();
|
||||
HRESULT Ready_Markers();
|
||||
HRESULT Ready_Layer_Player(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Camera();
|
||||
HRESULT Ready_Layer_Sound();
|
||||
HRESULT Ready_Layer_Effect(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Monster();
|
||||
HRESULT Reday_Layer_EffectPool();
|
||||
|
||||
public:
|
||||
static pair<CLevel*, function<void()>> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg);
|
||||
|
||||
@@ -19,13 +19,22 @@ class CNPC_Ollivander final : public CUnit
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CUnit* m_pPlayerAllyUnit = { nullptr };
|
||||
|
||||
|
||||
_bool m_bEntered = { false };
|
||||
_float2 m_vEnteringTimer = { 0.f, 1.f };
|
||||
_float m_fEncounterDistance = { 10.f };
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components(void* pArg);
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
_bool CastToPlayer();
|
||||
|
||||
public:
|
||||
static CNPC_Ollivander* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -7,6 +7,11 @@ NS_BEGIN(Client)
|
||||
|
||||
class CPlayer final : public CUnit
|
||||
{
|
||||
public:
|
||||
typedef struct tagPlayerInitDesc {
|
||||
_float4 vPos;
|
||||
_float4 vRotQ;
|
||||
}PLAYERDESC;
|
||||
private:
|
||||
CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CPlayer(const CPlayer& Prototype);
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
@@ -164,7 +164,7 @@ CGameObject* CDummy_PhysXBox::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CDummy_PhysXBox::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
|
||||
__super::Free();
|
||||
|
||||
@@ -154,7 +154,7 @@ CGameObject* CDummy_PhysXWall::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CDummy_PhysXWall::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
|
||||
__super::Free();
|
||||
|
||||
@@ -329,7 +329,7 @@ CGameObject* CMapElement_Chest::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CMapElement_Chest::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ CGameObject* CMapElement_Door::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CMapElement_Door::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ CGameObject* CMapElement_Interactable::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CMapElement_Interactable::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
|
||||
@@ -1044,9 +1044,9 @@ void CGameInstance::Detach_Actor(PSX::PxActor& Actor, _uint iLevel)
|
||||
{
|
||||
m_pPhysX_Manager->Detach_Actor(Actor, iLevel);
|
||||
}
|
||||
void CGameInstance::Release_Actor(PSX::PxActor& Actor, _uint iLevel)
|
||||
void CGameInstance::Release_Actor(PSX::PxActor& Actor)
|
||||
{
|
||||
m_pPhysX_Manager->Detach_Actor(Actor, iLevel);
|
||||
m_pPhysX_Manager->Release_Actor(Actor);
|
||||
}
|
||||
HRESULT CGameInstance::ConvertToTriMeshes(vector<class CMesh*>& Meshes, vector<class PSX::PxTriangleMesh*>& pxTriMeshes, _fmatrix WorldMatrix)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,8 @@ PSX::PxRigidDynamic* CPhysX_Manager::Add_DynamicActor(CRigidBody_Dynamic& RigidB
|
||||
PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel)
|
||||
{
|
||||
_matrix WorldMatrix = RigidBody.Get_TransformPtr()->Get_XMWorldMatrix();
|
||||
PSX::PxTransform pxWorldMatrix = XMWorldToPx_NoScale(WorldMatrix);
|
||||
PSX::PxTransform pxWorldMatrix = XMWorldToPx_NoScale(WorldMatrix);
|
||||
|
||||
|
||||
// PxRigidStatic 씬의 정적 바디 인터페이스
|
||||
PSX::PxRigidStatic* pActor = m_pPhysics->createRigidStatic(pxWorldMatrix);
|
||||
@@ -494,18 +495,24 @@ unordered_set<PSX::PxActor*>::iterator CPhysX_Manager::Detach_Actor(PSX::PxActor
|
||||
return iterOut;
|
||||
}
|
||||
|
||||
void CPhysX_Manager::Release_Actor(PSX::PxActor& Actor, _uint iLevel)
|
||||
void CPhysX_Manager::Release_Actor(PSX::PxActor& Actor)
|
||||
{
|
||||
// 혹시 활성화 맵에 들어있을 수도 있으니 검사
|
||||
unordered_set<PSX::PxActor*>::iterator iterResult = Detach_Actor(Actor, iLevel);
|
||||
if (m_pRestBodies[iLevel].end() != iterResult) { // 방금 전까지만 해도 활성화 중이었던 액터 라면
|
||||
m_pRestBodies[iLevel].erase(iterResult); // 바로 지워줌
|
||||
unordered_set<PSX::PxActor*>::iterator iterResult = {};
|
||||
_uint iReleasedLevel = UINT_MAX;
|
||||
for (_uint iLevel = 0; iLevel < m_iMaxLevel; ++iLevel) {
|
||||
iterResult = Detach_Actor(Actor, iLevel);
|
||||
if (m_pRestBodies[iLevel].end() != iterResult) { // 방금 전까지만 해도 활성화 중이었던 액터 라면
|
||||
m_pRestBodies[iLevel].erase(iterResult); // 바로 지워줌
|
||||
iReleasedLevel = iLevel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_pActiveBodys[iLevel].erase(&Actor);
|
||||
m_pRestBodies[iLevel].erase(&Actor);
|
||||
if (UINT_MAX == iReleasedLevel) {
|
||||
m_pActiveBodys[iReleasedLevel].erase(&Actor);
|
||||
m_pRestBodies[iReleasedLevel].erase(&Actor);
|
||||
}
|
||||
Actor.release();
|
||||
//Actor.release();
|
||||
}
|
||||
|
||||
PSX::PxController* CPhysX_Manager::Add_CapsuleController(PSX::PxCapsuleControllerDesc& Desc)
|
||||
@@ -647,7 +654,7 @@ HRESULT CPhysX_Manager::Initialize(_uint iLevel)
|
||||
PlaneData.pOwner = nullptr;
|
||||
PlaneData.pBody = nullptr;
|
||||
|
||||
PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 50), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]);
|
||||
PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 85), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]);
|
||||
pGroundPlane->userData = &PlaneData;
|
||||
pGroundPlane->setName("PHYSX_MANAGER_PLANE");
|
||||
m_pScene->addActor(*pGroundPlane);
|
||||
|
||||
@@ -393,9 +393,11 @@ HRESULT CVIBuffer_Terrain::Initialize(void* pArg)
|
||||
|
||||
void CVIBuffer_Terrain::ConvertToHeightField(const _tchar* pStaticKey)
|
||||
{
|
||||
PSX::PxHeightFieldDesc Desc{};
|
||||
Desc.format = PSX::PxHeightFieldFormat::eS16_TM;
|
||||
|
||||
vector<PSX::PxHeightFieldSample> pxSamples = {};
|
||||
pxSamples.resize(m_iNumVerticesZ * m_iNumVerticesX);
|
||||
|
||||
for (_uint iRow = 0; iRow < m_iNumVerticesZ; ++iRow) {
|
||||
for (_uint iCol = 0; iCol < m_iNumVerticesX; ++iCol) {
|
||||
_uint iIndex = iRow * m_iNumVerticesX + iCol;
|
||||
@@ -411,11 +413,9 @@ void CVIBuffer_Terrain::ConvertToHeightField(const _tchar* pStaticKey)
|
||||
pxSample.clearTessFlag();
|
||||
}
|
||||
}
|
||||
Desc.nbRows = m_iNumVerticesX;
|
||||
Desc.nbColumns = m_iNumVerticesZ;
|
||||
|
||||
PSX::PxHeightFieldDesc Desc{};
|
||||
Desc.format = PSX::PxHeightFieldFormat::eS16_TM;
|
||||
Desc.nbRows = m_iNumVerticesZ;
|
||||
Desc.nbColumns = m_iNumVerticesX;
|
||||
|
||||
Desc.samples.data = pxSamples.data();
|
||||
Desc.samples.stride = sizeof(PSX::PxHeightFieldSample);
|
||||
@@ -426,7 +426,6 @@ void CVIBuffer_Terrain::ConvertToHeightField(const _tchar* pStaticKey)
|
||||
else {
|
||||
m_pGameInstance->RegistHeight(pStaticKey, Desc, m_pGameInstance->Get_NextLevelID());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_bool CVIBuffer_Terrain::Picking(_fmatrix WorldMatrix, _float3* pOut)
|
||||
|
||||
@@ -184,6 +184,7 @@ enum class PXOBJECT : _uint {
|
||||
#pragma endregion
|
||||
#pragma region NPC
|
||||
NPC = 500,
|
||||
OLLIVANDER,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region ITEM
|
||||
|
||||
@@ -223,7 +223,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
void ReleaseController(_uint iControllerIndex);
|
||||
void Attach_Actor(PSX::PxActor& Actor, _uint iLevel);
|
||||
void Detach_Actor(PSX::PxActor& pActor, _uint iLevel);
|
||||
void Release_Actor(PSX::PxActor& Actor, _uint iLevel);
|
||||
void Release_Actor(PSX::PxActor& Actor);
|
||||
HRESULT ConvertToTriMeshes(vector<class CMesh*>& Meshes, vector<class PSX::PxTriangleMesh*>& pxTriMeshes, _fmatrix WorldMatrix = XMMatrixIdentity());
|
||||
#ifdef EDITOR_PROJECT
|
||||
HRESULT SaveTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes);
|
||||
|
||||
@@ -51,7 +51,7 @@ class CPhysX_Manager final : public CBase
|
||||
void ClearScene(_uint iLevel);
|
||||
void Attach_Actor(PSX::PxActor& Actor, _uint iLevel);
|
||||
unordered_set<PSX::PxActor*>::iterator Detach_Actor(PSX::PxActor& Actor, _uint iLevel);
|
||||
void Release_Actor(PSX::PxActor& Actor, _uint iLevel);
|
||||
void Release_Actor(PSX::PxActor& Actor);
|
||||
#pragma endregion
|
||||
#pragma region CHARACTER_CONTROLLER
|
||||
/* dev-treadmill.tistory.com/158 */
|
||||
|
||||
Reference in New Issue
Block a user