Merge branch 'Develope' into Effect
This commit is contained in:
@@ -185,6 +185,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\InteractiveInfo.h" />
|
||||
<ClInclude Include="..\Public\Intro_BG.h" />
|
||||
<ClInclude Include="..\Public\Intro_Image.h" />
|
||||
<ClInclude Include="..\Public\Item_Potion.h" />
|
||||
<ClInclude Include="..\public\Land.h" />
|
||||
<ClInclude Include="..\Public\Levioso.h" />
|
||||
<ClInclude Include="..\Public\Loding_Panel.h" />
|
||||
@@ -198,6 +199,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\NPC_Ollivander.h" />
|
||||
<ClInclude Include="..\Public\Box_Splesh.h" />
|
||||
<ClInclude Include="..\Public\StunEffect.h" />
|
||||
<ClInclude Include="..\public\MapElement_Door.h" />
|
||||
<ClInclude Include="..\Public\State_Broom_Dismount.h" />
|
||||
<ClInclude Include="..\Public\State_Shield.h" />
|
||||
<ClInclude Include="..\Public\State_Broom_Fly.h" />
|
||||
@@ -365,6 +367,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\InteractiveInfo.cpp" />
|
||||
<ClCompile Include="..\Private\Intro_BG.cpp" />
|
||||
<ClCompile Include="..\Private\Intro_Image.cpp" />
|
||||
<ClCompile Include="..\Private\Item_Potion.cpp" />
|
||||
<ClCompile Include="..\private\Land.cpp" />
|
||||
<ClCompile Include="..\Private\Levioso.cpp" />
|
||||
<ClCompile Include="..\Private\Loding_Panel.cpp" />
|
||||
@@ -372,6 +375,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Logo_Glow.cpp" />
|
||||
<ClCompile Include="..\Private\Logo_Text.cpp" />
|
||||
<ClCompile Include="..\Private\NPC_Ollivander.cpp" />
|
||||
<ClCompile Include="..\private\MapElement_Door.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_Dismount.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_Fly.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_Hover.cpp" />
|
||||
|
||||
@@ -532,7 +532,7 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Barral_Splesh.h">
|
||||
<Filter>02.GameObjects\Effect\PropsEffect\Barral</Filter>
|
||||
</ClInclude>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Broom_Hover.h">
|
||||
<Filter>04.Mechanic\State\Broom_Player\State_Broom_Hover</Filter>
|
||||
</ClInclude>
|
||||
@@ -551,6 +551,12 @@
|
||||
<ClInclude Include="..\Public\State_Shield.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Shield</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement_Door.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Door</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Item_Potion.h">
|
||||
<Filter>02.GameObjects\Item\Potion</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1145,7 +1151,7 @@
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\PropsEffect\Chair">
|
||||
<UniqueIdentifier>{3103c6e1-60cb-438b-a3eb-844b919ccd43}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Broom_Player\State_Broom_Hover">
|
||||
<UniqueIdentifier>{24f6903f-8f6b-46ff-a387-ecb44d673887}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -1164,6 +1170,12 @@
|
||||
<Filter Include="02.GameObjects\NPC\Ally\Shopper">
|
||||
<UniqueIdentifier>{02cb243a-f63e-4e55-9d55-b47e31a4c13e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement\Door">
|
||||
<UniqueIdentifier>{b09f9ada-6cf4-41a4-ad28-f00855509825}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Item\Potion">
|
||||
<UniqueIdentifier>{ace6c64f-901a-424e-99da-53f281413d77}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -1640,7 +1652,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Chair_Splesh.cpp">
|
||||
<Filter>02.GameObjects\Effect\PropsEffect\Chair</Filter>
|
||||
</ClCompile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Broom_Hover.cpp">
|
||||
<Filter>04.Mechanic\State\Broom_Player\State_Broom_Hover</Filter>
|
||||
</ClCompile>
|
||||
@@ -1659,6 +1671,12 @@
|
||||
<ClCompile Include="..\Private\NPC_Ollivander.cpp">
|
||||
<Filter>02.GameObjects\NPC\Ally\Shopper</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement_Door.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Door</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Item_Potion.cpp">
|
||||
<Filter>02.GameObjects\Item\Potion</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
|
||||
@@ -41,8 +41,9 @@ HRESULT CCamPosition_Shoulder::Initialize(void* pArg)
|
||||
|
||||
_vector vLookTargetPos = Calc_LookTargetPos();
|
||||
m_pLookTransform->Set_State(STATE::POSITION, vLookTargetPos);
|
||||
m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos));
|
||||
m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos) + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
}
|
||||
m_bDampingParentPos = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -153,6 +154,15 @@ void CCamPosition_Shoulder::Late_Update(_float fTimeDelta)
|
||||
m_fFollowTargetIncludedAngleDegree = CMyTools::Lerp_f1D(m_vShoulderLerpDegree.x, m_vShoulderLerpDegree.y, fLerpRatio);
|
||||
}
|
||||
}
|
||||
if (true == m_bStartGame) {
|
||||
m_vStartLerpTimer.x += fTimeDelta;
|
||||
if (m_vStartLerpTimer.x >= m_vStartLerpTimer.y) {
|
||||
m_vStartLerpTimer.x = 0.f;
|
||||
m_bDampingParentPos = true;
|
||||
m_bStartGame = false;
|
||||
}
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI_OVERLAY, this);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CCamPosition_Shoulder::Render()
|
||||
@@ -185,8 +195,19 @@ _vector CCamPosition_Shoulder::Calc_FollowTargetPos(_vector vLookTargetWorldPos)
|
||||
_vector fRotQ = XMQuaternionRotationAxis(XMVectorSet(0.f, 1.f, 0.f, 0.f), XMConvertToRadians(-m_fFollowTargetIncludedAngleDegree));
|
||||
_vector vDestPos = Calc_DampingParentPos();
|
||||
_vector vHeadPos = vDestPos + XMVectorSet(0.f, m_fHeadHeight, 0.f, 0.f);
|
||||
_vector vDir = XMVector3Normalize(vHeadPos - vLookTargetWorldPos);
|
||||
vDir = XMVector3Rotate(vDir, fRotQ);
|
||||
_vector vDir = vHeadPos - vLookTargetWorldPos;
|
||||
_float fLengthSQ = XMVectorGetX(XMVector3LengthSq(vDir));
|
||||
|
||||
if (fLengthSQ < FLT_EPSILON)
|
||||
{
|
||||
vDir = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
vDir = XMVector3Rotate(vDir, fRotQ);
|
||||
}
|
||||
else
|
||||
{
|
||||
vDir = XMVector3Normalize(vDir);
|
||||
vDir = XMVector3Rotate(vDir, fRotQ);
|
||||
}
|
||||
|
||||
m_BufferHit = {};
|
||||
_bool bHit = m_pGameInstance->SphereCast( 0.25f, vLookTargetWorldPos, vDir, fBestFollowTargetDistance,
|
||||
@@ -250,7 +271,11 @@ _vector CCamPosition_Shoulder::Calc_FollowTargetPos(_vector vLookTargetWorldPos)
|
||||
}
|
||||
_vector CCamPosition_Shoulder::Calc_DampingParentPos()
|
||||
{
|
||||
return XMVectorLerp(XMLoadFloat4(&m_vDampingStartPosition), XMLoadFloat4(&m_vDampingDestPosition), m_vDampingLerpTimer.x / m_vDampingLerpTimer.y);
|
||||
_float duration = max(m_vDampingLerpTimer.y, FLT_EPSILON);
|
||||
_float fTime = m_vDampingLerpTimer.x / duration;
|
||||
fTime = CMyTools::Saturate(fTime); // 0~1
|
||||
|
||||
return XMVectorLerp(XMLoadFloat4(&m_vDampingStartPosition), XMLoadFloat4(&m_vDampingDestPosition), fTime);
|
||||
}
|
||||
void CCamPosition_Shoulder::Set_CameraShake(_float fXShock, _float fYShock)
|
||||
{
|
||||
@@ -297,9 +322,11 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||
CCamPosition_Target::CAMERAPOSITION_TARGET_DESC Desc{};
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
m_pTarget_LookPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc);
|
||||
m_pTarget_LookPart->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -10.4f, 1.f));
|
||||
m_pTarget_FollowPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc);
|
||||
m_pTarget_FollowPart->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -11.4f, 1.f));
|
||||
}
|
||||
|
||||
|
||||
CCamera_Gaze::CAMERA_GAZE_DESC CameraDesc{};
|
||||
CameraDesc.fFovy = XMConvertToRadians(60.0f);
|
||||
CameraDesc.fNear = 0.1f;
|
||||
@@ -321,8 +348,11 @@ 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))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,13 @@ CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs)
|
||||
|
||||
void CCamera_Debug::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifndef 기무리
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, false);
|
||||
#endif // _DEBUG
|
||||
#endif // !기무리
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CCamera_Debug::Update(_float fTimeDelta)
|
||||
|
||||
@@ -20,14 +20,16 @@ void CCamera_Gaze::Priority_Update(_float fTimeDelta)
|
||||
}
|
||||
if (false == m_bIsCurrentTransition) {
|
||||
if (m_bEnable_FollowLerp) {
|
||||
_vector vNewPos = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vFollowPos_Src), XMLoadFloat3(&m_vFollowPos_Dest), m_vFollowLerpTime.x / m_vFollowLerpTime.y), 1.f);
|
||||
_float fTimeDenom = max(m_vFollowLerpTime.y, FLT_EPSILON);
|
||||
_vector vNewPos = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vFollowPos_Src), XMLoadFloat3(&m_vFollowPos_Dest), CMyTools::Saturate(m_vFollowLerpTime.x / fTimeDenom)), 1.f);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vNewPos);
|
||||
}
|
||||
else {
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pFollowTarget->Get_Component<CTransform>()->Get_State(STATE::POSITION));
|
||||
}
|
||||
if (m_bEnable_LookLerp) {
|
||||
_vector vNewLook = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vLookPos_Src), XMLoadFloat3(&m_vLookPos_Dest), m_vLookLerpTime.x / m_vLookLerpTime.y), 1.f);
|
||||
_float fTimeDenom = max(m_vLookLerpTime.y, FLT_EPSILON);
|
||||
_vector vNewLook = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vLookPos_Src), XMLoadFloat3(&m_vLookPos_Dest), CMyTools::Saturate(m_vLookLerpTime.x / fTimeDenom)), 1.f);
|
||||
m_pTransformCom->LookAt(vNewLook);
|
||||
}
|
||||
else {
|
||||
@@ -82,14 +84,18 @@ void CCamera_Gaze::Enable_FollowLerp()
|
||||
{
|
||||
m_bEnable_FollowLerp = true;
|
||||
m_vFollowLerpTime.x = 0.f;
|
||||
XMStoreFloat3(&m_vFollowPos_Src, m_pFollowTarget->Get_WorldPostion());
|
||||
|
||||
XMStoreFloat3(&m_vFollowPos_Src, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
XMStoreFloat3(&m_vFollowPos_Dest, m_pFollowTarget->Get_WorldPostion());
|
||||
}
|
||||
|
||||
void CCamera_Gaze::Enable_LookLerp()
|
||||
{
|
||||
m_bEnable_LookLerp = true;
|
||||
m_vLookLerpTime.x = 0.f;
|
||||
XMStoreFloat3(&m_vLookPos_Src, m_pLookTarget->Get_WorldPostion());
|
||||
_vector vLookTargetPos = m_pLookTarget->Get_WorldPostion();
|
||||
XMStoreFloat3(&m_vLookPos_Src, vLookTargetPos);
|
||||
XMStoreFloat3(&m_vLookPos_Dest, vLookTargetPos);
|
||||
}
|
||||
|
||||
void CCamera_Gaze::Toggle_Priority()
|
||||
@@ -127,6 +133,8 @@ HRESULT CCamera_Gaze::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pFollowTarget->Get_WorldPostion());
|
||||
m_pTransformCom->LookAt(m_pLookTarget->Get_WorldPostion());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -171,19 +171,6 @@ HRESULT CEffectPool::Bind_ShaderResources()
|
||||
|
||||
HRESULT CEffectPool::Ready_Effect()
|
||||
{
|
||||
#ifdef 기무리
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::JAP, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
CNomalJap* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CNomalJap>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
#endif // 기무리
|
||||
|
||||
|
||||
#ifndef 기무리
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::JAP, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
CNomalJap* pEffect = nullptr;
|
||||
|
||||
@@ -326,8 +313,6 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
#endif // !기무리
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,10 @@ HRESULT CGoblin_BattleAxe::Initialize(void* pArg)
|
||||
|
||||
void CGoblin_BattleAxe::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible) {
|
||||
XMStoreFloat4(&m_vStartAxePos, Get_WorldPostion());
|
||||
XMStoreFloat4(&m_vStartGripPos, Get_WorldPostion());
|
||||
}
|
||||
m_pModelCom->Combined_BoneMatrix();
|
||||
_matrix socketMatrix = {};
|
||||
|
||||
@@ -75,7 +79,13 @@ void CGoblin_BattleAxe::Update(_float fTimeDelta)
|
||||
|
||||
void CGoblin_BattleAxe::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
SwingHit(m_bPlayerHit);
|
||||
}
|
||||
else {
|
||||
m_bPlayerHit = false;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CGoblin_BattleAxe::Render()
|
||||
@@ -83,8 +93,10 @@ HRESULT CGoblin_BattleAxe::Render()
|
||||
if (!m_pModelCom)
|
||||
return S_OK;
|
||||
|
||||
if (!m_bVisible)
|
||||
if (!m_bVisible) {
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
@@ -193,6 +205,93 @@ HRESULT CGoblin_BattleAxe::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGoblin_BattleAxe::CheckAxeHits(_uint& iHitCount, vector<PSX::PxSweepHit>& pxHits)
|
||||
{
|
||||
{
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartAxePos);
|
||||
_vector vEndPos = XMVectorSet(m_vAxeMat._41, m_vAxeMat._42, m_vAxeMat._43,1.f);
|
||||
_vector vDir = vEndPos - vStartPos;
|
||||
_float fDistance = XMVectorGetX(XMVector4Length(vDir));
|
||||
vDir = XMVector4Normalize(vDir);
|
||||
|
||||
_bool bCollision = false;
|
||||
m_SweepBufferAxe = {};
|
||||
bCollision = m_pGameInstance->SphereCast(1.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferAxe);
|
||||
if (true == bCollision) {
|
||||
iHitCount += m_SweepBufferAxe.getNbTouches() + m_SweepBufferAxe.hasBlock;
|
||||
auto touches = m_SweepBufferAxe.getTouches();
|
||||
for (_uint i = 0; i < m_SweepBufferAxe.nbTouches; ++i) {
|
||||
pxHits.push_back(m_SweepBufferAxe.touches[i]);
|
||||
}
|
||||
if (true == m_SweepBufferAxe.hasBlock) {
|
||||
pxHits.push_back(m_SweepBufferAxe.block);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartGripPos);
|
||||
_vector vEndPos = m_pTransformCom->Get_State(STATE::POSITION);
|
||||
_vector vDir = vEndPos - vStartPos;
|
||||
_float fDistance = XMVectorGetX(XMVector4Length(vDir));
|
||||
vDir = XMVector4Normalize(vDir);
|
||||
|
||||
_bool bCollision = false;
|
||||
m_SweepBufferGrip = {};
|
||||
bCollision = m_pGameInstance->SphereCast(1.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferGrip);
|
||||
if (true == bCollision) {
|
||||
iHitCount += m_SweepBufferGrip.getNbTouches() + m_SweepBufferGrip.hasBlock;
|
||||
auto touches = m_SweepBufferGrip.getTouches();
|
||||
for (_uint i = 0; i < m_SweepBufferGrip.nbTouches; ++i) {
|
||||
pxHits.push_back(m_SweepBufferGrip.touches[i]);
|
||||
}
|
||||
if (true == m_SweepBufferGrip.hasBlock) {
|
||||
pxHits.push_back(m_SweepBufferGrip.block);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CGoblin_BattleAxe::SwingHit(_bool& bPlayerHit)
|
||||
{
|
||||
vector<PSX::PxSweepHit> pxHits;
|
||||
_uint iHitCount = 0;
|
||||
CheckAxeHits(iHitCount, pxHits);
|
||||
{
|
||||
for (_uint i = 0; i < pxHits.size(); ++i) {
|
||||
PSX::PxActor* pxHitActor = pxHits[i].actor;
|
||||
if (nullptr != pxHitActor && nullptr != pxHitActor->userData) {
|
||||
PhsXUserData* pUserData = (PhsXUserData*)pxHitActor->userData;
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::PLAYER:
|
||||
{
|
||||
if (true == bPlayerHit) {
|
||||
continue;
|
||||
}
|
||||
CStat* pStat = pUserData->pCharacter->Get_Owner()->Get_Component<CStat>();
|
||||
pStat->Get_Damage(20.f);
|
||||
bPlayerHit = true;
|
||||
pUserData->pOwner->OnCollision(this);
|
||||
} break;
|
||||
case PXOBJECT::ALLY_HITBOX:
|
||||
break;
|
||||
case PXOBJECT::ENVIRIONMENT:
|
||||
break;
|
||||
case PXOBJECT::TERRAIN:
|
||||
break;
|
||||
case PXOBJECT::BOX:
|
||||
break;
|
||||
case PXOBJECT::NPC:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CGoblin_BattleAxe* CGoblin_BattleAxe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
|
||||
@@ -123,6 +123,10 @@ HRESULT CInfoInstance::Load_WaterElemet(const _char* pFileName)
|
||||
{
|
||||
return m_pMapInfo->Load_WaterElemet(pFileName);
|
||||
}
|
||||
HRESULT CInfoInstance::Load_DoorElemet(const _char* pFileName)
|
||||
{
|
||||
return m_pMapInfo->Load_DoorElemet(pFileName);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region SPELL_INFO
|
||||
|
||||
@@ -61,7 +61,7 @@ HRESULT CInteractiveInfo::Refresh_LockOnTarget()
|
||||
_vector vCameraPos = m_pGameInstance->Get_CamXMPosition();
|
||||
_float fMaxDot = { 0.f };
|
||||
|
||||
_vector vMonsterPos;
|
||||
_vector vInteractablePos;
|
||||
_vector vToMonsterDir;
|
||||
_bool bAim = false;
|
||||
_float fFovy = 0.f;
|
||||
@@ -83,8 +83,11 @@ HRESULT CInteractiveInfo::Refresh_LockOnTarget()
|
||||
// (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상
|
||||
CMapElement_Interactable* pInteractive = (*iter);
|
||||
|
||||
vMonsterPos = pInteractive->Get_LockOnPos();
|
||||
vToMonsterDir = vMonsterPos - vCameraPos;
|
||||
vInteractablePos = pInteractive->Get_LockOnPos();
|
||||
vToMonsterDir = vInteractablePos - vCameraPos;
|
||||
if (150.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) {
|
||||
continue;
|
||||
}
|
||||
_float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir);
|
||||
if (fDotResult <= cosf(fFovy)) {
|
||||
continue;
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
#include "pch.h"
|
||||
#include "Item_Potion.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
CItem_Potion::CItem_Potion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CPartObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CItem_Potion::CItem_Potion(const CItem_Potion& Prototype)
|
||||
: CPartObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CItem_Potion::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CItem_Potion::Initialize(void* pArg)
|
||||
{
|
||||
POTION_DESC* pDesc = static_cast<POTION_DESC*> (pArg);
|
||||
m_pSocketMatrices = pDesc->pSocketMatrices;
|
||||
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CItem_Potion::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CItem_Potion::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Combined_BoneMatrix();
|
||||
|
||||
}
|
||||
|
||||
void CItem_Potion::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_fTimer += fTimeDelta;
|
||||
if (m_fTimer >= 1.7f) {
|
||||
m_fTimer = 0.f;
|
||||
m_bVisible = false;
|
||||
}
|
||||
|
||||
}
|
||||
if (m_bAttach)
|
||||
{
|
||||
_matrix socketMatrix = {};
|
||||
|
||||
socketMatrix = XMLoadFloat4x4(m_pSocketMatrices);
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]);
|
||||
}
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
|
||||
}
|
||||
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CItem_Potion::Render()
|
||||
{
|
||||
if (!m_pModelCom)
|
||||
return S_OK;
|
||||
|
||||
if (!m_bVisible)
|
||||
return S_OK;
|
||||
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CItem_Potion::Set_Attach(_bool Attach)
|
||||
{
|
||||
m_bAttach = Attach;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CItem_Potion::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Potion_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CItem_Potion::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
CItem_Potion* CItem_Potion::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CItem_Potion* pInstance = new CItem_Potion(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CItem_Potion");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CItem_Potion::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CItem_Potion* pInstance = new CItem_Potion(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CItem_Potion");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CItem_Potion::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CItem_Potion::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -238,7 +238,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
isReady_Background = true;
|
||||
#endif // gimch
|
||||
#ifdef Bin
|
||||
isReady_Background = false;
|
||||
isReady_Background = true;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
isReady_Background = true;
|
||||
@@ -260,14 +260,15 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
else
|
||||
{
|
||||
/* 전체 맵 */
|
||||
//CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
|
||||
CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
|
||||
|
||||
/* 물 오브젝트 */
|
||||
if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info")))
|
||||
if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info"))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* 조명 오브젝트 */
|
||||
/*CInfoInstance::GetInstance()->Load_LightElements("LightElement");*/
|
||||
CInfoInstance::GetInstance()->Load_LightElements("LightElement");
|
||||
|
||||
/* 상호작용 오브젝트 */
|
||||
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel");
|
||||
@@ -276,6 +277,10 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopTable");
|
||||
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopChair");
|
||||
|
||||
/* Doors */
|
||||
CInfoInstance::GetInstance()->Load_DoorElemet("Element_Door_Info");
|
||||
|
||||
|
||||
if (FAILED(Ready_IntstanceProp()))
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -437,6 +442,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Camera()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
|
||||
Camera_Desc.fFovy = XMConvertToRadians(60.0f);
|
||||
Camera_Desc.fNear = 0.1f;
|
||||
@@ -461,6 +467,11 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, true))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "Troll_Rock.h"
|
||||
#include "Goblin_Dagger.h"
|
||||
#include "Wand.h"
|
||||
#include "Item_Potion.h"
|
||||
#include "Goblin_BattleAxe.h"
|
||||
|
||||
#pragma region ACTOR
|
||||
@@ -162,6 +163,7 @@
|
||||
#include "MapElement_Light.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "MapElement_Lake.h"
|
||||
#include "MapElement_Door.h"
|
||||
#include "Land.h"
|
||||
#include "Unified.h"
|
||||
|
||||
@@ -311,7 +313,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
isLoad_Background = true;
|
||||
#endif // gimch
|
||||
#ifdef Bin
|
||||
isLoad_Background = false;
|
||||
isLoad_Background = true;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
isLoad_Background = true;
|
||||
@@ -1470,6 +1472,11 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Potion_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/Potion/SM_Bottle_EmptyCapOff.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Broom_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
@@ -2110,6 +2117,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Interactable>(g_iStaticLevel, CMapElement_Interactable::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_MapElement_Door */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Door>(g_iStaticLevel, CMapElement_Door::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Unified */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Lake>(g_iStaticLevel, CMapElement_Lake::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -2183,6 +2194,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CWand>(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Potion */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CItem_Potion>(g_iStaticLevel, CItem_Potion::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Troll_Weapon */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTroll_Weapon>(g_iStaticLevel, CTroll_Weapon::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
#include "pch.h"
|
||||
#include "MapElement_Door.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Terrain.h"
|
||||
#include "Layer.h"
|
||||
#include "VIBuffer_Terrain.h"
|
||||
|
||||
CMapElement_Door::CMapElement_Door(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMapElement{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CMapElement_Door::CMapElement_Door(const CMapElement_Door& rhs)
|
||||
: CMapElement(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Initialize(void* pArg)
|
||||
{
|
||||
ELEMENT_DOOR_DESC* pDesc = static_cast<ELEMENT_DOOR_DESC*>(pArg);
|
||||
|
||||
m_iMaxLodLevel = pDesc->iMaxLodLevel;
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
}
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(pDesc->vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
|
||||
|
||||
//m_vBoxSize = _float3(1.f, 1.f, 1.f);
|
||||
//m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
|
||||
//static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize);
|
||||
//static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Door::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CMapElement_Door::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CMapElement_Door::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
//if (FAILED(m_pRigidBody->Render())) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
{
|
||||
CModel* pModel = { nullptr };
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
|
||||
reinterpret_cast<CComponent**>(&pModel))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelComs.push_back(pModel);
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
ELEMENT_DOOR_DESC* pPhysXDummyDesc = static_cast<ELEMENT_DOOR_DESC*>(pArg);
|
||||
|
||||
//// RIGID_BODY
|
||||
//CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
//Desc.iSubKind = ENUM_CLASS(PXOBJECT::BOX);//pPhysXDummyDesc->iSubKind;
|
||||
//if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CMapElement_Door* CMapElement_Door::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMapElement_Door* pInstance = new CMapElement_Door(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMapElement_Door");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CMapElement_Door::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CMapElement_Door* pInstance = new CMapElement_Door(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CMapElement_Door");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CMapElement_Door::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
//SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
for (auto& pModel : m_pModelComs)
|
||||
SAFE_RELEASE(pModel);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CMapElement_Door::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "MapElement_Light.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "MapElement_Lake.h"
|
||||
#include "MapElement_Door.h"
|
||||
#include "Layer.h"
|
||||
|
||||
CMapInfo::CMapInfo()
|
||||
@@ -573,6 +574,71 @@ HRESULT CMapInfo::Load_WaterElemet(const _char* pFileName)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Load_DoorElemet(const _char* pFileName)
|
||||
{
|
||||
tinyxml2::XMLDocument xmlDoc;
|
||||
|
||||
string strPath = "../Bin/Resources/Data/Map/Door/" + string(pFileName) + ".xml";
|
||||
|
||||
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
|
||||
return E_FAIL;
|
||||
|
||||
tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Doors");
|
||||
|
||||
if (nullptr == root)
|
||||
{
|
||||
MSG_BOX("Failed to Find root");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
{
|
||||
CMapElement_Door::ELEMENT_DOOR_DESC Desc = {};
|
||||
|
||||
/* Model Prototypes */
|
||||
Object->QueryUnsignedAttribute("Lod_Level", &Desc.iMaxLodLevel);
|
||||
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = Object->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
|
||||
/* Transform */
|
||||
auto* Position = Object->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
auto* Scale = Object->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
auto* Rotation = Object->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
//auto* HalfGeometryInfo = Object->FirstChildElement("HalfGeometryInfo");
|
||||
//HalfGeometryInfo->QueryFloatAttribute("x", &Desc.vBoxSize.x);
|
||||
//HalfGeometryInfo->QueryFloatAttribute("y", &Desc.vBoxSize.y);
|
||||
//HalfGeometryInfo->QueryFloatAttribute("z", &Desc.vBoxSize.z);
|
||||
|
||||
//auto* LocalTranslation = Object->FirstChildElement("LocalTranslation");
|
||||
//LocalTranslation->QueryFloatAttribute("x", &Desc.vBoxLocalPosition.x);
|
||||
//LocalTranslation->QueryFloatAttribute("y", &Desc.vBoxLocalPosition.y);
|
||||
//LocalTranslation->QueryFloatAttribute("z", &Desc.vBoxLocalPosition.z);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Door>(g_iStaticLevel, NEXT_LEVEL, LAYER_DOOR, &Desc)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||
{
|
||||
m_pGameInstance = CGameInstance::GetInstance();
|
||||
|
||||
@@ -94,6 +94,10 @@ void CMiniMap_Camera::Free()
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CMiniMap_Camera::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
@@ -142,7 +142,6 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
|
||||
{ // 뷰프러스텀 순회해서 가장 중앙에 근접한 몬스터 찾기
|
||||
for (list<CMonster*>::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter)
|
||||
{
|
||||
|
||||
// (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상
|
||||
CMonster* pMonster = (*iter);
|
||||
if (pMonster->Get_Hp().x <= 0) {
|
||||
@@ -150,6 +149,9 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
|
||||
}
|
||||
vMonsterPos = pMonster->Get_LockOnPos();
|
||||
vToMonsterDir = vMonsterPos - vCameraPos;
|
||||
if (150.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) {
|
||||
continue;
|
||||
}
|
||||
_float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir);
|
||||
if (fDotResult <= cosf(fFovy)) {
|
||||
continue;
|
||||
|
||||
@@ -25,7 +25,9 @@ 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
|
||||
@@ -39,6 +41,7 @@ void CNPC_Ollivander::Late_Update(_float fTimeDelta)
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pTransformCom->Get_EstimatedPositionByMomentum());
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this);
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
@@ -137,7 +140,8 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -11.4f, 1.f));
|
||||
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);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Camera_Gaze.h"
|
||||
#include "CamPosition_Arm.h"
|
||||
#include "Wand.h"
|
||||
#include "Item_Potion.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CamPosition_Shoulder.h"
|
||||
@@ -92,6 +93,7 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
m_pInfoInstance->Set_Damage(m_pStat->Get_Stat().fDamage);
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(-34.f, 5, -11.4f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -11.4f, 1.f));
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_BasicEffect = make_unique<BasicEffect>(m_pDevice);
|
||||
@@ -147,6 +149,14 @@ __super::Update(fTimeDelta);
|
||||
m_pInfoInstance->Mouse_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_UP));
|
||||
m_bAim = false;
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_1)) {
|
||||
if (m_pModelCom->Get_SecondAnimIndex() == m_Animation[STATEANIM::LUMOS].first)
|
||||
{
|
||||
m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R), m_Animation[STATEANIM::LUMOS_STOP].first, m_Animation[STATEANIM::LUMOS_STOP].second);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CPlayer::UpdateGrapInteractive(_float fTimeDelta)
|
||||
@@ -310,7 +320,6 @@ void CPlayer::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CPlayer::Start_CameraShake(_float fTime, _float fIntense)
|
||||
{
|
||||
@@ -319,6 +328,7 @@ void CPlayer::Start_CameraShake(_float fTime, _float fIntense)
|
||||
m_fCameraShakeIntense = fIntense;
|
||||
m_bCameraShake = true;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CPlayer::Render_CameraCoordinateSystem()
|
||||
{
|
||||
@@ -454,6 +464,18 @@ HRESULT CPlayer::Ready_Parts()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
CItem_Potion::POTION_DESC PotionDesc{};
|
||||
|
||||
PotionDesc.pParentTransform = m_pTransformCom;
|
||||
PotionDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand");
|
||||
|
||||
if (FAILED(Add_PartObject<CItem_Potion>("Potion", g_iStaticLevel, nullptr, &PotionDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Get_PartObject<CItem_Potion>()->Set_Visible(false);
|
||||
|
||||
{
|
||||
CCamPosition_Shoulder::CAMERA_SHOULDER_DESC Desc;
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "Camera_Gaze.h"
|
||||
#include "CamPosition_Arm.h"
|
||||
#include "Wand.h"
|
||||
#include "Item_Potion.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
@@ -215,6 +216,7 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
Get_PartObject<CItem_Potion>()->Set_Visible(true);
|
||||
m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_B)) {
|
||||
@@ -408,6 +410,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
Get_PartObject<CItem_Potion>()->Set_Visible(true);
|
||||
m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second);
|
||||
}
|
||||
|
||||
@@ -640,6 +643,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::SPRINT) ||
|
||||
!SUCCEEDED(InputMove())) {
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::STOP))
|
||||
@@ -844,6 +848,12 @@ void CPlayer::Behavior_CombatEnter()
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { Throwing_Interactive(); },
|
||||
0.2f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pGameInstance->SlowMotion(0.1f, 0.35f);
|
||||
},
|
||||
0.1f);
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
@@ -989,7 +999,7 @@ void CPlayer::Behavior_LightAttackEnter()
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {_uint iIndex = 0; m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject<CWand>(), &iIndex); },
|
||||
0.1f);
|
||||
0.07f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE, Get_PartObject<CWand>()); },
|
||||
@@ -1016,7 +1026,13 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck(_float fTimeDelta)
|
||||
_uint iNext = iCurr + 1;
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
|
||||
pairAnimInfo.first = iNext;
|
||||
|
||||
_float fAttackRatio;
|
||||
if (pairAnimInfo.first - m_Animation[STATEANIM::LIGHT_ATTACK].first == 3) {
|
||||
fAttackRatio = 0.12f;
|
||||
}
|
||||
else {
|
||||
fAttackRatio = 0.07f;
|
||||
}
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bLookAt = true;
|
||||
@@ -1032,7 +1048,7 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck(_float fTimeDelta)
|
||||
_uint comboIndex = m_pModelCom->Get_AnimIndex() - m_Animation[STATEANIM::LIGHT_ATTACK].first;
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject<CWand>(), &comboIndex);
|
||||
},
|
||||
0.05f);
|
||||
fAttackRatio);
|
||||
|
||||
Add_Event(iNext,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE,Get_PartObject<CWand>());
|
||||
@@ -1831,7 +1847,7 @@ void CPlayer::Behavior_Broom_DismountEnter()
|
||||
m_pTransformCom->Set_State(STATE::RIGHT, right);
|
||||
m_pTransformCom->Set_State(STATE::UP, up);
|
||||
m_pTransformCom->Set_State(STATE::LOOK, look);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,1.3f);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,1.6f);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta)
|
||||
@@ -2310,7 +2326,7 @@ void CPlayer::Set_Anim()
|
||||
m_Animation[STATEANIM::SPELL_90_L] = { 826,false };
|
||||
|
||||
m_Animation[STATEANIM::MAPHELP] = { 122,false };
|
||||
m_Animation[STATEANIM::POTION] = { 114,false }; // 114 포션 // 909 루모스
|
||||
m_Animation[STATEANIM::POTION] = { 115,false }; // 114 포션 // 909 루모스
|
||||
m_Animation[STATEANIM::ACCIO] = { 417,false };
|
||||
m_Animation[STATEANIM::DESCENDO] = { 857,false };
|
||||
m_Animation[STATEANIM::DEPULSO] = { 858,false };
|
||||
|
||||
@@ -55,9 +55,7 @@ void CTerrain::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CTerrain::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
//Describe_Entity();
|
||||
#endif // DEBUG
|
||||
|
||||
}
|
||||
|
||||
void CTerrain::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -337,7 +337,7 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
|
||||
_vector Head = (XMLoadFloat4x4(Get_HeadMatrix()) * m_pTransformCom->Get_XMWorldMatrix()).r[3];
|
||||
_vector Head = (XMLoadFloat4x4(Get_HeadMatrix()), m_pTransformCom->Get_XMWorldMatrix()).r[3];
|
||||
m_DamageInfo.vTarget_Pos = XMVectorSet(Head.m128_f32[0], Head.m128_f32[1], Head.m128_f32[2], 1.f);
|
||||
|
||||
CEffect_Container* pEffect_Container = dynamic_cast<CEffect_Container*>(pOther);
|
||||
@@ -368,7 +368,6 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CMapElement_Interactable* pProps = dynamic_cast<CMapElement_Interactable*>(pOther);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ CTroll_State_BackHand_Swing::CTroll_State_BackHand_Swing()
|
||||
|
||||
void CTroll_State_BackHand_Swing::Enter()
|
||||
{
|
||||
m_bPlayerHit = false;
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
@@ -22,13 +23,14 @@ HRESULT CTroll_State_BackHand_Swing::Update(_float fTimeDelta)
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
m_funcLateUpdate(fTimeDelta, m_bPlayerHit);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll_State_BackHand_Swing::Exit()
|
||||
{
|
||||
m_bPlayerHit = false;
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -579,7 +579,7 @@ HRESULT CTroll::Behavior_BackHandSwingExitCheck(_float fTimeDelta)
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_BackHandSwingExit()
|
||||
@@ -811,7 +811,7 @@ void CTroll::Add_FSM()
|
||||
Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_BackHandSwingExitCheck(fTimeDelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_BackHandSwingExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
Desc.funcLateUpdate = [this](_float fTimeDelta, _bool& bHit) { SwingHit(bHit); };
|
||||
m_States.emplace(FSMSTATE::BACKHAND_SWING, CTroll_State_BackHand_Swing::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
@@ -912,7 +912,7 @@ void CTroll::CheckHammerHits(_uint& iHitCount, vector<PSX::PxSweepHit>& pxHits)
|
||||
|
||||
_bool bCollision = false;
|
||||
m_SweepBufferHammer = {};
|
||||
bCollision = m_pGameInstance->SphereCast(1.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferHammer);
|
||||
bCollision = m_pGameInstance->SphereCast(1.5f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferHammer);
|
||||
if (true == bCollision) {
|
||||
iHitCount += m_SweepBufferHammer.getNbTouches() + m_SweepBufferHammer.hasBlock;
|
||||
auto touches = m_SweepBufferHammer.getTouches();
|
||||
@@ -933,7 +933,7 @@ void CTroll::CheckHammerHits(_uint& iHitCount, vector<PSX::PxSweepHit>& pxHits)
|
||||
|
||||
_bool bCollision = false;
|
||||
m_SweepBufferGrip = {};
|
||||
bCollision = m_pGameInstance->SphereCast(1.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferGrip);
|
||||
bCollision = m_pGameInstance->SphereCast(1.5f, vStartPos, vDir, fDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBufferGrip);
|
||||
if (true == bCollision) {
|
||||
iHitCount += m_SweepBufferGrip.getNbTouches() + m_SweepBufferGrip.hasBlock;
|
||||
auto touches = m_SweepBufferGrip.getTouches();
|
||||
|
||||
@@ -36,7 +36,10 @@ class CBarral_Splesh final : public CEffect_Container
|
||||
static CBarral_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -36,7 +36,10 @@ class CBox_Splesh final : public CEffect_Container
|
||||
static CBox_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -48,11 +48,13 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
_float3 m_vShoulderLocalPos = { 1.f, 2.f, 2.f };
|
||||
#pragma endregion
|
||||
#pragma region Lerp
|
||||
_bool m_bStartGame = { true };
|
||||
_bool m_bDampingParentPos = { true };
|
||||
_bool m_bShoulderLerp = { false };
|
||||
_bool m_bRightShoulderActive = { true };
|
||||
_float2 m_vShoulderLerpTimer = { 0.f, 0.30f };
|
||||
_float2 m_vDampingLerpTimer = { 0.f, 0.10f };
|
||||
_float2 m_vStartLerpTimer = { 0.f, 0.30f };
|
||||
|
||||
_float2 m_vShoulderLerpDegree = { };
|
||||
_float2 m_vShoulderLerpIncludedAngleDegree = { -20.f, 20.f };
|
||||
|
||||
@@ -36,7 +36,10 @@ class CChair_Splesh final : public CEffect_Container
|
||||
static CChair_Splesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace Client {
|
||||
#define LAYER_LIGHT TEXT("Layer_Light")
|
||||
#define LAYER_INTERACTABLE TEXT("Layer_Interactable")
|
||||
#define LAYER_UNIFIED TEXT("Layer_Unified")
|
||||
#define LAYER_DOOR TEXT("Layer_Door")
|
||||
|
||||
#define LAYER_MAPOBJECTMANAGER TEXT("Layer_MapObjectManager")
|
||||
|
||||
|
||||
@@ -35,6 +35,15 @@ class CGoblin_BattleAxe final : public CPartObject
|
||||
|
||||
_float4x4 m_vAxeMat= {};
|
||||
|
||||
|
||||
PSX::PxSweepBufferN<12> m_SweepBufferAxe = {};
|
||||
PSX::PxSweepBufferN<12> m_SweepBufferGrip = {};
|
||||
const _float4* m_pAxePos = { nullptr };
|
||||
const _float4* m_pAxeGripPos = { nullptr };
|
||||
_float4 m_vStartAxePos = { };
|
||||
_float4 m_vStartGripPos = { };
|
||||
_bool m_bPlayerHit = {};
|
||||
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<GeometricPrimitive> m_pGripShape = { nullptr };
|
||||
unique_ptr<GeometricPrimitive> m_pSubShape = { nullptr };
|
||||
@@ -45,6 +54,10 @@ class CGoblin_BattleAxe final : public CPartObject
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
void CheckAxeHits(_uint& iHitCount, vector<PSX::PxSweepHit>& pxHits);
|
||||
|
||||
void SwingHit(_bool& bPlayerHit);
|
||||
|
||||
public:
|
||||
static CGoblin_BattleAxe* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override;
|
||||
|
||||
@@ -49,6 +49,7 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
HRESULT Load_LightElements(const _char* pFilePath);
|
||||
HRESULT Load_InteractableElements(const _char* pFileName);
|
||||
HRESULT Load_WaterElemet(const _char* pFileName);
|
||||
HRESULT Load_DoorElemet(const _char* pFileName);
|
||||
#pragma endregion
|
||||
#pragma region Spell_INFO
|
||||
HRESULT Load_SpellInfo(const _char* pFilePath);
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "PartObject.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CItem_Potion final : public CPartObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagPotion : public CPartObject::PARTOBJECT_DESC
|
||||
{
|
||||
const _float4x4* pSocketMatrices = { };
|
||||
}POTION_DESC;
|
||||
private:
|
||||
CItem_Potion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CItem_Potion(const CItem_Potion& Prototype);
|
||||
virtual ~CItem_Potion() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
void Set_Attach(_bool Attach);
|
||||
public:
|
||||
|
||||
private:
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
|
||||
_float4x4 m_pWandTipMatrix = {};
|
||||
_float3 m_Offset = {};
|
||||
_bool m_bAttach = { true };
|
||||
_float m_fTimer = {};
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CItem_Potion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override;
|
||||
virtual void Free() override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -44,7 +44,11 @@ class CMageSide final : public CEffect_Container
|
||||
static CMageSide* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -40,7 +40,10 @@ class CMage_Down_Attack final : public CEffect_Container
|
||||
static CMage_Down_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -48,7 +48,11 @@ class CMage_Nomal_Attack final : public CEffect_Container
|
||||
static CMage_Nomal_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // DEBUG
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "MapElement.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CMapElement_Door final : public CMapElement
|
||||
{
|
||||
public:
|
||||
typedef struct tagElement_Interactable_Desc : MAPELEMENT_DESC
|
||||
{
|
||||
_uint iSubKind = {};
|
||||
_float3 vBoxLocalPosition;
|
||||
_float3 vBoxSize;
|
||||
}ELEMENT_DOOR_DESC;
|
||||
|
||||
private:
|
||||
CMapElement_Door(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMapElement_Door(const CMapElement_Door& rhs);
|
||||
virtual ~CMapElement_Door() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
|
||||
#ifdef _DEBUG
|
||||
_bool m_bUseSelectColor = { true };
|
||||
|
||||
_float m_fPower = {};
|
||||
_float m_fMass = {};
|
||||
_float3 m_vBoxSize = {};
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
public:
|
||||
static CMapElement_Door* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -25,6 +25,7 @@ class CMapInfo final : public CBase
|
||||
HRESULT Load_LightElements(const _char* pFileName);
|
||||
HRESULT Load_InteractableElements(const _char* pFileName);
|
||||
HRESULT Load_WaterElemet(const _char* pFileName);
|
||||
HRESULT Load_DoorElemet(const _char* pFileName);
|
||||
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
|
||||
@@ -121,8 +121,7 @@ class CPlayer final : public CUnit
|
||||
_float3 m_BroomScale = { 0.f, 0.f, 0.f };
|
||||
_float3 m_TargetScale = { 1.f, 1.f, 1.f };
|
||||
_float m_fScaleSmoothSpeed = 2.5f;
|
||||
|
||||
|
||||
_bool m_bLumos = {};
|
||||
|
||||
HRESULT InputAction();
|
||||
HRESULT InputMove();
|
||||
|
||||
@@ -38,7 +38,10 @@ class CStunEffect final : public CEffect_Container
|
||||
static CStunEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -9,7 +9,7 @@ class CTroll_State_BackHand_Swing final : public CState_Root
|
||||
public:
|
||||
typedef struct tagTrollBackHandSwing : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
function<void(_float, _bool&)> funcLateUpdate = { nullptr };
|
||||
}TROLL_STATE_BACK_HAND_SWING_DESC;
|
||||
public:
|
||||
CTroll_State_BackHand_Swing();
|
||||
@@ -22,7 +22,8 @@ class CTroll_State_BackHand_Swing final : public CState_Root
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
function<void(_float, _bool&)> m_funcLateUpdate = { nullptr };
|
||||
_bool m_bPlayerHit = false;
|
||||
|
||||
private:
|
||||
HRESULT Initialize(TROLL_STATE_BACK_HAND_SWING_DESC* pDesc);
|
||||
|
||||
@@ -1,174 +1,20 @@
|
||||
0 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_135_anm
|
||||
1 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_180_anm
|
||||
2 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_45_anm
|
||||
3 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_90_anm
|
||||
4 Trl_BM_Alert_LF_Walk_Turn_Start_Rht_135_anm
|
||||
5 Trl_BM_Alert_LF_Walk_Turn_Start_Rht_180_anm
|
||||
6 Trl_BM_Alert_LF_Walk_Turn_Start_Rht_90_anm
|
||||
7 Trl_BM_Alert_Look_2Cmbt_180L_anm
|
||||
8 Trl_BM_Alert_Look_2Cmbt_180R_anm
|
||||
9 Trl_BM_Alert_Look_2Cmbt_90L_anm
|
||||
10 Trl_BM_Alert_Look_2Cmbt_90R_anm
|
||||
11 Trl_BM_Alert_Look_2Cmbt_A_anm
|
||||
12 Trl_BM_Alert_Look_2Cmbt_anm
|
||||
13 Trl_BM_Alert_Look_2Cmbt_B_anm
|
||||
14 Trl_BM_Alert_Look_2Cmbt_C_ClubSwing_anm
|
||||
15 Trl_BM_Alert_Look_End_Fwd_anm
|
||||
16 Trl_BM_Alert_Look_Loop_anm
|
||||
17 Trl_BM_Alert_Look_Loop_v01_anm
|
||||
18 Trl_BM_Alert_Look_Loop_v02_anm
|
||||
19 Trl_BM_Alert_Look_Start_Fwd_anm
|
||||
20 Trl_BM_Alert_Look_Turn_InPlace_A_anm
|
||||
21 Trl_BM_Alert_Look_Turn_InPlace_B_anm
|
||||
22 Trl_BM_Alert_Walk_Loop_Fwd_anm
|
||||
23 Trl_BM_Alert_Walk_Loop_Fwd_End_anm
|
||||
24 Trl_BM_Alert_Walk_Loop_Fwd_Start_anm
|
||||
25 Trl_BM_Idle_01_Face_anm
|
||||
26 Trl_BM_Idle_Break_01_anm
|
||||
27 Trl_BM_Idle_Break_01_Face_anm
|
||||
28 Trl_BM_Idle_Break_02_anm
|
||||
29 Trl_BM_Idle_Break_02_Face_anm
|
||||
30 Trl_BM_Idle_Break_03_anm
|
||||
31 Trl_BM_Idle_Break_04_anm
|
||||
32 Trl_BM_Lean_0_anm
|
||||
33 Trl_BM_LF_Idle_anm
|
||||
34 Trl_BM_LF_Walk_Turn_Start_Lft_135_anm
|
||||
35 Trl_BM_LF_Walk_Turn_Start_Lft_180_anm
|
||||
36 Trl_BM_LF_Walk_Turn_Start_Lft_45_anm
|
||||
37 Trl_BM_LF_Walk_Turn_Start_Lft_90_anm
|
||||
38 Trl_BM_LF_Walk_Turn_Start_Rht_135_anm
|
||||
39 Trl_BM_LF_Walk_Turn_Start_Rht_180_anm
|
||||
40 Trl_BM_LF_Walk_Turn_Start_Rht_45_anm
|
||||
41 Trl_BM_LF_Walk_Turn_Start_Rht_90_anm
|
||||
42 Trl_BM_Walk_Loop_Fwd_End_Wander_anm
|
||||
43 Trl_BM_Walk_Loop_Fwd_Lft_45_Wander_anm
|
||||
44 Trl_BM_Walk_Loop_Fwd_Rht_45_Wander_anm
|
||||
45 Trl_BM_Walk_Loop_Fwd_Start_Wander_anm
|
||||
46 Trl_BM_Walk_Loop_Fwd_Wander_anm
|
||||
47 Trl_Cmbt_Atk_01_Face_anm
|
||||
48 Trl_Cmbt_Atk_02_Face_anm
|
||||
49 Trl_Cmbt_Atk_03_Face_anm
|
||||
50 Trl_Cmbt_Atk_Charge_Check_anm
|
||||
51 Trl_Cmbt_Atk_Charge_Knee_End_anm
|
||||
52 Trl_Cmbt_Atk_Charge_Knee_Loop_anm
|
||||
53 Trl_Cmbt_Atk_Charge_Knee_Start_anm
|
||||
54 Trl_Cmbt_Atk_Charge_Loop_anm
|
||||
55 Trl_Cmbt_Atk_Charge_Start_anm
|
||||
56 Trl_Cmbt_Atk_Charge_Stop_RU_anm
|
||||
57 Trl_Cmbt_Atk_Charge_Stop_Turn_Lft_anm
|
||||
58 Trl_Cmbt_Atk_Charge_Stop_Turn_Rht_anm
|
||||
59 Trl_Cmbt_Atk_Charge_Stumble_Fwd_anm
|
||||
60 Trl_Cmbt_Atk_Charge_Stun_anm
|
||||
61 Trl_Cmbt_Atk_Hop_Bckhnd_RU_anm
|
||||
62 Trl_Cmbt_Atk_Hop_Forhnd_LU_anm
|
||||
63 Trl_Cmbt_Atk_LF_Stomp_Bck_anm
|
||||
64 Trl_Cmbt_Atk_LF_Stomp_Fwd_anm
|
||||
65 Trl_Cmbt_Atk_LF_Stomp_Lft_anm
|
||||
66 Trl_Cmbt_Atk_Overhead_Slam_anm
|
||||
67 Trl_Cmbt_Atk_Overhead_Slam_BckHnd_anm
|
||||
68 Trl_Cmbt_Atk_Overhead_Slam_Jog_anm
|
||||
69 Trl_Cmbt_Atk_Overhead_Slam_Lft_180_anm
|
||||
70 Trl_Cmbt_Atk_Overhead_Slam_Lft_90_anm
|
||||
71 Trl_Cmbt_Atk_Overhead_Slam_Rht_180_anm
|
||||
72 Trl_Cmbt_Atk_Overhead_Slam_Rht_90_anm
|
||||
73 Trl_Cmbt_Atk_RF_Stomp_Rht_anm
|
||||
74 Trl_cmbt_Atk_RockThrow_Fwd_anm
|
||||
75 Trl_Cmbt_Atk_RockThrow_Lft_anm
|
||||
76 Trl_Cmbt_Atk_RockThrow_Rht_anm
|
||||
77 Trl_Cmbt_Atk_Rockthrow_Start_anm
|
||||
78 Trl_Cmbt_Atk_StepBack_Swing_Fwd_anm
|
||||
79 Trl_Cmbt_Atk_StepSwing_Fwd_BckHnd_anm
|
||||
80 Trl_Cmbt_Atk_StepSwing_Fwd_BckHnd_Splt_anm
|
||||
81 Trl_Cmbt_Atk_StepSwing_Fwd_ForHnd_anm
|
||||
82 Trl_Cmbt_Atk_StepSwing_Fwd_ForHnd_Splt_anm
|
||||
83 Trl_Cmbt_Atk_StepSwing_Lft_180_BckHnd_anm
|
||||
84 Trl_Cmbt_Atk_StepSwing_Lft_90_BckHnd_anm
|
||||
85 Trl_Cmbt_Atk_StepSwing_Rht_180_ForHnd_Splt_anm
|
||||
86 Trl_Cmbt_Atk_StepSwing_Rht_90_ForHnd_anm
|
||||
87 Trl_Cmbt_Atk_Swing_Fwd_anm
|
||||
88 Trl_Cmbt_Atk_Swing_Fwd_BckHnd_anm
|
||||
89 Trl_Cmbt_Atk_Swing_Fwd_BckHnd_Jog_anm
|
||||
90 Trl_Cmbt_Atk_Swing_Fwd_BckHnd_Splt_anm
|
||||
91 Trl_Cmbt_Atk_Swing_Fwd_Jog_anm
|
||||
92 Trl_Cmbt_Atk_Swing_Fwd_Splt_anm
|
||||
93 Trl_Cmbt_Atk_Swing_Lft_anm
|
||||
94 Trl_Cmbt_Atk_Swing_Rht_anm
|
||||
95 Trl_Cmbt_Atk_Swipe_anm
|
||||
96 Trl_Cmbt_Atk_Swipe_Lft_180_anm
|
||||
97 Trl_Cmbt_Atk_Swipe_Lft_90_anm
|
||||
98 Trl_Cmbt_Atk_Swipe_Rht_90_anm
|
||||
99 Trl_Cmbt_Atk_Tantrum_01_anm
|
||||
100 Trl_Cmbt_Atk_Tantrum_02_anm
|
||||
101 Trl_Cmbt_Idle_01_anm
|
||||
102 Trl_Cmbt_idle_01_Face_anm
|
||||
103 Trl_Cmbt_Jog_Loop_Fwd_anm
|
||||
104 Trl_Cmbt_Jog_Start_Fwd_anm
|
||||
105 Trl_Cmbt_Jog_Turn_Start_Lft_135_anm
|
||||
106 Trl_Cmbt_Jog_Turn_Start_Lft_180_anm
|
||||
107 Trl_Cmbt_Jog_Turn_Start_Lft_45_anm
|
||||
108 Trl_Cmbt_Jog_Turn_Start_Lft_90_anm
|
||||
109 Trl_Cmbt_Jog_Turn_Start_Rht_135_anm
|
||||
110 Trl_Cmbt_Jog_Turn_Start_Rht_180_anm
|
||||
111 Trl_Cmbt_Jog_Turn_Start_Rht_45_anm
|
||||
112 Trl_Cmbt_Jog_Turn_Start_Rht_90_anm
|
||||
113 Trl_Cmbt_LF_Idle_Turn_Lft_135_anm
|
||||
114 Trl_Cmbt_LF_Idle_Turn_Lft_180_anm
|
||||
115 Trl_Cmbt_LF_Idle_Turn_Lft_45_anm
|
||||
116 Trl_Cmbt_LF_Idle_Turn_Lft_90_anm
|
||||
117 Trl_Cmbt_LF_Idle_Turn_Rht_135_anm
|
||||
118 Trl_Cmbt_LF_Idle_Turn_Rht_180_anm
|
||||
119 Trl_Cmbt_LF_Idle_Turn_Rht_45_anm
|
||||
120 Trl_Cmbt_LF_Idle_Turn_Rht_90_anm
|
||||
121 Trl_Cmbt_Look_Lft_anm
|
||||
122 Trl_Cmbt_Look_Rht_anm
|
||||
123 Trl_Cmbt_OverHead_Slam_Taunt_01_anm
|
||||
124 Trl_Cmbt_OverHead_Slam_Taunt_02_anm
|
||||
125 Trl_Cmbt_Rct_Death_01_Face_anm
|
||||
126 Trl_Cmbt_Rct_Death_02_Face_anm
|
||||
127 Trl_Cmbt_Rct_Flinch_Charge_anm
|
||||
128 Trl_Cmbt_Rct_Hit_01_Face_anm
|
||||
129 Trl_Cmbt_Rct_Hit_02_Face_anm
|
||||
130 Trl_Cmbt_Rct_Hit_03_Face_anm
|
||||
131 Trl_Cmbt_Rct_Mandrake_Loop_anm
|
||||
132 Trl_Cmbt_Rct_Mandrake_Start_anm
|
||||
133 Trl_Cmbt_Rct_Mandrake_Stop_anm
|
||||
134 Trl_Cmbt_Roar_01_Face_anm
|
||||
135 Trl_Cmbt_Roar_02_Face_anm
|
||||
136 Trl_Cmbt_Roar_03_Face_anm
|
||||
137 Trl_Cmbt_Spawn_Ink_02_anm
|
||||
138 Trl_Cmbt_Spawn_Ink_anm
|
||||
139 Trl_Cmbt_Spwn_Breakthrough_01_anm
|
||||
140 Trl_Cmbt_Spwn_Breakthrough_02_anm
|
||||
141 Trl_Cmbt_Taunt_Fwd_05_anm
|
||||
142 Trl_Cmbt_Taunt_Fwd_06_anm
|
||||
143 Trl_Cmbt_Taunt_Fwd_07_anm
|
||||
144 Trl_Cmbt_Taunt_Fwd_08_anm
|
||||
145 Trl_Cmbt_Taunt_Fwd_09_anm
|
||||
146 Trl_Cmbt_Taunt_Lft_135_anm
|
||||
147 Trl_Cmbt_Taunt_Lft_180_anm
|
||||
148 Trl_Cmbt_Taunt_Lft_45_07_anm
|
||||
149 Trl_Cmbt_Taunt_Lft_90_07_anm
|
||||
150 Trl_Cmbt_Taunt_Lft_90_anm
|
||||
151 Trl_Cmbt_Taunt_Rht_135_anm
|
||||
152 Trl_Cmbt_Taunt_Rht_180_anm
|
||||
153 Trl_Cmbt_Taunt_Rht_45_07_anm
|
||||
154 Trl_Cmbt_Taunt_Rht_90_07_anm
|
||||
155 Trl_Cmbt_Taunt_Rht_90_anm
|
||||
156 Trl_Rct_Club_Face_anm
|
||||
157 Trl_Rct_Club_Face_End_anm
|
||||
158 Trl_Rct_Dazed_End_anm
|
||||
159 Trl_Rct_Dazed_Loop_anm
|
||||
160 Trl_Rct_Dazed_Start_anm
|
||||
161 Trl_Rct_Hitch_Bwd_Add_anm
|
||||
162 Trl_Rct_Hitch_Fwd_Add_anm
|
||||
163 Trl_Rct_Hitch_Lft_Add_anm
|
||||
164 Trl_Rct_Hitch_Rht_Add_anm
|
||||
165 Trl_Rct_KnckDn_Bck_anm
|
||||
166 Trl_Rct_Spell_Petrificus_Start_anm
|
||||
167 Trl_Rct_Stumble_Bck_02_anm
|
||||
168 Trl_Rct_Stumble_Bck_03_anm
|
||||
169 Trl_Rct_Stumble_Bck_04_anm
|
||||
170 Trl_Rct_Stumble_Fwd_anm
|
||||
171 Trl_Rct_Stumble_Lft_anm
|
||||
172 Trl_Rct_Stumble_Rht_anm
|
||||
173 Trl_STN_Grnd_Sleep_End_v01_anm
|
||||
0 CCL_Activity_WandSelection_Clip10_Ollivander_anm
|
||||
1 CCL_Activity_WandSelection_Clip11_Ollivander_anm
|
||||
2 CCL_Activity_WandSelection_Clip12_Ollivander_anm
|
||||
3 CCL_Activity_WandSelection_Clip13_Ollivander_anm
|
||||
4 CCL_Activity_WandSelection_Clip1_Ollivander_anm
|
||||
5 CCL_Activity_WandSelection_Clip21_Ollivander_anm
|
||||
6 CCL_Activity_WandSelection_Clip23_Ollivander_anm
|
||||
7 CCL_Activity_WandSelection_Clip24_Ollivander_anm
|
||||
8 CCL_Activity_WandSelection_Clip25_Ollivander_anm
|
||||
9 CCL_Activity_WandSelection_Clip26_Ollivander_anm
|
||||
10 CCL_Activity_WandSelection_Clip28_Ollivander_anm
|
||||
11 CCL_Activity_WandSelection_Clip29_Ollivander_anm
|
||||
12 CCL_Activity_WandSelection_Clip2_Ollivander_anm
|
||||
13 CCL_Activity_WandSelection_Clip3_Ollivander_anm
|
||||
14 CCL_Activity_WandSelection_Clip4_Ollivander_anm
|
||||
15 CCL_Activity_WandSelection_Clip5_Ollivander_anm
|
||||
16 CCL_Activity_WandSelection_Clip6_Ollivander_anm
|
||||
17 CCL_Activity_WandSelection_Clip7_Ollivander_anm
|
||||
18 CCL_Activity_WandSelection_Clip8_Ollivander_anm
|
||||
19 CCL_Activity_WandSelection_Clip9_Ollivander_anm
|
||||
|
||||
@@ -3971,4 +3971,64 @@
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
</Container>
|
||||
<Container Name="SideStreet_D">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="2" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D_Wall</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D_Wall_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D_Wall_Lod2</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_G_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_G_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_G_Wall_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_G_Wall_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
<Container Name="Ollivender_Int_Col">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_APL_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_APL_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_Floors_COL</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_PL_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_PL_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
</Land>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Doors>
|
||||
<Object Lod_Level="2">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_Front_Door</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_Front_Door_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_Front_Door_Lod2</PrototypeTag>
|
||||
<Position x="39.67815" y="3.8" z="71.067245"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="116.99998" z="0"/>
|
||||
</Object>
|
||||
</Doors>
|
||||
@@ -364,6 +364,26 @@
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_APL_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_APL_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_Floors_COL</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_PL_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_INT_PL_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
<Container Name="HM_TScrolls_Ext">
|
||||
<Position x="21.095903" y="0.80000007" z="31.144279"/>
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -720,6 +720,52 @@ PS_OUT PS_SPECTOR_WEAPON_MAIN(PS_IN In)
|
||||
|
||||
return Out;
|
||||
}
|
||||
PS_OUT PS_LEVIOSO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float4 vNoise = g_NoiseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord).r;
|
||||
|
||||
if (g_iBinded_Texture[AI_TEXTURE_TYPE_TRANSMISSION] != 0)
|
||||
{
|
||||
float4 vTransmission = g_TransmissionTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
vMtrlDiffuse *= vTransmission;
|
||||
}
|
||||
if (g_iBinded_Texture[AI_TEXTURE_TYPE_EMISSIVE] != 0)
|
||||
{
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
vMtrlDiffuse += vEmissive;
|
||||
}
|
||||
if (vMtrlDiffuse.a < 0.2f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
|
||||
Out.vAlbedo = vMtrlDiffuse * float4(1.f, 1.f, 0.3f, 1.f) * vNoise;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
float fSurfaceParam = g_fUsingSurfaceParams;
|
||||
if (true == AlmostEqual7(g_fUsingSurfaceParams, 0.f))
|
||||
{
|
||||
fSurfaceParam = 0;
|
||||
}
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
fSurfaceParam, // 서페이스 파라미터
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 MeshTechnique11
|
||||
{
|
||||
@@ -928,4 +974,14 @@ technique11 MeshTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_GLASS_CUBE();
|
||||
}
|
||||
|
||||
pass LeviosoPass // 21
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_LEVIOSO();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,6 +182,9 @@ call Update_Shaders.bat
|
||||
<ClInclude Include="..\Public\Goblin_Dagger.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Protego.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h" />
|
||||
<ClInclude Include="..\public\MapElement_Chest.h" />
|
||||
<ClInclude Include="..\public\MapElement_Door.h" />
|
||||
<ClInclude Include="..\public\MapElement_Chest_Lid.h" />
|
||||
<ClInclude Include="..\Public\Skill_Data.h" />
|
||||
<ClInclude Include="..\Public\State_Blink.h" />
|
||||
<ClInclude Include="..\Public\State_Dead.h" />
|
||||
@@ -386,6 +389,9 @@ call Update_Shaders.bat
|
||||
<ClCompile Include="..\Private\Goblin_Dagger.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Protego.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Spector.cpp" />
|
||||
<ClCompile Include="..\private\MapElement_Chest.cpp" />
|
||||
<ClCompile Include="..\private\MapElement_Door.cpp" />
|
||||
<ClCompile Include="..\private\MapElement_Chest_Lid.cpp" />
|
||||
<ClCompile Include="..\Private\Skill_Data.cpp" />
|
||||
<ClCompile Include="..\Private\State_Blink.cpp" />
|
||||
<ClCompile Include="..\Private\State_Dead.cpp" />
|
||||
|
||||
@@ -568,6 +568,15 @@
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Detection">
|
||||
<UniqueIdentifier>{81c6b163-6c8b-47ac-a4b6-e86088ce709f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Env\03.MapElement\Door">
|
||||
<UniqueIdentifier>{6cb94611-9a4c-4b22-897c-6a2ff662c59a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Env\03.MapElement\Chest">
|
||||
<UniqueIdentifier>{18ff4d8b-a5fd-4c67-a864-5340e31391a2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Env\03.MapElement\Chest\Lid">
|
||||
<UniqueIdentifier>{a1e789e1-dce1-4069-8c61-b9f9c89f795d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -1134,6 +1143,15 @@
|
||||
<ClInclude Include="..\public\Enemy_Detection.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Detection</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement_Door.h">
|
||||
<Filter>02.GameObjects\Env\03.MapElement\Door</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement_Chest.h">
|
||||
<Filter>02.GameObjects\Env\03.MapElement\Chest</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement_Chest_Lid.h">
|
||||
<Filter>02.GameObjects\Env\03.MapElement\Chest\Lid</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1702,6 +1720,15 @@
|
||||
<ClCompile Include="..\Private\Enemy_Detection.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Enemy_Panel\Enemy_Detection</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement_Door.cpp">
|
||||
<Filter>02.GameObjects\Env\03.MapElement\Door</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement_Chest.cpp">
|
||||
<Filter>02.GameObjects\Env\03.MapElement\Chest</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement_Chest_Lid.cpp">
|
||||
<Filter>02.GameObjects\Env\03.MapElement\Chest\Lid</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "Player.h"
|
||||
#include "Unified.h"
|
||||
#include "MapElement_Lake.h"
|
||||
#include "MapElement_Door.h"
|
||||
#include "MapElement_Chest.h"
|
||||
|
||||
CLevel_MapViewer::CLevel_MapViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -48,6 +50,7 @@ HRESULT CLevel_MapViewer::Initialize()
|
||||
if (FAILED(Ready_Layer_Terrain(TEXT("Layer_Terrain")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Layer_Land(TEXT("Layer_Land")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -64,6 +67,14 @@ HRESULT CLevel_MapViewer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
//if (FAILED(Ready_Layer_Door(TEXT("Layer_Door")))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
if (FAILED(Ready_Layer_Chest(TEXT("Layer_Chest")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Layer_MapObjectManager(LAYER_MAPOBJECTMANAGER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -416,6 +427,64 @@ HRESULT CLevel_MapViewer::Ready_Layer_Unified(const _wstring& strLayerTag)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_MapViewer::Ready_Layer_Door(const _wstring& strLayerTag)
|
||||
{
|
||||
vector<_wstring> ModelPrototypeTags;
|
||||
|
||||
ModelPrototypeTags.push_back(TEXT("Prototype_GameObject_SM_HM_Ollivanders_Front_Door"));
|
||||
ModelPrototypeTags.push_back(TEXT("Prototype_GameObject_SM_HM_Ollivanders_Front_Door_Lod1"));
|
||||
ModelPrototypeTags.push_back(TEXT("Prototype_GameObject_SM_HM_Ollivanders_Front_Door_Lod2"));
|
||||
|
||||
CMapElement_Door::ELEMENT_DOOR_DESC Door_Desc = {};
|
||||
Door_Desc.isEdit = true;
|
||||
Door_Desc.iSubKind = {};
|
||||
Door_Desc.vBoxLocalPosition = {};
|
||||
Door_Desc.vBoxSize = {};
|
||||
Door_Desc.iMaxLodLevel = 2;
|
||||
Door_Desc.ModelPrototypeTags = ModelPrototypeTags;
|
||||
Door_Desc.vPosition = _float3(0.f, 0.f, 0.f);
|
||||
Door_Desc.vRotation = _float3(0.f, 0.f, 0.f);
|
||||
Door_Desc.vScale = _float3(1.f, 1.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Door>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Door_Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_MapViewer::Ready_Layer_Chest(const _wstring& strLayerTag)
|
||||
{
|
||||
vector<_wstring> ModelPrototypeTags = {};
|
||||
vector<_wstring> ModelPrototypeTagsLid = {};
|
||||
|
||||
ModelPrototypeTags.push_back(TEXT("Prototype_GameObject_SM_Chest_RewardContainer_C"));
|
||||
ModelPrototypeTags.push_back(TEXT("Prototype_GameObject_SM_Chest_RewardContainer_C_Lod1"));
|
||||
ModelPrototypeTags.push_back(TEXT("Prototype_GameObject_SM_Chest_RewardContainer_C_Lod2"));
|
||||
ModelPrototypeTags.push_back(TEXT("Prototype_GameObject_SM_Chest_RewardContainer_C_Lod3"));
|
||||
|
||||
ModelPrototypeTagsLid.push_back(TEXT("Prototype_GameObject_SM_Chest_RewardContainer_C_Lid"));
|
||||
ModelPrototypeTagsLid.push_back(TEXT("Prototype_GameObject_SM_Chest_RewardContainer_C_Lid_Lod1"));
|
||||
ModelPrototypeTagsLid.push_back(TEXT("Prototype_GameObject_SM_Chest_RewardContainer_C_Lid_Lod2"));
|
||||
|
||||
|
||||
CMapElement_Chest::ELEMENT_CHEST_DESC Chest_Desc = {};
|
||||
Chest_Desc.iMaxLodLevel = 3;
|
||||
Chest_Desc.iSubKind = ENUM_CLASS(PXOBJECT::BOX);
|
||||
Chest_Desc.ModelPrototypeTags = ModelPrototypeTags;
|
||||
Chest_Desc.vPosition = _float3(0.f, 0.f, 0.f);
|
||||
Chest_Desc.vRotation = _float3(0.f, 0.f, 0.f);
|
||||
Chest_Desc.vScale = _float3(1.f, 1.f, 1.f);
|
||||
Chest_Desc.vBoxSize = _float3(0.3f, 0.25f, 0.27f);
|
||||
Chest_Desc.vBoxLocalPosition = _float3(-0.01f, 0.3f, -0.25f);
|
||||
|
||||
Chest_Desc.iMaxLodLevel_Lid = 2;
|
||||
Chest_Desc.ModelPrototypeTags_Lid= ModelPrototypeTagsLid;
|
||||
Chest_Desc.vLid_Offset = _float3(0.f, 0.3f, 0.f);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Chest>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Chest_Desc)))
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_MapViewer::Ready_Layer_MapObjectManager(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapObject_Manager>(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "MapElement_Static.h"
|
||||
#include "MapElement_Light.h"
|
||||
#include "MapElement_Door.h"
|
||||
#include "Land.h"
|
||||
#include "Collider.h"
|
||||
#include "VIBuffer_Model_Instance.h"
|
||||
@@ -122,6 +123,8 @@
|
||||
#include "InstancedProp.h"
|
||||
#include "Unified.h"
|
||||
#include "MapElement_Lake.h"
|
||||
#include "MapElement_Chest.h"
|
||||
#include "MapElement_Chest_Lid.h"
|
||||
#pragma endregion
|
||||
|
||||
|
||||
@@ -2127,6 +2130,12 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
vector<future<pair<_wstring, CModel*>*>> futures = {};
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SM_Bottle_EmptyCapOff_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM_LOCAL, "C:/MeshTable\\Game\\Cinematics\\Props\\SM_Bottle_EmptyCapOff.fbx", XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
#pragma region BODY
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
@@ -2422,6 +2431,11 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso_Noise"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Effect/Noises/VFX_T_NoiseCaustics02_Color_D.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_LightPost_Emissive */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("LightPost_Emissive"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE,
|
||||
@@ -2489,7 +2503,7 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
|
||||
/* For.Prototype_Component_SkyboxModel */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SkyboxModel"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SM_SkyCard.fbx", XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
#pragma region MAP_LANDS
|
||||
@@ -2552,10 +2566,10 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
|
||||
///* Terrain*/
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain",
|
||||
// ".bin", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain",
|
||||
// ".bin", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
|
||||
///* TScrolls*/
|
||||
@@ -2582,7 +2596,7 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
// ".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Collision",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// ".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
|
||||
///* Gatehouse*/
|
||||
@@ -2734,6 +2748,11 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
|
||||
/* Fences */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\fences",
|
||||
".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Light */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\LightPosts",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
@@ -2741,7 +2760,7 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
|
||||
/* Doors */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Doors",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
".bin", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Step */
|
||||
@@ -2777,6 +2796,12 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Object Interactables */
|
||||
/* Chest */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Objects\\Interactables",
|
||||
".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#ifdef gimch
|
||||
@@ -3328,6 +3353,18 @@ if(isLoad_Map)
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Interactable>(g_iStaticLevel, CMapElement_Interactable::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_MapElement_Door */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Door>(g_iStaticLevel, CMapElement_Door::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_MapElement_Chest */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Chest>(g_iStaticLevel, CMapElement_Chest::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_MapElement_Chest_Lid */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Chest_Lid>(g_iStaticLevel, CMapElement_Chest_Lid::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_MapElement_Static */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Static>(g_iStaticLevel, CMapElement_Static::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -0,0 +1,468 @@
|
||||
#include "pch.h"
|
||||
#include "MapElement_Chest.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Terrain.h"
|
||||
#include "Layer.h"
|
||||
#include "MapElement_Chest_Lid.h"
|
||||
|
||||
CMapElement_Chest::CMapElement_Chest(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMapElement{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CMapElement_Chest::CMapElement_Chest(const CMapElement_Chest& rhs)
|
||||
: CMapElement(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest::Initialize(void* pArg)
|
||||
{
|
||||
ELEMENT_CHEST_DESC* pDesc = static_cast<ELEMENT_CHEST_DESC*>(pArg);
|
||||
|
||||
m_iMaxLodLevel = pDesc->iMaxLodLevel;
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
}
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Lid(pDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
m_eCurState = m_ePreState = CHEST_STATE::IDLE;
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_bSelected = false;
|
||||
m_vPosition = pDesc->vPosition;
|
||||
m_vScale = pDesc->vScale;
|
||||
m_vRotation = pDesc->vRotation;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
#endif // _DEBUG
|
||||
|
||||
m_vBoxSize = _float3(1.f, 1.f, 1.f);
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize);
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Chest::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_bSelected = false;
|
||||
#endif
|
||||
|
||||
m_pLid->Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CMapElement_Chest::Update(_float fTimeDelta)
|
||||
{
|
||||
switch (m_eCurState)
|
||||
{
|
||||
case Editor::CMapElement_Chest::CHEST_STATE::IDLE:
|
||||
break;
|
||||
|
||||
case Editor::CMapElement_Chest::CHEST_STATE::FOUND:
|
||||
break;
|
||||
|
||||
case Editor::CMapElement_Chest::CHEST_STATE::OPENED:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Chage_State();
|
||||
|
||||
m_pLid->Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CMapElement_Chest::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
m_pLid->Describe_Entity();
|
||||
#endif
|
||||
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
|
||||
|
||||
if(CMapElement_Chest::CHEST_STATE::FOUND == m_eCurState)
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
|
||||
else
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
m_pLid->Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(m_iShaderPass_Index))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pRigidBody->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pLid->Render(m_iShaderPass_Index)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
{
|
||||
CModel* pModel = { nullptr };
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
|
||||
reinterpret_cast<CComponent**>(&pModel))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelComs.push_back(pModel);
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Texture */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Levioso_Noise"),
|
||||
reinterpret_cast<CComponent**>(&m_pNoiseTextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
ELEMENT_CHEST_DESC* pPhysXDummyDesc = static_cast<ELEMENT_CHEST_DESC*>(pArg);
|
||||
|
||||
// RIGID_BODY
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::BOX);//pPhysXDummyDesc->iSubKind;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_NoiseTexture", m_pNoiseTextureCom->Get_SRV(0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest::Ready_Lid(ELEMENT_CHEST_DESC* pArg)
|
||||
{
|
||||
m_pLid = m_pGameInstance->Clone_Prototype<CMapElement_Chest_Lid>(g_iStaticLevel, pArg, this);
|
||||
|
||||
if (nullptr == m_pLid)
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Chest::Chage_State()
|
||||
{
|
||||
if (m_ePreState != m_eCurState)
|
||||
{
|
||||
switch (m_eCurState)
|
||||
{
|
||||
case Editor::CMapElement_Chest::CHEST_STATE::IDLE:
|
||||
m_iShaderPass_Index = ENUM_CLASS(SHADER_PASS_MESH::DEFAULT);
|
||||
break;
|
||||
|
||||
case Editor::CMapElement_Chest::CHEST_STATE::FOUND:
|
||||
m_iShaderPass_Index = 21; //ENUM_CLASS(SHADER_PASS_MESH::DEFAULT);
|
||||
break;
|
||||
|
||||
case Editor::CMapElement_Chest::CHEST_STATE::OPENED:
|
||||
m_iShaderPass_Index = ENUM_CLASS(SHADER_PASS_MESH::DEFAULT);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_ePreState = m_eCurState;
|
||||
}
|
||||
}
|
||||
|
||||
CMapElement_Chest* CMapElement_Chest::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMapElement_Chest* pInstance = new CMapElement_Chest(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMapElement_Chest");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CMapElement_Chest::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CMapElement_Chest* pInstance = new CMapElement_Chest(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CMapElement_Chest");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CMapElement_Chest::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
if (m_bCloned)
|
||||
SAFE_RELEASE(m_pLid);
|
||||
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pNoiseTextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
for (auto& pModel : m_pModelComs)
|
||||
SAFE_RELEASE(pModel);
|
||||
}
|
||||
|
||||
void CMapElement_Chest::Describe_Entity()
|
||||
{
|
||||
if (m_bDead)
|
||||
return;
|
||||
if (nullptr == m_pGameInstance)
|
||||
return;
|
||||
|
||||
PSX::PxVec3 vDir = PSX::PxVec3(0.f, 1.f, 0.f);
|
||||
|
||||
if (GUI::CollapsingHeader("Rigid Body"))
|
||||
{
|
||||
GUI::InputFloat("Power", &m_fPower);
|
||||
|
||||
if (GUI::Button("Move Test"))
|
||||
{
|
||||
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
if (nullptr != m_pActor)
|
||||
{
|
||||
m_pActor->wakeUp();
|
||||
m_pActor->addForce(vDir * m_fPower * 100000.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
}
|
||||
if (GUI::Button("OFF_Kinematic"))
|
||||
{
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
if (nullptr != m_pActor)
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
|
||||
}
|
||||
if (GUI::Button("ON_Kinematic"))
|
||||
{
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
if (nullptr != m_pActor)
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, true);
|
||||
}
|
||||
|
||||
if (GUI::InputFloat("Mass", &m_fMass))
|
||||
m_pActor->setMass(m_fMass);
|
||||
|
||||
m_pRigidBody->Describe_Entity();
|
||||
}
|
||||
|
||||
|
||||
GUI::Text(CMyTools::ToString(m_ModelPrototypeTags[m_iLodIndex]).c_str());
|
||||
GUI::InputInt("Lod Level", (_int*)(&m_iLodIndex));
|
||||
m_iLodIndex = max(0, m_iLodIndex);
|
||||
m_iLodIndex = min(m_iMaxLodLevel, m_iLodIndex);
|
||||
|
||||
GUI::Checkbox("Select Color ON / OFF", &m_bUseSelectColor);
|
||||
|
||||
GUI::Text("----- Transfrom ----");
|
||||
_float3 vMove = {};
|
||||
GUI::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
|
||||
|
||||
m_pTransformCom->Move_Right(vMove.x);
|
||||
m_pTransformCom->Move_Up(vMove.y);
|
||||
m_pTransformCom->Move_Look(vMove.z);
|
||||
|
||||
XMStoreFloat3(&m_vPosition, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
{
|
||||
_float3 vPosition = {};
|
||||
if (m_pGameInstance->isPicking(&vPosition))
|
||||
{
|
||||
memcpy(&m_vPosition, &vPosition, sizeof(_float3));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
}
|
||||
}
|
||||
|
||||
GUI::Text("----- Rotation ----");
|
||||
GUI::InputFloat("X##Rotation", &m_vRotation.x, 1.f, 15.f);
|
||||
GUI::InputFloat("Y##Rotation", &m_vRotation.y, 1.f, 15.f);
|
||||
GUI::InputFloat("Z##Rotation", &m_vRotation.z, 1.f, 15.f);
|
||||
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
|
||||
GUI::Text("----- Scale ----");
|
||||
GUI::InputFloat("X##Scale", &m_vScale.x, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Y##Scale", &m_vScale.y, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Z##Scale", &m_vScale.z, 0.05f, 0.1f);
|
||||
|
||||
m_vScale.x = max(0.01f, m_vScale.x);
|
||||
m_vScale.y = max(0.01f, m_vScale.y);
|
||||
m_vScale.z = max(0.01f, m_vScale.z);
|
||||
|
||||
if (GUI::Button("IDLE"))
|
||||
{
|
||||
m_eCurState = CHEST_STATE::IDLE;
|
||||
}
|
||||
if (GUI::Button("FOUND"))
|
||||
{
|
||||
m_eCurState = CHEST_STATE::FOUND;
|
||||
}
|
||||
if (GUI::Button("OPENED"))
|
||||
{
|
||||
m_eCurState = CHEST_STATE::OPENED;
|
||||
}
|
||||
|
||||
if (GUI::Button("Delete"))
|
||||
m_bDead = true;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest::Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)
|
||||
{
|
||||
tinyxml2::XMLElement* object = doc.NewElement("Object");
|
||||
object->SetAttribute("Type", ENUM_CLASS(MAPOBJECT_TYPE::ELEMENT_INTERACT));
|
||||
object->SetAttribute("ID", ENUM_CLASS(m_eInteractableID));
|
||||
object->SetAttribute("Lod_Level", m_iLodIndex);
|
||||
root->InsertEndChild(object);
|
||||
|
||||
#pragma region PROTOTYPETAG
|
||||
for (_uint i = 0; i < m_iLodIndex + 1; ++i)
|
||||
{
|
||||
tinyxml2::XMLElement* prototype = doc.NewElement("PrototypeTag");
|
||||
prototype->SetText(CMyTools::ToString(m_ModelPrototypeTags[i]).c_str());
|
||||
object->InsertEndChild(prototype);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region TRANSFORM
|
||||
_float3 vPosition = {};
|
||||
XMStoreFloat3(&vPosition, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
|
||||
_float3 vRotation = {};
|
||||
XMStoreFloat3(&vRotation, m_pTransformCom->Get_RollPitchYawVector());
|
||||
vRotation.x = XMConvertToDegrees(vRotation.x);
|
||||
vRotation.y = XMConvertToDegrees(vRotation.y);
|
||||
vRotation.z = XMConvertToDegrees(vRotation.z);
|
||||
|
||||
tinyxml2::XMLElement* Position = doc.NewElement("Position");
|
||||
Position->SetAttribute("x", vPosition.x);
|
||||
Position->SetAttribute("y", vPosition.y);
|
||||
Position->SetAttribute("z", vPosition.z);
|
||||
object->InsertEndChild(Position);
|
||||
|
||||
tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
|
||||
Scale->SetAttribute("x", vScale.x);
|
||||
Scale->SetAttribute("y", vScale.y);
|
||||
Scale->SetAttribute("z", vScale.z);
|
||||
object->InsertEndChild(Scale);
|
||||
|
||||
tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
|
||||
Rotation->SetAttribute("x", vRotation.x);
|
||||
Rotation->SetAttribute("y", vRotation.y);
|
||||
Rotation->SetAttribute("z", vRotation.z);
|
||||
object->InsertEndChild(Rotation);
|
||||
|
||||
_float3 vHalfGeometryInfo = static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Get_HalfGeometryInfo();
|
||||
tinyxml2::XMLElement* HalfGeometryInfo = doc.NewElement("HalfGeometryInfo");
|
||||
HalfGeometryInfo->SetAttribute("x", vHalfGeometryInfo.x);
|
||||
HalfGeometryInfo->SetAttribute("y", vHalfGeometryInfo.y);
|
||||
HalfGeometryInfo->SetAttribute("z", vHalfGeometryInfo.z);
|
||||
object->InsertEndChild(HalfGeometryInfo);
|
||||
|
||||
_float3 vLocalTranslation = static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Get_LocalTranslation();
|
||||
tinyxml2::XMLElement* LocalTranslation = doc.NewElement("LocalTranslation");
|
||||
LocalTranslation->SetAttribute("x", vLocalTranslation.x);
|
||||
LocalTranslation->SetAttribute("y", vLocalTranslation.y);
|
||||
LocalTranslation->SetAttribute("z", vLocalTranslation.z);
|
||||
object->InsertEndChild(LocalTranslation);
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
#include "pch.h"
|
||||
#include "MapElement_Chest_Lid.h"
|
||||
#include "MapElement_Chest.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
CMapElement_Chest_Lid::CMapElement_Chest_Lid(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMapElement{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CMapElement_Chest_Lid::CMapElement_Chest_Lid(const CMapElement_Chest_Lid& rhs)
|
||||
: CMapElement(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest_Lid::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest_Lid::Initialize(void* pArg)
|
||||
{
|
||||
CMapElement_Chest::ELEMENT_CHEST_DESC* pDesc = static_cast<CMapElement_Chest::ELEMENT_CHEST_DESC*>(pArg);
|
||||
|
||||
m_iMaxLodLevel = pDesc->iMaxLodLevel_Lid;
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags_Lid[i]);
|
||||
}
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_fOpenDuration = 1.f;
|
||||
m_fRotationAngle = 30.f;
|
||||
m_vPosition = pDesc->vLid_Offset;
|
||||
m_vRotation = _float3(0.f, 0.f, 0.f);
|
||||
m_vScale = _float3(1.f, 1.f, 1.f);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
|
||||
m_pParentWorldMatrix = m_pOwner->Get_Component<CTransform>()->Get_WorldMatrixPtr();
|
||||
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * XMLoadFloat4x4(m_pParentWorldMatrix));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Chest_Lid::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CMapElement_Chest_Lid::Update(_float fTimeDelta)
|
||||
{
|
||||
switch (m_eState)
|
||||
{
|
||||
case Editor::CMapElement_Chest_Lid::LID_STATE::IDLE:
|
||||
break;
|
||||
|
||||
case Editor::CMapElement_Chest_Lid::LID_STATE::OPENING:
|
||||
if (Opening(fTimeDelta))
|
||||
m_eState = LID_STATE::OPENED;
|
||||
break;
|
||||
|
||||
case Editor::CMapElement_Chest_Lid::LID_STATE::OPENED:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CMapElement_Chest_Lid::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
/* 부모에서 Render 호출 */
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest_Lid::Render(_uint iShaderPass)
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(iShaderPass))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest_Lid::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
{
|
||||
CModel* pModel = { nullptr };
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
|
||||
reinterpret_cast<CComponent**>(&pModel))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelComs.push_back(pModel);
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest_Lid::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CMapElement_Chest_Lid::Opening(_float fTimeDelta)
|
||||
{
|
||||
m_fTimeAcc += fTimeDelta;
|
||||
|
||||
if (m_fTimeAcc >= m_fOpenDuration)
|
||||
{
|
||||
m_fTimeAcc = m_fOpenDuration;
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_fRotationAngle), 0.f, 0.f);
|
||||
return true;
|
||||
}
|
||||
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_fRotationAngle * m_fTimeAcc / m_fOpenDuration), 0.f, 0.f);
|
||||
|
||||
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * XMLoadFloat4x4(m_pParentWorldMatrix));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CMapElement_Chest_Lid::Reset()
|
||||
{
|
||||
m_fTimeAcc = 0.f;
|
||||
|
||||
m_pTransformCom->Rotation(0.f, 0.f, 0.f);
|
||||
|
||||
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * XMLoadFloat4x4(m_pParentWorldMatrix));
|
||||
}
|
||||
|
||||
CMapElement_Chest_Lid* CMapElement_Chest_Lid::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMapElement_Chest_Lid* pInstance = new CMapElement_Chest_Lid(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMapElement_Chest_Lid");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CMapElement_Chest_Lid::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CMapElement_Chest_Lid* pInstance = new CMapElement_Chest_Lid(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CMapElement_Chest_Lid");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CMapElement_Chest_Lid::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
for (auto& pModel : m_pModelComs)
|
||||
SAFE_RELEASE(pModel);
|
||||
}
|
||||
|
||||
void CMapElement_Chest_Lid::Describe_Entity()
|
||||
{
|
||||
if (m_bDead)
|
||||
return;
|
||||
if (nullptr == m_pGameInstance)
|
||||
return;
|
||||
|
||||
GUI::Begin("Lid");
|
||||
|
||||
GUI::Text(CMyTools::ToString(m_ModelPrototypeTags[m_iLodIndex]).c_str());
|
||||
GUI::InputInt("Lod Level", (_int*)(&m_iLodIndex));
|
||||
m_iLodIndex = max(0, m_iLodIndex);
|
||||
m_iLodIndex = min(m_iMaxLodLevel, m_iLodIndex);
|
||||
|
||||
GUI::Text("----- Transfrom ----");
|
||||
_float3 vMove = {};
|
||||
GUI::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
|
||||
|
||||
m_pTransformCom->Move_Right(vMove.x);
|
||||
m_pTransformCom->Move_Up(vMove.y);
|
||||
m_pTransformCom->Move_Look(vMove.z);
|
||||
|
||||
XMStoreFloat3(&m_vPosition, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
GUI::Text("----- Rotation ----");
|
||||
GUI::InputFloat("X##Rotation", &m_vTargetRotation.x, 1.f, 15.f);
|
||||
GUI::InputFloat("Y##Rotation", &m_vTargetRotation.y, 1.f, 15.f);
|
||||
GUI::InputFloat("Z##Rotation", &m_vTargetRotation.z, 1.f, 15.f);
|
||||
|
||||
GUI::InputFloat("m_fRotationAngle", &m_fRotationAngle, 1.f, 5.f);
|
||||
GUI::InputFloat("m_fOpenDuration", &m_fOpenDuration, 0.1f, 1.f);
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * XMLoadFloat4x4(m_pParentWorldMatrix));
|
||||
|
||||
if (GUI::Button("Open"))
|
||||
m_eState = LID_STATE::OPENING;
|
||||
|
||||
if (GUI::Button("Reset"))
|
||||
Reset();
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest_Lid::Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)
|
||||
{
|
||||
tinyxml2::XMLElement* object = doc.NewElement("Object");
|
||||
object->SetAttribute("Lod_Level", m_iMaxLodLevel);
|
||||
root->InsertEndChild(object);
|
||||
|
||||
#pragma region PROTOTYPETAG
|
||||
for (_uint i = 0; i < m_iLodIndex + 1; ++i)
|
||||
{
|
||||
tinyxml2::XMLElement* prototype = doc.NewElement("PrototypeTag");
|
||||
prototype->SetText(CMyTools::ToString(m_ModelPrototypeTags[i]).c_str());
|
||||
object->InsertEndChild(prototype);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region TRANSFORM
|
||||
_float3 vPosition = {};
|
||||
XMStoreFloat3(&vPosition, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
|
||||
_float3 vRotation = {};
|
||||
XMStoreFloat3(&vRotation, m_pTransformCom->Get_RollPitchYawVector());
|
||||
vRotation.x = XMConvertToDegrees(vRotation.x);
|
||||
vRotation.y = XMConvertToDegrees(vRotation.y);
|
||||
vRotation.z = XMConvertToDegrees(vRotation.z);
|
||||
|
||||
tinyxml2::XMLElement* Position = doc.NewElement("Position");
|
||||
Position->SetAttribute("x", vPosition.x);
|
||||
Position->SetAttribute("y", vPosition.y);
|
||||
Position->SetAttribute("z", vPosition.z);
|
||||
object->InsertEndChild(Position);
|
||||
|
||||
tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
|
||||
Scale->SetAttribute("x", vScale.x);
|
||||
Scale->SetAttribute("y", vScale.y);
|
||||
Scale->SetAttribute("z", vScale.z);
|
||||
object->InsertEndChild(Scale);
|
||||
|
||||
tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
|
||||
Rotation->SetAttribute("x", vRotation.x);
|
||||
Rotation->SetAttribute("y", vRotation.y);
|
||||
Rotation->SetAttribute("z", vRotation.z);
|
||||
object->InsertEndChild(Rotation);
|
||||
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -0,0 +1,416 @@
|
||||
#include "pch.h"
|
||||
#include "MapElement_Door.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Terrain.h"
|
||||
#include "Layer.h"
|
||||
#include "VIBuffer_Terrain.h"
|
||||
|
||||
CMapElement_Door::CMapElement_Door(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMapElement{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CMapElement_Door::CMapElement_Door(const CMapElement_Door& rhs)
|
||||
: CMapElement(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Initialize(void* pArg)
|
||||
{
|
||||
ELEMENT_DOOR_DESC* pDesc = static_cast<ELEMENT_DOOR_DESC*>(pArg);
|
||||
|
||||
m_iMaxLodLevel = pDesc->iMaxLodLevel;
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
}
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_isEdit = pDesc->isEdit;
|
||||
m_bSelected = false;
|
||||
m_vPosition = pDesc->vPosition;
|
||||
m_vScale = pDesc->vScale;
|
||||
m_vRotation = pDesc->vRotation;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
#endif // _DEBUG
|
||||
|
||||
m_vBoxSize = _float3(1.f, 1.f, 1.f);/*
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize);
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition);*/
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Door::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_bSelected = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void CMapElement_Door::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_isEdit)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
}
|
||||
}
|
||||
|
||||
void CMapElement_Door::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
if(m_isEdit)
|
||||
Describe_Entity();
|
||||
#endif
|
||||
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (m_bSelected && m_bUseSelectColor)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::MAPTOOL)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
//if (FAILED(m_pRigidBody->Render())) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
{
|
||||
CModel* pModel = { nullptr };
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
|
||||
reinterpret_cast<CComponent**>(&pModel))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelComs.push_back(pModel);
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
ELEMENT_DOOR_DESC* pPhysXDummyDesc = static_cast<ELEMENT_DOOR_DESC*>(pArg);
|
||||
|
||||
//// RIGID_BODY
|
||||
//CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
//Desc.iSubKind = ENUM_CLASS(PXOBJECT::BOX);//pPhysXDummyDesc->iSubKind;
|
||||
//if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CMapElement_Door* CMapElement_Door::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMapElement_Door* pInstance = new CMapElement_Door(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMapElement_Door");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CMapElement_Door::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CMapElement_Door* pInstance = new CMapElement_Door(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CMapElement_Door");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CMapElement_Door::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
//SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
for (auto& pModel : m_pModelComs)
|
||||
SAFE_RELEASE(pModel);
|
||||
}
|
||||
|
||||
void CMapElement_Door::Describe_Entity()
|
||||
{
|
||||
if (m_bDead)
|
||||
return;
|
||||
if (nullptr == m_pGameInstance)
|
||||
return;
|
||||
|
||||
GUI::Begin("Door");
|
||||
|
||||
PSX::PxVec3 vDir = PSX::PxVec3(0.f, 1.f, 0.f);
|
||||
|
||||
/*if (GUI::CollapsingHeader("Rigid Body"))
|
||||
{
|
||||
GUI::InputFloat("Power", &m_fPower);
|
||||
|
||||
if (GUI::Button("Move Test"))
|
||||
{
|
||||
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
if (nullptr != m_pActor)
|
||||
{
|
||||
m_pActor->wakeUp();
|
||||
m_pActor->addForce(vDir * m_fPower * 100000.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
}
|
||||
if (GUI::Button("OFF_Kinematic"))
|
||||
{
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
if (nullptr != m_pActor)
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
|
||||
}
|
||||
if (GUI::Button("ON_Kinematic"))
|
||||
{
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
if (nullptr != m_pActor)
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, true);
|
||||
}
|
||||
|
||||
if (GUI::InputFloat("Mass", &m_fMass))
|
||||
m_pActor->setMass(m_fMass);
|
||||
|
||||
m_pRigidBody->Describe_Entity();
|
||||
}*/
|
||||
|
||||
|
||||
GUI::Text(CMyTools::ToString(m_ModelPrototypeTags[m_iLodIndex]).c_str());
|
||||
GUI::InputInt("Lod Level", (_int*)(&m_iLodIndex));
|
||||
m_iLodIndex = max(0, m_iLodIndex);
|
||||
m_iLodIndex = min(m_iMaxLodLevel, m_iLodIndex);
|
||||
|
||||
if (GUI::Button("Save_DoorData"))
|
||||
{
|
||||
tinyxml2::XMLDocument doc;
|
||||
string strPath = "../Bin/Resources/Data/Map/Door/Element_Door_Info.xml";
|
||||
|
||||
tinyxml2::XMLError loadResult = doc.LoadFile(strPath.c_str());
|
||||
|
||||
tinyxml2::XMLElement* root = {};
|
||||
|
||||
if (loadResult == tinyxml2::XML_SUCCESS)
|
||||
{
|
||||
root = doc.FirstChildElement("Doors");
|
||||
Save_XML(doc, root);
|
||||
|
||||
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
|
||||
MSG_BOX("Failed to Save DoorInfo File");
|
||||
}
|
||||
}
|
||||
else
|
||||
MSG_BOX("Failed to Save Data");
|
||||
}
|
||||
|
||||
GUI::Checkbox("Select Color ON / OFF", &m_bUseSelectColor);
|
||||
|
||||
GUI::Text("----- Transfrom ----");
|
||||
_float3 vMove = {};
|
||||
GUI::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
|
||||
|
||||
m_pTransformCom->Move_Right(vMove.x);
|
||||
m_pTransformCom->Move_Up(vMove.y);
|
||||
m_pTransformCom->Move_Look(vMove.z);
|
||||
|
||||
XMStoreFloat3(&m_vPosition, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
GUI::InputFloat("X##Position", &m_vPosition.x, 0.1f, 1.f);
|
||||
GUI::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
|
||||
GUI::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
|
||||
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
{
|
||||
_float3 vPosition = {};
|
||||
if (m_pGameInstance->isPicking(&vPosition))
|
||||
{
|
||||
memcpy(&m_vPosition, &vPosition, sizeof(_float3));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
}
|
||||
}
|
||||
|
||||
GUI::Text("----- Rotation ----");
|
||||
GUI::InputFloat("X##Rotation", &m_vRotation.x, 1.f, 15.f);
|
||||
GUI::InputFloat("Y##Rotation", &m_vRotation.y, 1.f, 15.f);
|
||||
GUI::InputFloat("Z##Rotation", &m_vRotation.z, 1.f, 15.f);
|
||||
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
|
||||
GUI::Text("----- Scale ----");
|
||||
GUI::InputFloat("X##Scale", &m_vScale.x, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Y##Scale", &m_vScale.y, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Z##Scale", &m_vScale.z, 0.05f, 0.1f);
|
||||
|
||||
m_vScale.x = max(0.01f, m_vScale.x);
|
||||
m_vScale.y = max(0.01f, m_vScale.y);
|
||||
m_vScale.z = max(0.01f, m_vScale.z);
|
||||
|
||||
if (GUI::Button("Delete"))
|
||||
m_bDead = true;
|
||||
|
||||
GUI::End();
|
||||
|
||||
//m_bSelected = true;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)
|
||||
{
|
||||
tinyxml2::XMLElement* object = doc.NewElement("Object");
|
||||
object->SetAttribute("Lod_Level", m_iMaxLodLevel);
|
||||
root->InsertEndChild(object);
|
||||
|
||||
#pragma region PROTOTYPETAG
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
{
|
||||
tinyxml2::XMLElement* prototype = doc.NewElement("PrototypeTag");
|
||||
prototype->SetText(CMyTools::ToString(m_ModelPrototypeTags[i]).c_str());
|
||||
object->InsertEndChild(prototype);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region TRANSFORM
|
||||
_float3 vPosition = {};
|
||||
XMStoreFloat3(&vPosition, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
|
||||
_float3 vRotation = {};
|
||||
XMStoreFloat3(&vRotation, m_pTransformCom->Get_RollPitchYawVector());
|
||||
vRotation.x = XMConvertToDegrees(vRotation.x);
|
||||
vRotation.y = XMConvertToDegrees(vRotation.y);
|
||||
vRotation.z = XMConvertToDegrees(vRotation.z);
|
||||
|
||||
tinyxml2::XMLElement* Position = doc.NewElement("Position");
|
||||
Position->SetAttribute("x", vPosition.x);
|
||||
Position->SetAttribute("y", vPosition.y);
|
||||
Position->SetAttribute("z", vPosition.z);
|
||||
object->InsertEndChild(Position);
|
||||
|
||||
tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
|
||||
Scale->SetAttribute("x", vScale.x);
|
||||
Scale->SetAttribute("y", vScale.y);
|
||||
Scale->SetAttribute("z", vScale.z);
|
||||
object->InsertEndChild(Scale);
|
||||
|
||||
tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
|
||||
Rotation->SetAttribute("x", vRotation.x);
|
||||
Rotation->SetAttribute("y", vRotation.y);
|
||||
Rotation->SetAttribute("z", vRotation.z);
|
||||
object->InsertEndChild(Rotation);
|
||||
|
||||
//_float3 vHalfGeometryInfo = static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Get_HalfGeometryInfo();
|
||||
//tinyxml2::XMLElement* HalfGeometryInfo = doc.NewElement("HalfGeometryInfo");
|
||||
//HalfGeometryInfo->SetAttribute("x", vHalfGeometryInfo.x);
|
||||
//HalfGeometryInfo->SetAttribute("y", vHalfGeometryInfo.y);
|
||||
//HalfGeometryInfo->SetAttribute("z", vHalfGeometryInfo.z);
|
||||
//object->InsertEndChild(HalfGeometryInfo);
|
||||
|
||||
//_float3 vLocalTranslation = static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Get_LocalTranslation();
|
||||
//tinyxml2::XMLElement* LocalTranslation = doc.NewElement("LocalTranslation");
|
||||
//LocalTranslation->SetAttribute("x", vLocalTranslation.x);
|
||||
//LocalTranslation->SetAttribute("y", vLocalTranslation.y);
|
||||
//LocalTranslation->SetAttribute("z", vLocalTranslation.z);
|
||||
//object->InsertEndChild(LocalTranslation);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -78,9 +78,6 @@ void CMapElement_Interactable::Update(_float fTimeDelta)
|
||||
|
||||
void CMapElement_Interactable::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
|
||||
#endif
|
||||
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
@@ -43,9 +43,8 @@ void CMapObject_Collision::Late_Update(_float fTimeDelta)
|
||||
|
||||
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
|
||||
if (m_bVisible){
|
||||
if (m_pGameInstance->isIn_WorldFrustum(XMLoadFloat4(reinterpret_cast<_float4*>(m_CombinedWorldMatrix.m[3])), m_pTransformCom->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ class CLevel_MapViewer final : public CLevel
|
||||
HRESULT Ready_Layer_InstanceProp(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_BuildingContainer(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Unified(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Door(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Chest(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_MapObjectManager(const _wstring& strLayerTag);
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "MapElement.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CMapElement_Chest final : public CMapElement
|
||||
{
|
||||
public:
|
||||
enum class CHEST_STATE { IDLE, FOUND, OPENED, END };
|
||||
|
||||
public:
|
||||
typedef struct tagElement_Chest_Desc : MAPOBJECT_LOD_DESC
|
||||
{
|
||||
_uint iInteractableID = {};
|
||||
_uint iSubKind = {};
|
||||
_float3 vBoxLocalPosition;
|
||||
_float3 vBoxSize;
|
||||
|
||||
_uint iMaxLodLevel_Lid{};
|
||||
vector<_wstring> ModelPrototypeTags_Lid;
|
||||
_float3 vLid_Offset = {};
|
||||
}ELEMENT_CHEST_DESC;
|
||||
|
||||
private:
|
||||
CMapElement_Chest(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMapElement_Chest(const CMapElement_Chest& rhs);
|
||||
virtual ~CMapElement_Chest() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
|
||||
private:
|
||||
ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END };
|
||||
CHEST_STATE m_ePreState = {};
|
||||
CHEST_STATE m_eCurState = {};
|
||||
|
||||
_uint m_iShaderPass_Index = {};
|
||||
|
||||
class CMapElement_Chest_Lid* m_pLid = { nullptr };
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
|
||||
CTexture* m_pNoiseTextureCom = { nullptr };
|
||||
#ifdef _DEBUG
|
||||
_bool m_bUseSelectColor = { true };
|
||||
|
||||
_float m_fPower = {};
|
||||
_float m_fMass = {};
|
||||
_float3 m_vBoxSize = {};
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
HRESULT Ready_Lid(ELEMENT_CHEST_DESC* pArg);
|
||||
|
||||
void Chage_State();
|
||||
|
||||
public:
|
||||
static CMapElement_Chest* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
virtual HRESULT Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "MapElement.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CMapElement_Chest_Lid final : public CMapElement
|
||||
{
|
||||
public:
|
||||
enum class LID_STATE{IDLE, OPENING, OPENED, END};
|
||||
|
||||
private:
|
||||
CMapElement_Chest_Lid(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMapElement_Chest_Lid(const CMapElement_Chest_Lid& rhs);
|
||||
virtual ~CMapElement_Chest_Lid() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render(_uint iShaderPass);
|
||||
|
||||
private:
|
||||
LID_STATE m_eState = { LID_STATE::END };
|
||||
|
||||
_bool m_isRotationAnim = {};
|
||||
_float m_fOpenDuration = {};
|
||||
_float m_fTimeAcc = {};
|
||||
_float m_fRotationAngle = {};
|
||||
|
||||
_float3 m_vTargetPosition = {};
|
||||
_float3 m_vTargetRotation = {};
|
||||
|
||||
_float4x4 m_CombinedWorldMatrix = {};
|
||||
|
||||
#ifdef _DEBUG
|
||||
_bool m_isOpen = {};
|
||||
_float3 m_vDefaultPos = {};
|
||||
const _float4x4* m_pParentWorldMatrix = { nullptr };
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
_bool Opening(_float fTimeDelta);
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Reset();
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
public:
|
||||
static CMapElement_Chest_Lid* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
virtual HRESULT Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,59 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "MapElement.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CMapElement_Door final : public CMapElement
|
||||
{
|
||||
public:
|
||||
typedef struct tagElement_Interactable_Desc : MAPOBJECT_LOD_DESC
|
||||
{
|
||||
_bool isEdit = {}; // Editor 용
|
||||
_uint iSubKind = {};
|
||||
_float3 vBoxLocalPosition;
|
||||
_float3 vBoxSize;
|
||||
}ELEMENT_DOOR_DESC;
|
||||
|
||||
private:
|
||||
CMapElement_Door(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMapElement_Door(const CMapElement_Door& rhs);
|
||||
virtual ~CMapElement_Door() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
|
||||
#ifdef _DEBUG
|
||||
_bool m_isEdit = {};
|
||||
_bool m_bUseSelectColor = { true };
|
||||
|
||||
_float m_fPower = {};
|
||||
_float m_fMass = {};
|
||||
_float3 m_vBoxSize = {};
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
public:
|
||||
static CMapElement_Door* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
virtual HRESULT Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -241,10 +241,6 @@ void CGameInstance::BillBoard(CTransform* pTransform)
|
||||
|
||||
}
|
||||
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
|
||||
void CGameInstance::SlowMotion(_float fSlowIntense, _float fTime)
|
||||
{
|
||||
if (fTime <= 0 || fSlowIntense <= 0)
|
||||
@@ -255,6 +251,30 @@ void CGameInstance::SlowMotion(_float fSlowIntense, _float fTime)
|
||||
m_fSlowIntense = fSlowIntense;
|
||||
}
|
||||
|
||||
_float CGameInstance::Update_SlowMotion(_float fTimeDelta)
|
||||
{
|
||||
_float fExcuteTimeDelta = {};
|
||||
|
||||
if (m_isSlowMotion == false)
|
||||
return fTimeDelta;
|
||||
|
||||
m_vSlowTime.x += fTimeDelta;
|
||||
|
||||
if (m_vSlowTime.x >= m_vSlowTime.y) // 시간을 넘겼다면
|
||||
{
|
||||
m_isSlowMotion = false;
|
||||
m_vSlowTime.x = 0.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
fExcuteTimeDelta = m_fSlowIntense * fTimeDelta;
|
||||
}
|
||||
|
||||
return fExcuteTimeDelta;
|
||||
}
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
void CGameInstance::Save_ModelFilePath(const _char* FilePath)
|
||||
{
|
||||
m_FilePaths.push_back(FilePath);
|
||||
@@ -283,28 +303,6 @@ size_t CGameInstance::ModelFilePathCount()
|
||||
return m_FilePaths.size();
|
||||
}
|
||||
|
||||
_float CGameInstance::Update_SlowMotion(_float fTimeDelta)
|
||||
{
|
||||
_float fExcuteTimeDelta = {};
|
||||
|
||||
if (m_isSlowMotion == false)
|
||||
return fTimeDelta;
|
||||
|
||||
m_vSlowTime.x += fTimeDelta;
|
||||
|
||||
if (m_vSlowTime.x >= m_vSlowTime.y) // 시간을 넘겼다면
|
||||
{
|
||||
m_isSlowMotion = false;
|
||||
m_vSlowTime.x = 0.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
fExcuteTimeDelta = m_fSlowIntense * fTimeDelta;
|
||||
}
|
||||
|
||||
return fExcuteTimeDelta;
|
||||
}
|
||||
|
||||
#endif // EDITOR_PROJECT
|
||||
void CGameInstance::Render_Begin(const _float4* pClearColor)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ CGameObject::CGameObject(const CGameObject& rhs)
|
||||
, m_pContext(rhs.m_pContext)
|
||||
, m_pGameInstance(rhs.m_pGameInstance)
|
||||
, m_bDead(rhs.m_bDead)
|
||||
, m_bCloned(true)
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
|
||||
@@ -107,6 +107,7 @@ class ENGINE_DLL CGameObject abstract
|
||||
_float m_fCamDepth = { FLT_MAX };
|
||||
_bool m_bDead = { false };
|
||||
_bool m_bVisible = { true };
|
||||
_bool m_bCloned = { false };
|
||||
protected:
|
||||
virtual HRESULT Bind_ShaderResources()PURE;
|
||||
virtual HRESULT Ready_Components(void* pArg);
|
||||
|
||||
@@ -61,7 +61,6 @@ Global
|
||||
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Debug|x86.Build.0 = Debug|Win32
|
||||
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x64.ActiveCfg = Release|x64
|
||||
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x64.Build.0 = Release|x64
|
||||
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x86.ActiveCfg = Release|Win32
|
||||
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x86.Build.0 = Release|Win32
|
||||
{2133313A-E5E1-41CD-B976-21753FBCD083}.Debug|x64.ActiveCfg = Debug|x64
|
||||
|
||||
Reference in New Issue
Block a user