diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
index 117084542..bc18364e1 100644
--- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
+++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
@@ -38,6 +38,7 @@ struct ParticleValue
float fSizeDrag;
float3 vDeltaSize;
+ float2 vDelay;
};
@@ -79,6 +80,17 @@ void CS_MAIN(
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
+ particleValue.vDelay.x += fTimeDelta;
+
+ if (particleValue.vDelay.x < particleValue.vDelay.y)
+ {
+
+ g_VBInstanceOutput[iIndex] = particle;
+ g_ParticleValueOutput[iIndex] = particleValue;
+
+ return;
+ }
+
// 라이프타임 움직임
particle.vLifeTime.x += fTimeDelta;
@@ -97,7 +109,7 @@ void CS_MAIN(
particle.vLifeTime.x = 0.f;
particleValue.vAniIndex.x = 0.f;
-
+ particleValue.vDelay.x = 0.f;
g_VBInstanceOutput[iIndex] = particle;
g_ParticleValueOutput[iIndex] = particleValue;
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index a1f282c22..741b81ca2 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -157,6 +157,7 @@
+
@@ -174,8 +175,13 @@
+
+
+
+
+
@@ -197,6 +203,7 @@
+
@@ -204,6 +211,7 @@
+
@@ -215,11 +223,17 @@
+
+
+
+
+
+
@@ -245,6 +259,7 @@
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 238888ead..a0f5abf34 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -73,9 +73,6 @@
02.GameObjects\Cameras\CameraPosition
-
- 02.GameObjects\Cameras
-
02.GameObjects\SkyBox
@@ -127,6 +124,27 @@
04.Mechanic\State\Movement\Move
+
+ 02.GameObjects\Effect\Effect_Container
+
+
+ 02.GameObjects\Effect\EffectParts
+
+
+ 02.GameObjects\Effect\EffectObject
+
+
+ 02.GameObjects\Effect\TrailObject
+
+
+ 02.GameObjects\Effect\Effects\Bombard
+
+
+ 02.GameObjects\Effect\Effects\NomalJap
+
+
+ 02.GameObjects\PhysX\EffectHitBox
+
02.GameObjects\Cameras\CameraPosition\Socket
@@ -136,6 +154,9 @@
02.GameObjects\Cameras\CameraPosition\Player\Shoulder
+
+ 02.GameObjects\Cameras\Camera_Gaze
+
@@ -329,6 +350,33 @@
{0a3f9629-27d1-411c-806e-b550af8f1ca1}
+
+ {23fc95c4-0db3-4569-bd37-4d9bc32938ba}
+
+
+ {a88b2e75-92f7-4bed-b12a-76fb8763f533}
+
+
+ {482050d0-23dc-4744-b0db-0673a84f40e7}
+
+
+ {129abdf3-e499-467e-aca8-917e66827890}
+
+
+ {b3077955-b37e-41f8-bb7a-7b1483fcecdc}
+
+
+ {6fc43376-8b17-4888-b347-9beef7bee2ba}
+
+
+ {3a613328-d01e-43e5-a095-9a6912cb3cf0}
+
+
+ {639cba10-a93e-465c-a921-4541fe317446}
+
+
+ {54169d8d-f771-4638-a71e-3aca3eeff9bb}
+
{1f9c16e8-b675-419f-b166-b79662407259}
@@ -338,6 +386,9 @@
{2e4f0394-e25c-4508-937a-7e73d005ae5f}
+
+ {470c4db5-b306-4fb8-8338-0a99ac77ac89}
+
@@ -397,9 +448,6 @@
02.GameObjects\Cameras\CameraPosition
-
- 02.GameObjects\Cameras
-
02.GameObjects\SkyBox
@@ -451,6 +499,27 @@
04.Mechanic\State\Movement\Move
+
+ 02.GameObjects\Effect\Effect_Container
+
+
+ 02.GameObjects\Effect\EffectParts
+
+
+ 02.GameObjects\Effect\EffectObject
+
+
+ 02.GameObjects\Effect\TrailObject
+
+
+ 02.GameObjects\Effect\Effects\Bombard
+
+
+ 02.GameObjects\Effect\Effects\NomalJap
+
+
+ 02.GameObjects\PhysX\EffectHitBox
+
02.GameObjects\Cameras\CameraPosition\Socket
@@ -460,6 +529,12 @@
02.GameObjects\Cameras\CameraPosition\Player\Shoulder
+
+ 02.GameObjects\Player
+
+
+ 02.GameObjects\Cameras\Camera_Gaze
+
diff --git a/Jusin154_Team3D/Client/Private/Bombard.cpp b/Jusin154_Team3D/Client/Private/Bombard.cpp
new file mode 100644
index 000000000..cf24bbdc2
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Bombard.cpp
@@ -0,0 +1,193 @@
+#include "pch.h"
+#include "Bombard.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "PhysXEffectHitBox.h"
+
+
+CBombard::CBombard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CBombard::CBombard(const CBombard& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CBombard::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CBombard::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Child()))
+ return E_FAIL;
+
+ if (FAILED(Load_Directory("../Bin/Resources/Data/Effect/Bombard/")))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"Bombard";
+
+ CPartObject* pShootPt = Get_PartObject("Bombard_Shoot_Pt");
+ m_pLight_Projectile = Get_PartObject("Bombard_Projectile");
+ CPartObject* pCircle0 = Get_PartObject("Bombard_Circle0");
+
+ pShootPt->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+ m_pLight_Projectile->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+ pCircle0->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+
+ pCircle0->Set_Visible(true);
+ pShootPt->Set_Visible(true);
+ m_pLight_Projectile->Set_Visible(true);
+
+ SAFE_ADDREF(m_pLight_Projectile);
+ m_fDuration = 2.5f;
+
+ return S_OK;
+}
+
+void CBombard::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CBombard::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+ _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
+
+ m_pLight_Projectile->Get_Component()->Translation(vOwnerLook * 2.f);
+}
+
+void CBombard::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CBombard::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CBombard::Ready_Child()
+{
+ CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
+
+ m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+
+ XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
+
+ Desc.vRotRPY = { 0.f, 0.f, 0.f };
+ Desc.iSubKind = 70;
+ Desc.vDeltaPos = { 0.f, 0.f, 2.f };
+ Desc.vLifeTime = { 0.f, 2.f };
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
+ assert(false);
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+CBombard* CBombard::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CBombard* pInstance = new CBombard(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CBombard");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CBombard::Clone(void* pArg, CGameObject* pOwner)
+{
+ CBombard* pInstance = new CBombard(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CBombard");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CBombard::OnCollision(CGameObject* pOther , void* pDesc)
+{
+ //CTransform* pOtherTransform = p
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+
+ for (auto& pPair : m_PartObjects)
+ {
+ pPair.second->Set_Visible(true);
+ pPair.second->Get_Component()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
+ }
+
+
+ m_pLight_Projectile->Set_Visible(false);
+ Get_PartObject("Bombard_Shoot_Pt")->Set_Visible(false);
+
+ _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
+ Get_PartObject("Bombard_Smoke")->Get_Component()->Translation(vOwnerLook);
+
+ Get_PartObject("Bombard_Circle0")->Set_Visible(false);
+
+ m_pPhysHitBox->Set_Dead();
+}
+
+void CBombard::Free()
+{
+ __super::Free();
+
+ //if(m_pPhysHitBox != nullptr)
+ // if (m_pPhysHitBox->Get_Depth() == false)
+ // SAFE_RELEASE(m_pPhysHitBox);
+
+ SAFE_RELEASE(m_pLight_Projectile);
+
+}
+
+void CBombard::Describe_Entity()
+{
+
+}
+
+HRESULT CBombard::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp
index a0d336b21..705d3dbde 100644
--- a/Jusin154_Team3D/Client/Private/Broom.cpp
+++ b/Jusin154_Team3D/Client/Private/Broom.cpp
@@ -38,18 +38,6 @@ void CBroom::Priority_Update(_float fTimeDelta)
void CBroom::Update(_float fTimeDelta)
{
- m_pModelCom->ComputeAnimation();
-
- static _uint m_iIndex = 0;
-
- if (m_pGameInstance->Key_Down(DIK_1))
- m_iIndex++;
- if (m_pGameInstance->Key_Down(DIK_2))
- m_iIndex--;
-
- m_pModelCom->Set_AnimationIndex(m_iIndex);
-
-
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
}
diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp
index 0c53d1141..839277a46 100644
--- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp
+++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp
@@ -36,8 +36,12 @@ HRESULT CCamPosition_Shoulder::Initialize(void* pArg)
m_vAccDegreeXY = { 0.f, 0.f };
m_fCameraFocalLength = pDesc->fCameraFocalLength;
m_fBackFrontRatio = pDesc->fBackFrontRatio;
- m_pTransformCom->Set_State(STATE::POSITION, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio)) * m_fShoulderDistance);
+ m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio = pDesc->vInitialLook;
+ m_vShoulderStartRatio.x *= -1.f;
+ m_pTransformCom->Set_State(STATE::POSITION,
+ m_pParentTransformCom->Get_State(STATE::POSITION)
+ + XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio)) * m_fShoulderDistance);
_vector vShoulderPos = Get_WorldPostion();
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
@@ -56,6 +60,9 @@ HRESULT CCamPosition_Shoulder::Initialize(void* pArg)
void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
{
+ if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
+ return;
+ }
if (true == m_bMovable) {
m_vAccDegreeXY.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
m_vAccDegreeXY.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
@@ -80,6 +87,12 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
void CCamPosition_Shoulder::Update(_float fTimeDelta)
{
+ if (m_pGameInstance->Key_Up(DIK_O)) {
+ m_pBinded_Camera->Toggle_Priority();
+ }
+ if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
+ return;
+ }
Describe_Entity();
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
m_bMovable = !m_bMovable;
@@ -88,13 +101,28 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
m_pGameInstance->Toggle_MouseCenter();
}
if (m_pGameInstance->Key_Up(DIK_P)) {
- m_vShoulderPosRatio.x *= -1.f;
+ m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio;
+ m_vShoulderStartRatio.x *= -1.f;
+ m_bLerp = true;
+ m_vLerpTimer.x = 0.f;
}
}
void CCamPosition_Shoulder::Late_Update(_float fTimeDelta)
{
+ if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
+ return;
+ }
+ if (true == m_bLerp) {
+ m_vLerpTimer.x += fTimeDelta;
+ XMStoreFloat3(&m_vShoulderPosRatio, XMVectorLerp(XMLoadFloat3(&m_vShoulderStartRatio), XMLoadFloat3(&m_vShoulderOtherRatio), m_vLerpTimer.x / m_vLerpTimer.y));
+ if (m_vLerpTimer.x > m_vLerpTimer.y) {
+ m_bLerp = false;
+ m_vLerpTimer.x = 0.f;
+ m_vShoulderPosRatio = m_vShoulderOtherRatio;
+ }
+ }
}
HRESULT CCamPosition_Shoulder::Render()
@@ -136,14 +164,19 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts()
CameraDesc.pFollowTarget = m_pTarget_FollowPart;
CameraDesc.pLookTarget = m_pTarget_LookPart;
CameraDesc.iPriority = 51;
+ CameraDesc.pCameraKey = CAMERA_SHOULDER;
+ CameraDesc.bEnableTransitionLerp = true;
+ CameraDesc.bEnableFollowLerp = true;
+ CameraDesc.bEnableLookLerp = true;
+ CameraDesc.vTransitionTime = { 0.f, 1.f };
+ CameraDesc.vFollowLerpTime = { 0.f, 0.16f };
+ CameraDesc.vLookLerpTime = { 0.f, 0.16f };
- CCamera_Gaze* pCamera = { nullptr };
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &pCamera)))
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &m_pBinded_Camera)))
{
return E_FAIL;
}
- m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, TEXT("CAM_SHOULDER"));
+ m_pGameInstance->Add_Camera(g_iStaticLevel, m_pBinded_Camera, CAMERA_SHOULDER);
return S_OK;
diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp
index c82a2a622..d37e0cb12 100644
--- a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp
+++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp
@@ -14,10 +14,14 @@ CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs)
void CCamera_Debug::Priority_Update(_float fTimeDelta)
{
+ m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, false);
}
void CCamera_Debug::Update(_float fTimeDelta)
{
+ if (false == m_bActive) {
+ return;
+ }
Transition(fTimeDelta);
_float3 vCamPos = {};
XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION));
@@ -68,6 +72,9 @@ void CCamera_Debug::Update(_float fTimeDelta)
void CCamera_Debug::Late_Update(_float fTimeDelta)
{
+ if (false == m_bActive) {
+ return;
+ }
}
HRESULT CCamera_Debug::Render()
@@ -97,8 +104,6 @@ HRESULT CCamera_Debug::Initialize(void* pArg)
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
m_bActive = true;
- m_pGameInstance->Add_Camera(NEXT_LEVEL, this, m_pCameraKey);
- m_pGameInstance->Bind_Camera(NEXT_LEVEL, m_pCameraKey, false);
return S_OK;
}
@@ -133,7 +138,7 @@ CCamera_Debug* CCamera_Debug::Create(ID3D11Device* pDevice, ID3D11DeviceContext*
return pInstance;
}
-CCamera_Debug* CCamera_Debug::Clone(void* pArg, CGameObject* pOwner)
+CGameObject* CCamera_Debug::Clone(void* pArg, CGameObject* pOwner)
{
CCamera_Debug* pInstance = new CCamera_Debug(*this);
pInstance->m_pOwner = pOwner;
diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
index a7eeb9049..81b6771d0 100644
--- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
+++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
@@ -13,9 +13,27 @@ CCamera_Gaze::CCamera_Gaze(const CCamera_Gaze& rhs)
void CCamera_Gaze::Priority_Update(_float fTimeDelta)
{
+ if (false == m_bActive) {
+ return;
+ }
if (false == m_bIsCurrentTransition) {
- m_pTransformCom->Set_State(STATE::POSITION, m_pFollowTarget->Get_Component()->Get_State(STATE::POSITION));
- m_pTransformCom->LookAt(m_pLookTarget->Get_Component()->Get_State(STATE::POSITION));
+ if (m_bEnable_FollowLerp) {
+ _vector vNewPos = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vFollowPos_Src), XMLoadFloat3(&m_vFollowPos_Dest), m_vFollowLerpTime.x / m_vFollowLerpTime.y), 1.f);
+ m_pTransformCom->Set_State(STATE::POSITION, vNewPos);
+ }
+ else {
+ m_pTransformCom->Set_State(STATE::POSITION, m_pFollowTarget->Get_Component()->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);
+ m_pTransformCom->LookAt(vNewLook);
+ }
+ else {
+ m_pTransformCom->LookAt(m_pLookTarget->Get_Component()->Get_State(STATE::POSITION));
+ }
+ }
+ else {
+
}
m_bActive = true;
__super::Bind_Matrices();
@@ -23,22 +41,81 @@ void CCamera_Gaze::Priority_Update(_float fTimeDelta)
void CCamera_Gaze::Update(_float fTimeDelta)
{
+ GUI::Text("%d", m_iPriority);
+ if (false == m_bActive) {
+ return;
+ }
+ Transition(fTimeDelta);
+ Update_LerpTimer(fTimeDelta);
+
+ Describe_Entity();
+}
+
+void CCamera_Gaze::Update_LerpTimer(Engine::_float fTimeDelta)
+{
+ if (false == m_bActive) {
+ return;
+ }
+ if (true == m_bEnable_LookLerp) {
+ m_vLookLerpTime.x += fTimeDelta;
+ if (m_vLookLerpTime.y <= m_vLookLerpTime.x) {
+ m_vLookLerpTime.x = 0.f;
+ m_bEnable_LookLerp = false;
+ XMStoreFloat3(&m_vLookPos_Src, XMLoadFloat3(&m_vLookPos_Dest));
+ XMStoreFloat3(&m_vLookPos_Dest, m_pLookTarget->Get_WorldPostion());
+ }
+ }
+
+ if (true == m_bEnable_FollowLerp) {
+ m_vFollowLerpTime.x += fTimeDelta;
+ if (m_vFollowLerpTime.y <= m_vFollowLerpTime.x) {
+ m_vFollowLerpTime.x = 0.f;
+ m_bEnable_FollowLerp = false;
+ XMStoreFloat3(&m_vFollowPos_Src, m_pTransformCom->Get_State(STATE::POSITION));
+ XMStoreFloat3(&m_vFollowPos_Dest, m_pFollowTarget->Get_WorldPostion());
+ }
+ }
+}
+
+void CCamera_Gaze::Enable_FollowLerp()
+{
+ m_bEnable_FollowLerp = true;
+ m_vFollowLerpTime.x = 0.f;
+ XMStoreFloat3(&m_vFollowPos_Src, 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());
+}
+
+void CCamera_Gaze::Toggle_Priority()
+{
+ if (m_iPriority == 99) {
+ m_iPriority = 51;
+ }
+ else {
+ m_iPriority = 99;
+ m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, false);
+ }
}
void CCamera_Gaze::Late_Update(_float fTimeDelta)
{
+ if (false == m_bActive) {
+ return;
+ }
}
-
HRESULT CCamera_Gaze::Render()
{
return S_OK;
}
-
HRESULT CCamera_Gaze::Initialize_Prototype()
{
return S_OK;
}
-
HRESULT CCamera_Gaze::Initialize(void* pArg)
{
@@ -52,7 +129,6 @@ HRESULT CCamera_Gaze::Initialize(void* pArg)
return S_OK;
}
-
HRESULT CCamera_Gaze::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
@@ -61,12 +137,10 @@ HRESULT CCamera_Gaze::Ready_Components(void* pArg)
return S_OK;
}
-
HRESULT CCamera_Gaze::Bind_ShaderResources()
{
return S_OK;
}
-
CCamera_Gaze* CCamera_Gaze::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CCamera_Gaze* pInstance = new CCamera_Gaze(pDevice, pContext);
@@ -78,7 +152,6 @@ CCamera_Gaze* CCamera_Gaze::Create(ID3D11Device* pDevice, ID3D11DeviceContext* p
return pInstance;
}
-
CGameObject* CCamera_Gaze::Clone(void* pArg, CGameObject* pOwner)
{
CCamera_Gaze* pInstance = new CCamera_Gaze(*this);
@@ -91,13 +164,35 @@ CGameObject* CCamera_Gaze::Clone(void* pArg, CGameObject* pOwner)
return pInstance;
}
-
void CCamera_Gaze::Free()
{
__super::Free();
}
-
void CCamera_Gaze::Describe_Entity()
{
+ GUI::Begin("Camera_Gaze_Describe");
+ m_pTransformCom->Describe_Entity();
+ GUI::Text("LOOK_SRC %.2f, %.2f, %.2f", m_vLookPos_Src.x, m_vLookPos_Src.y, m_vLookPos_Src.z);
+ GUI::Text("LOOK_DST %.2f, %.2f, %.2f", m_vLookPos_Dest.x, m_vLookPos_Dest.y, m_vLookPos_Dest.z);
+ GUI::Text("FOLLOW_SRC %.2f, %.2f, %.2f", m_vFollowPos_Src.x, m_vFollowPos_Src.y, m_vFollowPos_Src.z);
+ GUI::Text("FOLLOW_DST %.2f, %.2f, %.2f", m_vFollowPos_Dest.x, m_vFollowPos_Dest.y, m_vFollowPos_Dest.z);
+ GUI::Checkbox("TransitionLerp", &m_bEnable_TransitionLerp);
+ if (true == m_bEnable_TransitionLerp) {
+ GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vTransitionTime.x, m_vTransitionTime.y);
+ GUI::SliderFloat("TranslationTime", &m_vTransitionTime.y, 0.1f, 3.f, "%.1f");
+ }
+ GUI::Checkbox("LookLerp", &m_bEnable_LookLerp);
+ if (true == m_bEnable_LookLerp) {
+ GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vLookLerpTime.x, m_vLookLerpTime.y);
+ GUI::SliderFloat("LookTime", &m_vLookLerpTime.y, 0.1f, 3.f, "%.1f");
+ }
+
+ GUI::Checkbox("FollowLerp", &m_bEnable_FollowLerp);
+ if (true == m_bEnable_FollowLerp) {
+ GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vFollowLerpTime.x, m_vFollowLerpTime.y);
+ GUI::SliderFloat("FollowTime", &m_vFollowLerpTime.y, 0.1f, 3.f, "%.1f");
+ }
+
+ GUI::End();
}
diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp
new file mode 100644
index 000000000..4d3561f29
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp
@@ -0,0 +1,665 @@
+#include "pch.h"
+#include "EffectObject.h"
+#include "GameInstance.h"
+
+CEffectObject::CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CPartObject(pDevice, pContext)
+{
+}
+
+CEffectObject::CEffectObject(const CEffectObject& rhs)
+ :CPartObject(rhs)
+{
+}
+
+void CEffectObject::Priority_Update(_float fTimeDelta)
+{
+}
+
+void CEffectObject::Update(_float fTimeDelta)
+{
+
+}
+
+void CEffectObject::Late_Update(_float fTimeDelta)
+{
+
+}
+
+HRESULT CEffectObject::Render()
+{
+ if (FAILED(Bind_ShaderResources()))
+ {
+ return E_FAIL;
+ }
+
+ for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
+ {
+
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
+ return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture")))
+ return E_FAIL;
+
+
+
+
+ if (FAILED(m_pInstance_ModelCom->Render(i)))
+ {
+ return E_FAIL;
+ }
+ }
+
+
+ return S_OK;
+}
+
+HRESULT CEffectObject::Render_Blur()
+{
+ if (FAILED(Bind_ShaderResources()))
+ {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fBlurIntensity", &m_EffectInfo.fBlurIntensity, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iBlurWeight", &m_EffectInfo.iBlurWeight, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+
+
+ for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
+ {
+
+
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::BLUR)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
+ return E_FAIL;
+
+
+ if (FAILED(m_pInstance_ModelCom->Render(i)))
+ {
+ return E_FAIL;
+ }
+
+ }
+
+
+
+
+ return S_OK;
+}
+
+
+
+HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
+{
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pNoise_TextureCom);
+ SAFE_RELEASE(m_pMasking_TextureCom);
+ SAFE_RELEASE(m_pDissolve_TextureCom);
+ SAFE_RELEASE(m_pEmissive_TextureCom);
+
+ SAFE_RELEASE(m_pInstance_ModelCom);
+
+ if (m_pLightCom != nullptr)
+ SAFE_RELEASE(m_pLightCom);
+
+ _string strPerfectFilePath = pFilePath;
+
+ strPerfectFilePath += ".bin";
+
+ HANDLE hFile = CreateFileW(
+ CMyTools::ToWstring(strPerfectFilePath).c_str(), // 파일 이름
+ GENERIC_READ, // 읽기 모드
+ FILE_SHARE_READ, // 다른 프로세스도 읽기 가능
+ NULL,
+ OPEN_EXISTING, // 기존 파일 열기
+ FILE_ATTRIBUTE_NORMAL,
+ NULL
+ );
+
+
+ if (hFile == INVALID_HANDLE_VALUE) {
+ MessageBox(NULL, L"오브젝트 읽기 실패", L"System Message", MB_OK);
+ return E_FAIL;
+ }
+
+ // 나중에 패키징할때 패스를 저장할거임
+
+
+ DWORD dwByte(0);
+
+ if (!ReadFile(hFile, &m_EffectInfo, sizeof(EFFECT_INFO), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ m_EffectInfo.LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION);
+ m_EffectInfo.LightDesc.iLevel = ENUM_CLASS(eLevel);
+
+ if (m_EffectInfo.LightDesc.eType != LIGHT::DIRECTIONAL) // 0이 아닐때만 생성
+ {
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pLightCom, &m_EffectInfo.LightDesc)))
+ {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+ }
+
+
+ if (m_EffectInfo.isDiffuse)
+ {
+ size_t iComponentLength = {};
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ m_strDiffuseName = szName;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDiffuseName),
+ reinterpret_cast(&m_pDiffuse_TextureCom))))
+ {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ }
+
+
+ }
+
+ if (m_EffectInfo.isNoise)
+ {
+ size_t iComponentLength = {};
+
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ m_strNoiseName = szName;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNoiseName),
+ reinterpret_cast(&m_pNoise_TextureCom))))
+ return E_FAIL;
+ }
+
+
+ }
+
+ if (m_EffectInfo.isMasking)
+ {
+ size_t iComponentLength = {};
+
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ m_strMaskingName = szName;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strMaskingName),
+ reinterpret_cast(&m_pMasking_TextureCom))))
+ {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+ }
+
+
+ }
+
+ if (m_EffectInfo.isDissolve)
+ {
+ size_t iComponentLength = {};
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ m_strDissolveName = szName;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDissolveName),
+ reinterpret_cast(&m_pDissolve_TextureCom))))
+ {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+
+ }
+
+
+ }
+
+ if (m_EffectInfo.isEmissive)
+ {
+ size_t iComponentLength = {};
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ m_strEmissiveName = szName;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strEmissiveName),
+ reinterpret_cast(&m_pEmissive_TextureCom))))
+ {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+ }
+
+
+ }
+
+ if (m_EffectInfo.isDistortion)
+ {
+ size_t iComponentLength = {};
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ m_strDistortionName = szName;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDistortionName),
+ reinterpret_cast(&m_pDistortion_TextureCom))))
+ {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+ }
+
+
+ }
+
+ size_t iComponentLength = {};
+
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)(DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ m_strModelName = szName;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strModelName),
+ reinterpret_cast(&m_pInstance_ModelCom))))
+ {
+ CloseHandle(hFile);
+ return E_FAIL;;
+ }
+ }
+
+
+
+ m_pInstance_ModelCom->Load_InstanceModel(hFile);
+
+ CloseHandle(hFile);
+
+
+
+ return S_OK;
+}
+
+
+
+HRESULT CEffectObject::Bind_ShaderResources()
+{
+
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ 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_isDiffuse", &m_EffectInfo.isDiffuse, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isMasking", &m_EffectInfo.isMasking, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isDissolve", &m_EffectInfo.isDissolve, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoise", &m_EffectInfo.isNoise, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isEmissive", &m_EffectInfo.isEmissive, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isDistortion", &m_EffectInfo.isDistortion, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuseUVMove", &m_EffectInfo.isDiffuseUVMove, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isMaskUVMove", &m_EffectInfo.isMaskUVMove, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoiseUVMove", &m_EffectInfo.isNoiseUVMove, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isReverseDissolve", &m_EffectInfo.isReverseDissolve, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isEmissiveDissolve", &m_EffectInfo.isEmissiveDissolve, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isMaskClampSample", &m_EffectInfo.isMaskClampSample, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoiseColor", &m_EffectInfo.isNoiseColor, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoiseAlpha", &m_EffectInfo.isNoiseAlpha, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isNomalDissolve", &m_EffectInfo.isNomalDissolve, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vColor", &m_EffectInfo.vColor, sizeof(_float4)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vEmissive", &m_EffectInfo.vEmissive, sizeof(_float4)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fEmissiveStrength", &m_EffectInfo.fEmissiveStrength, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fNoiseDistortionIntensity", &m_EffectInfo.fNoiseDistortionIntensity, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vDiffuseUVGainAmount", &m_EffectInfo.vDiffuseUVGainAmount, sizeof(_float2)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vMaskingUVGainAmount", &m_EffectInfo.vMaskingUVGainAmount, sizeof(_float2)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vNoiseUVGainAmount", &m_EffectInfo.vNoiseUVGainAmount, sizeof(_float2)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vDiffuseDistortionUVGainAmount", &m_EffectInfo.vDiffuseDistortionUVGainAmount, sizeof(_float2)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vMaskDistortionUVGainAmount", &m_EffectInfo.vMaskDistortionUVGainAmount, sizeof(_float2)))) {
+ return E_FAIL;
+ }
+
+
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vUVCutting", &m_EffectInfo.vUVCutting, sizeof(_float2)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vUVMaskCutting", &m_EffectInfo.vUVMaskCutting, sizeof(_float2)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskMoveLerpOption", &m_EffectInfo.iMaskMoveLerpOption, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseMoveLerpOption", &m_EffectInfo.iDiffuseMoveLerpOption, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskDistortionMoveLerpOption", &m_EffectInfo.iMaskDistortionMoveLerpOption, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseDistortionMoveLerpOption", &m_EffectInfo.iDiffuseDistortionMoveLerpOption, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fDiffuseAlpha", &m_EffectInfo.fDiffuseAlpha, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fSoftenExp", &m_EffectInfo.fSoftenExp, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fSoftStrength", &m_EffectInfo.fSoftStrength, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCoreBoost", &m_EffectInfo.fCoreBoost, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fRadius", &m_EffectInfo.fRadius, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fSoftMaskEdge", &m_EffectInfo.fSoftMaskEdge, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fSoftMask", &m_EffectInfo.fSoftMask, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+
+ if (m_pDiffuse_TextureCom != nullptr)
+ {
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_DiffuseTexture", 0))) {
+ return E_FAIL;
+ }
+ }
+
+ if (m_pNoise_TextureCom != nullptr)
+ {
+ if (FAILED(m_pNoise_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_NoiseTexture", 0))) {
+ return E_FAIL;
+ }
+ }
+
+ if (m_pMasking_TextureCom != nullptr)
+ {
+ if (FAILED(m_pMasking_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_MaskingTexture", 0))) {
+ return E_FAIL;
+ }
+ }
+
+ if (m_pDissolve_TextureCom != nullptr)
+ {
+ if (FAILED(m_pDissolve_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_DissolveTexture", 0))) {
+ return E_FAIL;
+ }
+ }
+
+ if (m_pEmissive_TextureCom != nullptr)
+ {
+ if (FAILED(m_pEmissive_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_EmissiveTexture", 0))) {
+ return E_FAIL;
+ }
+ }
+
+ if (m_pDistortion_TextureCom != nullptr)
+ {
+ if (FAILED(m_pDistortion_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_DistortionTexture", 0))) {
+ return E_FAIL;
+ }
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+
+
+
+ return S_OK;
+}
+
+HRESULT CEffectObject::Ready_Components(void* pArg)
+{
+ CTransform::TRANSFORM_DESC TransformDesc = {};
+
+ TransformDesc.fRadius = 20.f;
+ TransformDesc.fRotationPerSec = 10.f;
+ TransformDesc.fSpeedPerSec = 10.f;
+
+
+ if (FAILED(__super::Ready_Components(&TransformDesc))) {
+ return E_FAIL;
+ }
+
+
+ //나중에 로드할 때 라이트를 값을 입력받아서 생성 하자
+ return S_OK;
+}
+
+HRESULT CEffectObject::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEffectObject::Initialize(void* pArg)
+{
+
+ if (FAILED(__super::Initialize(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+
+
+void CEffectObject::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pNoise_TextureCom);
+ SAFE_RELEASE(m_pMasking_TextureCom);
+ SAFE_RELEASE(m_pDissolve_TextureCom);
+ SAFE_RELEASE(m_pEmissive_TextureCom);
+ SAFE_RELEASE(m_pDistortion_TextureCom);
+
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pInstance_ModelCom);
+
+ if(m_pLightCom != nullptr)
+ SAFE_RELEASE(m_pLightCom);
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/EffectParts.cpp b/Jusin154_Team3D/Client/Private/EffectParts.cpp
new file mode 100644
index 000000000..3000b31ab
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/EffectParts.cpp
@@ -0,0 +1,130 @@
+#include "pch.h"
+#include "EffectParts.h"
+
+#include "GameInstance.h"
+#include "Instance_Model.h"
+
+CEffectParts::CEffectParts(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffectObject{ pDevice, pContext }
+{
+}
+
+CEffectParts::CEffectParts(const CEffectParts& rhs)
+ : CEffectObject(rhs)
+{
+}
+
+HRESULT CEffectParts::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CEffectParts::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+
+ Set_Visible(false);
+
+ return S_OK;
+}
+
+void CEffectParts::Priority_Update(_float fTimeDelta)
+{
+
+}
+
+void CEffectParts::Update(_float fTimeDelta)
+{
+
+ if (m_bVisible == false)
+ return;
+
+ if (m_pInstance_ModelCom == nullptr)
+ return;
+
+ m_pInstance_ModelCom->Drop(fTimeDelta);
+
+ if (m_EffectInfo.isBillboard)
+ m_pGameInstance->BillBoard(m_pTransformCom);
+
+
+}
+
+void CEffectParts::Late_Update(_float fTimeDelta)
+{
+
+ if (m_bVisible == false)
+ return;
+
+ if (m_pInstance_ModelCom == nullptr)
+ return;
+
+
+ if (m_EffectInfo.isBlur == true)
+ {
+ m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this);
+ }
+
+ m_pGameInstance->Add_RenderGroup(RENDER::EFFECT, this);
+
+}
+
+
+HRESULT CEffectParts::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_INSTANCE_MODEL, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+
+ return S_OK;
+}
+
+
+CEffectParts* CEffectParts::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CEffectParts* pInstance = new CEffectParts(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CEffectParts");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CEffectParts::Clone(void* pArg, CGameObject* pOwner)
+{
+ CEffectParts* pInstance = new CEffectParts(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CEffectParts");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CEffectParts::Free()
+{
+ __super::Free();
+
+}
+
+void CEffectParts::Describe_Entity()
+{
+
+}
diff --git a/Jusin154_Team3D/Client/Private/Effect_Container.cpp b/Jusin154_Team3D/Client/Private/Effect_Container.cpp
new file mode 100644
index 000000000..7f7a5e905
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp
@@ -0,0 +1,192 @@
+#include "pch.h"
+#include "Effect_Container.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "TrailObject.h"
+
+
+#include
+
+CEffect_Container::CEffect_Container(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CContainerObject{ pDevice, pContext }
+{
+}
+
+CEffect_Container::CEffect_Container(const CEffect_Container& rhs)
+ : CContainerObject(rhs)
+{
+
+}
+
+HRESULT CEffect_Container::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CEffect_Container::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Child()))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+void CEffect_Container::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CEffect_Container::Update(_float fTimeDelta)
+{
+ __super::Update(fTimeDelta);
+
+}
+
+void CEffect_Container::Late_Update(_float fTimeDelta)
+{
+ __super::Late_Update(fTimeDelta);
+}
+
+void CEffect_Container::OnCollision(CGameObject* pOther, void* pDesc)
+{
+}
+
+HRESULT CEffect_Container::Load_Directory(const _char* pPath)
+{
+
+ for (const auto& file : filesystem::directory_iterator(pPath))
+ {
+ if (file.is_directory())
+ continue;
+
+ string ext = file.path().extension().string();
+
+ if (strcmp(ext.c_str(), ".bin"))
+ continue;
+
+ _char szFilePath[MAX_PATH] = {};
+
+ strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str());
+
+
+ /////////////////////////////
+
+ CEffectParts* pEffectParts = nullptr;
+
+ CPartObject::PARTOBJECT_DESC PartsDesc{};
+
+ PartsDesc.pParentTransform = m_pTransformCom;
+
+
+
+
+ /*이펙트 껍데기 생성*/
+
+ _wstring wstrFileName = file.path().stem().wstring(); //이름 넣기
+
+ if (FAILED(Add_PartObject(CMyTools::ToString(wstrFileName), g_iStaticLevel, &pEffectParts, &PartsDesc))) {
+ assert(false);
+ return E_FAIL;
+ }
+
+
+ /*이펙트 로드 로드*/
+ size_t iPos = {};
+ _string strFilePath = szFilePath;
+
+ while ((iPos = strFilePath.find(".bin")) != std::string::npos) {
+ strFilePath.erase(iPos, 4);
+ };
+
+
+ if (FAILED(pEffectParts->Load(strFilePath.c_str(),static_cast(NEXT_LEVEL))))
+ {
+ Safe_Release(pEffectParts);
+ continue;
+ }
+
+ Safe_Release(pEffectParts);
+ }
+
+ return S_OK;
+}
+
+HRESULT CEffect_Container::Ready_Components(void* pArg)
+{
+ CTransform::TRANSFORM_DESC TransformDesc = {};
+
+ TransformDesc.fRadius = 20.f;
+ TransformDesc.fRotationPerSec = 10.f;
+ TransformDesc.fSpeedPerSec = 10.f;
+
+ if (FAILED(__super::Ready_Components(&TransformDesc))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CEffect_Container::Ready_Child()
+{
+
+ return S_OK;
+}
+
+void CEffect_Container::Free()
+{
+ __super::Free();
+
+}
+
+HRESULT CEffect_Container::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+void CEffect_Container::Update_Event(_float fTimeDelta)
+{
+
+ m_fPreAccTime = m_fAccTime;
+ m_fAccTime += fTimeDelta;
+
+ if (m_fAccTime >= m_fDelay || m_isDelayed == false) // 아직 딜레이되지 않았고 딜레이를 넘어섰다면
+ {
+ m_isDelayed = true;
+ }
+ else
+ {
+ return;
+ }
+
+
+ if (m_fAccTime >= m_fDuration) // 듀레이션을 넘어섰다면
+ {
+ if (m_isLoop)
+ {
+ m_fAccTime = 0.f;
+ m_fPreAccTime = 0.f;
+ m_isDelayed = false;
+ }
+ else
+ {
+ m_bVisible = false;
+ }
+ }
+
+
+ for (auto& pPair : m_Events) // 이벤트들을 비교하면서 실행함
+ {
+ if (pPair.first >= m_fPreAccTime && pPair.first <= m_fAccTime)
+ {
+ pPair.second();
+ }
+ }
+
+
+}
diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp
index dc5946532..b13002b56 100644
--- a/Jusin154_Team3D/Client/Private/Level_Field.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp
@@ -40,7 +40,7 @@ HRESULT CLevel_Field::Initialize()
void CLevel_Field::Update(_float fTimeDelta)
{
- if (m_pGameInstance->Key_Up(DIK_0))
+ if (m_pGameInstance->Key_Up(DIK_F1))
{
m_pGameInstance->Set_LevelToChange();
}
diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
index ed55e5887..e6da7f86c 100644
--- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
@@ -31,14 +31,9 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
if (FAILED(Ready_Layer_UI(LAYER_UI))) {
return E_FAIL;
}
- if (FAILED(Ready_Layer_Effect(LAYER_EFFECT))) {
- return E_FAIL;
- }
-
if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) {
return E_FAIL;
}
-
if (FAILED(Ready_Layer_SkyBox(TEXT("Layer_SkyBox")))) {
return E_FAIL;
}
@@ -54,7 +49,7 @@ HRESULT CLevel_GamePlay::Initialize()
void CLevel_GamePlay::Update(_float fTimeDelta)
{
- if (m_pGameInstance->Key_Up(DIK_0))
+ if (m_pGameInstance->Key_Up(DIK_F1))
{
m_pGameInstance->Set_LevelToChange();
}
@@ -94,7 +89,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag)
HRESULT CLevel_GamePlay::Ready_Layer_Camera()
{
- /*CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
+ CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
Camera_Desc.fFovy = XMConvertToRadians(60.0f);
Camera_Desc.fNear = 0.1f;
Camera_Desc.fFar = 200.f;
@@ -104,7 +99,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera()
Camera_Desc.pCameraKey = CAMERA_DEBUG;
Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
Camera_Desc.fMouseSensor = 0.1f;
- Camera_Desc.iPriority = 99;
+ Camera_Desc.iPriority = 70;
Camera_Desc.pFollowTarget = { nullptr };
Camera_Desc.pLookTarget = { nullptr };
@@ -112,9 +107,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera()
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))){
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_DEBUG, true))) {
+
+ m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG);
+ if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) {
return E_FAIL;
- }*/
+ }
+
return S_OK;
}
@@ -130,11 +128,6 @@ HRESULT CLevel_GamePlay::Ready_Markers()
return S_OK;
}
-HRESULT CLevel_GamePlay::Ready_Layer_Effect(const _wstring& strLayerTag)
-{
- return S_OK;
-}
-
HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
@@ -148,8 +141,9 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE)))
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_SKYBOX))){
return E_FAIL;
+ }
CDummy_PhysXWall::PHYSXDUMMY_DESC Desc{};
Desc.vPos = { 0.f, 0.f, 0.f };
diff --git a/Jusin154_Team3D/Client/Private/Level_Logo.cpp b/Jusin154_Team3D/Client/Private/Level_Logo.cpp
index b63de72ac..3520a55ea 100644
--- a/Jusin154_Team3D/Client/Private/Level_Logo.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_Logo.cpp
@@ -23,7 +23,7 @@ HRESULT CLevel_Logo::Initialize()
void CLevel_Logo::Update(_float fTimeDelta)
{
- if (m_pGameInstance->Key_Up(DIK_0))
+ if (m_pGameInstance->Key_Up(DIK_F1))
{
m_pGameInstance->Set_LevelToChange();
}
diff --git a/Jusin154_Team3D/Client/Private/Level_Restart.cpp b/Jusin154_Team3D/Client/Private/Level_Restart.cpp
index 3e0d35041..48f96f994 100644
--- a/Jusin154_Team3D/Client/Private/Level_Restart.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_Restart.cpp
@@ -22,7 +22,7 @@ HRESULT CLevel_Restart::Initialize()
void CLevel_Restart::Update(_float fTimeDelta)
{
- if (m_pGameInstance->Key_Up(DIK_0))
+ if (m_pGameInstance->Key_Up(DIK_F1))
{
m_pGameInstance->Set_LevelToChange();
}
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 40fbdb436..6e6ee579a 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -17,8 +17,23 @@
#include "Wand.h"
#include "SkyBox.h"
#include "Broom.h"
+
+#pragma region PHYSX
+
#include "Dummy_PhysXWall.h"
#include "Dummy_PhysXPlayable.h"
+#include "PhysXEffectHitBox.h"
+
+#pragma endregion
+
+#pragma region EFFECT
+
+#include "EffectParts.h"
+#include "Bombard.h"
+#include "TrailObject.h"
+#include "Instance_Model.h"
+
+#pragma endregion
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: m_pDevice{ pDevice }
@@ -128,6 +143,66 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+
+ Asset_FileLoad("../Bin/Resources/Textures/Effect/Noises", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
+
+ _string strFilePath = pFilePath;
+ _wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+
+ });
+
+ Asset_FileLoad("../Bin/Resources/Textures/Effect/Diffuse", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
+
+ _string strFilePath = pFilePath;
+ _wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+
+ });
+
+ Asset_FileLoad("../Bin/Resources/Textures/Effect/Flipbooks", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
+
+ _string strFilePath = pFilePath;
+ _wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+
+ });
+
+ Asset_FileLoad("../Bin/Resources/Textures/Effect/Gradients", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
+
+ _string strFilePath = pFilePath;
+ _wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+
+ });
+
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_MESH,
@@ -152,6 +227,12 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_MODEL,
+ CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl"),
+ VTX_MODEL_INSTANCE_PARTICLE::Elements, VTX_MODEL_INSTANCE_PARTICLE::iNumElements)))) {
+ return E_FAIL;
+ }
+
// Heavy Wall
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
{
@@ -168,6 +249,8 @@ HRESULT CLoader::Loading_For_GamePlay()
Desc.vAutoDamping = { 100.f, 100.f };
}
+
+
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
@@ -204,6 +287,57 @@ HRESULT CLoader::Loading_For_GamePlay()
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
+
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CEffectParts::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTrailObject::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CBombard::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+
+
+ m_strMessage = TEXT("Model Loading..");
+
+
+ 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/SkyBox.fbx", XMMatrixIdentity()))))
+ return E_FAIL;
+
+ Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
+ CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
+ return E_FAIL;
+
+ return S_OK;
+
+ });
+
+ Asset_FileLoad("../Bin/Resources/Models/Effect/Goo", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
+ CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
+ return E_FAIL;
+
+ return S_OK;
+
+ });
+
+ Asset_FileLoad("../Bin/Resources/Models/Effect/NomalMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
+ CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
+ return E_FAIL;
+
+ return S_OK;
+
+ });
+
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
//if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) {
@@ -256,6 +390,7 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBroom::Create(m_pDevice, m_pContext))))
return E_FAIL;
+
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXWall::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
@@ -264,6 +399,10 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CPhysXEffectHitBox::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
m_strMessage = TEXT("정보를 불러오는 중입니다.");
m_strMessage = TEXT("로딩이 완료되었습니다..");
@@ -315,6 +454,31 @@ HRESULT CLoader::Loading_For_Restart()
return S_OK;
}
+HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function AddPrototypeEvent)
+{
+ for (const auto& file : filesystem::directory_iterator(pDirectoryPath))
+ {
+ if (file.is_directory())
+ continue;
+
+ string ext = file.path().extension().string();
+
+ if (!strcmp(ext.c_str(), ".txt"))
+ continue;
+
+ _char szFilePath[MAX_PATH] = {};
+
+ strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str());
+
+ wstring wstrFileName = pPreName + file.path().stem().wstring();
+
+ AddPrototypeEvent(wstrFileName, szFilePath);
+
+ }
+
+ return S_OK;
+}
+
CLoader* CLoader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID)
{
CLoader* pInstance = new CLoader(pDevice, pContext);
diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp
new file mode 100644
index 000000000..b1cc4b88a
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp
@@ -0,0 +1,164 @@
+#include "pch.h"
+#include "NomalJap.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "PhysXEffectHitBox.h"
+
+
+CNomalJap::CNomalJap(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CNomalJap::CNomalJap(const CNomalJap& rhs)
+ : CEffect_Container(rhs)
+{
+
+}
+
+HRESULT CNomalJap::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CNomalJap::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Child()))
+ return E_FAIL;
+
+ m_wstrEffectName = L"Nomal_Jap";
+
+ m_PartObjects.begin()->second->Set_Visible(true);
+ m_PartObjects.begin()->second->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+
+ m_fDuration = 5.f;
+
+ return S_OK;
+}
+
+void CNomalJap::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CNomalJap::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+}
+
+void CNomalJap::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CNomalJap::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CNomalJap::Ready_Child()
+{
+ CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
+
+ m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+
+ XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
+
+ Desc.vRotRPY = { 0.f, 0.f, 0.f };
+ Desc.iSubKind = 70;
+ Desc.vDeltaPos = { 0.f, 0.f, 2.f };
+ Desc.vLifeTime = { 0.f, 2.f };
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
+ assert(false);
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+CNomalJap* CNomalJap::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CNomalJap* pInstance = new CNomalJap(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CNomalJap");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CNomalJap::Clone(void* pArg, CGameObject* pOwner)
+{
+ CNomalJap* pInstance = new CNomalJap(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CNomalJap");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CNomalJap::OnCollision(CGameObject* pOther , void* pDesc)
+{
+ //CTransform* pOtherTransform = p
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+
+ for (auto& pPair : m_PartObjects)
+ {
+ pPair.second->Set_Visible(true);
+ pPair.second->Get_Component()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
+ }
+
+ m_PartObjects.begin()->second->Set_Visible(false);
+
+ m_pPhysHitBox->Set_Dead();
+}
+
+void CNomalJap::Free()
+{
+ __super::Free();
+
+ //if(m_pPhysHitBox != nullptr)
+ // if (m_pPhysHitBox->Get_Depth() == false)
+ // SAFE_RELEASE(m_pPhysHitBox);
+
+}
+
+void CNomalJap::Describe_Entity()
+{
+
+}
+
+HRESULT CNomalJap::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp b/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp
new file mode 100644
index 000000000..1904b1ea0
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp
@@ -0,0 +1,199 @@
+#include "pch.h"
+#include "PhysXEffectHitBox.h"
+#include "GameInstance.h"
+
+
+CPhysXEffectHitBox::CPhysXEffectHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CGameObject{ pDevice, pContext }
+{
+}
+
+CPhysXEffectHitBox::CPhysXEffectHitBox(const CPhysXEffectHitBox& rhs)
+ : CGameObject(rhs)
+{
+}
+
+HRESULT CPhysXEffectHitBox::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CPhysXEffectHitBox::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CPhysXEffectHitBox::Priority_Update(_float fTimeDelta)
+{
+ m_pTransformCom->RewindMomentum();
+}
+
+void CPhysXEffectHitBox::Update(_float fTimeDelta)
+{
+ m_pTransformCom->AccumulateMomentum(XMLoadFloat3(&m_vDeltaPos));
+ m_vLifeTime.x += fTimeDelta;
+ if (m_vLifeTime.x > m_vLifeTime.y) {
+ m_bDead = true;
+ }
+}
+
+void CPhysXEffectHitBox::Late_Update(_float fTimeDelta)
+{
+ if (true == m_pCharacter_Controller->IsActive()) {
+ m_pCharacter_Controller->Move(fTimeDelta);
+ }
+ if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
+ m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
+ }
+}
+
+HRESULT CPhysXEffectHitBox::Render()
+{
+ //if (FAILED(Bind_ShaderResources())) {
+ // return E_FAIL;
+ //}
+
+ //if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom))) {
+ // return E_FAIL;
+ //}
+ //if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
+ // return E_FAIL;
+ //}
+
+ //if (FAILED(m_pModelCom->Render(0))) {
+ // return E_FAIL;
+ //}
+#ifdef _DEBUG
+ if (FAILED(m_pCharacter_Controller->Render())) {
+ return E_FAIL;
+ }
+#endif // _DEBUG
+
+
+ return S_OK;
+}
+
+HRESULT CPhysXEffectHitBox::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+ PHYSXDUMMY_DESC* pDesc = static_cast(pArg);
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPos), 1.f));
+ m_pTransformCom->Rotation(pDesc->vRotRPY.x, pDesc->vRotRPY.y, pDesc->vRotRPY.z);
+ m_vDeltaPos = pDesc->vDeltaPos;
+ m_vLifeTime = pDesc->vLifeTime;
+ { // CCT
+ CCharacter_Controller::Character_Controller_DESC Desc{};
+
+ Desc.iSubKind = pDesc->iSubKind;
+ Desc.pTransform = m_pTransformCom;
+ Desc.eBodyType = ACTOR::BOX;
+ Desc.fContactOffset = 0.1f;
+ Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
+ Desc.bAutoStepping = { false };
+ Desc.fStepOffset = { 0.05f };
+ Desc.fRadius = 0.5f;
+ Desc.fHeight = 1.0f;
+ Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_EffectHitBox_HitReport::Create();
+ Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_EffectHitBox_Behavior::Create();
+ Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
+ return E_FAIL;
+ }
+ }
+ m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
+ /* Com_Shader */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
+ reinterpret_cast(&m_pShaderCom)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) {
+ return E_FAIL;
+ }
+
+
+ return S_OK;
+}
+
+HRESULT CPhysXEffectHitBox::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
+ 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;
+}
+
+CPhysXEffectHitBox* CPhysXEffectHitBox::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CPhysXEffectHitBox* pInstance = new CPhysXEffectHitBox(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CPhysXEffectHitBox");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CPhysXEffectHitBox::Clone(void* pArg, CGameObject* pOwner)
+{
+ CPhysXEffectHitBox* pInstance = new CPhysXEffectHitBox(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CPhysXEffectHitBox");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CPhysXEffectHitBox::Free()
+{
+ if (nullptr == m_pGameInstance) {
+ m_pCharacter_Controller->SetActive(false);
+ PSX::PxExtendedVec3 pxControlllerPos = m_pCharacter_Controller->Get_Controller()->getPosition();
+ PSX::PxTransform pxTransform((_float)pxControlllerPos.x, (_float)pxControlllerPos.y + 100.f, (_float)pxControlllerPos.z);
+ m_pCharacter_Controller->Set_Position(XMLoadFloat3((_float3*)&pxTransform.p));
+ m_pGameInstance->Detach_Actor(*m_pCharacter_Controller->Get_Actor());
+
+
+ }
+ __super::Free();
+ if (nullptr != m_pCallBack_Behavior) {
+ m_pCallBack_Behavior->Finalize();
+ }
+ if (nullptr != m_pCallBack_HitReport) {
+ m_pCallBack_HitReport->Finalize();
+ }
+ SAFE_RELEASE(m_pCharacter_Controller);
+ Safe_Delete(m_pCallBack_Behavior);
+ Safe_Delete(m_pCallBack_HitReport);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pModelCom);
+}
+
+void CPhysXEffectHitBox::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp
index 385766790..cde4cb9bf 100644
--- a/Jusin154_Team3D/Client/Private/Player.cpp
+++ b/Jusin154_Team3D/Client/Private/Player.cpp
@@ -12,7 +12,6 @@
#include "CallBack_Playable_HitReport.h"
#pragma region STATE
-
#include "State_Idle.h"
#include "State_Dodge.h"
#include "State_Jump.h"
@@ -21,6 +20,8 @@
#include "State_Combat.h"
#pragma endregion
+#include "Bombard.h"
+
CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CUnit(pDevice, pContext)
{
@@ -38,15 +39,17 @@ HRESULT CPlayer::Initialize_Prototype()
HRESULT CPlayer::Initialize(void* pArg)
{
- if (FAILED(__super::Initialize(pArg)))
+ if (FAILED(__super::Initialize(pArg))) {
return E_FAIL;
+ }
- if (FAILED(Ready_Components()))
+ if (FAILED(Ready_Components())) {
return E_FAIL;
+ }
-
- if (FAILED(Ready_Parts()))
+ if (FAILED(Ready_Parts())) {
return E_FAIL;
+ }
Load_KeyFrame();
@@ -54,6 +57,8 @@ HRESULT CPlayer::Initialize(void* pArg)
Set_Anim();
+ m_eSpell = STATEANIM::DESCENDO;
+
{
CFSM::FSM_DESC FSMDesc{};
FSMDesc.pStates = &m_States;
@@ -77,27 +82,23 @@ void CPlayer::Priority_Update(_float fTimeDelta)
void CPlayer::Update(_float fTimeDelta)
{
- m_pModelCom->ComputeAnimation();
-
-
- IsSprint();
- IsWalk();
-
m_pFSM->Update_State(fTimeDelta);
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
-
+
__super::Update(fTimeDelta);
Describe_Entity();
+
+
m_pCharacter_Controller->Move(fTimeDelta);
+ TestKeyInput(fTimeDelta);
}
void CPlayer::Late_Update(_float fTimeDelta)
{
-
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position());
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
@@ -107,6 +108,8 @@ void CPlayer::Late_Update(_float fTimeDelta)
HRESULT CPlayer::Render()
{
+ if (!m_bVisible)
+ return S_OK;
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
@@ -155,13 +158,15 @@ HRESULT CPlayer::Ready_Components()
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
- reinterpret_cast(&m_pModelCom))))
+ reinterpret_cast(&m_pModelCom)))) {
return E_FAIL;
+ }
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
- reinterpret_cast(&m_pShaderCom))))
+ reinterpret_cast(&m_pShaderCom)))) {
return E_FAIL;
+ }
{ // CCT
CCharacter_Controller::Character_Controller_DESC Desc{};
@@ -207,48 +212,6 @@ HRESULT CPlayer::Ready_Parts()
return E_FAIL;
}
- //{
- // CCamPosition_Socket::CAMERAPOSITION_PLAYER_DESC Desc{};
-
- // Desc.pParentTransform = m_pTransformCom;
-
- // if (FAILED(Add_PartObject("Cam_TopDown_Look", g_iStaticLevel, &m_pCamPosition_TopDown_LookPart, &Desc)))
- // {
- // return E_FAIL;
- // }
-
- // CCamPosition_Arm::CameraArm_DESC CameraArmDesc{};
- // XMStoreFloat3(&CameraArmDesc.fAt, m_pTransformCom->Get_State(STATE::POSITION));
- // CameraArmDesc.pParentTransform = m_pTransformCom;
- // CameraArmDesc.fEye = { 0.f, 10.f, 10.f };
- // CameraArmDesc.fMouseSensor = 0.4f;
- // CameraArmDesc.fDistance = 4.f;
- // CameraArmDesc.pParentTransform = m_pTransformCom;
-
- // if (FAILED(Add_PartObject("Cam_TopDown_Follow", g_iStaticLevel, &m_pCamPosition_TopDown_FollowPart, &CameraArmDesc))) {
- // return E_FAIL;
- // }
-
- // CCamera_Gaze::CAMERA_GAZE_DESC CameraDesc{};
- // CameraDesc.fFovy = XMConvertToRadians(60.0f);
- // CameraDesc.fNear = 0.1f;
- // CameraDesc.fFar = 300.f;
- // CameraDesc.fSpeedPerSec = 5.f;
- // CameraDesc.fRotationPerSec = XMConvertToRadians(90.f);
- // CameraDesc.pFollowTarget = m_pCamPosition_TopDown_FollowPart;
- // CameraDesc.pLookTarget = m_pCamPosition_TopDown_LookPart;
- // CameraDesc.iPriority = 51;
-
- // CCamera_Gaze* pCamera = { nullptr };
-
- // if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &pCamera)))
- // {
- // return E_FAIL;
- // }
-
- // m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, TEXT("CAM_TOPVIEW"));
- //}
-
{
CCamPosition_Shoulder::CAMERA_SHOULDER_DESC Desc;
Desc.pParentTransform = m_pTransformCom;
@@ -277,430 +240,11 @@ HRESULT CPlayer::Bind_ShaderResources()
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;
}
-
-#pragma region STATE
-
-HRESULT CPlayer::InputSystem()
-{
- if (m_pGameInstance->Key_Down(DIK_1)
- || m_pGameInstance->Key_Down(DIK_2)
- || m_pGameInstance->Key_Down(DIK_3)
- || m_pGameInstance->Key_Down(DIK_4)
- || m_pGameInstance->Key_Down(DIK_5)
- || m_pGameInstance->Key_Down(DIK_6))
- {
- return S_OK;
- }
- return E_FAIL;
-}
-
-HRESULT CPlayer::InputSkill()
-{
- if (
- m_pGameInstance->Key_Down(DIK_SPACE)
- || m_pGameInstance->Key_Down(DIK_LCONTROL)
- || m_pGameInstance->Key_Down(DIK_E)
- || m_pGameInstance->Key_Down(DIK_R)
- || m_pGameInstance->Key_Down(DIK_Q)
- || m_pGameInstance->Mouse_Up(DIM_LBUTTON)
- || m_pGameInstance->Key_Down(DIK_1)
- //|| m_pGameInstance->Key_Down(DIK_C)
- //|| m_pGameInstance->Key_Down(DIK_V)
- //|| m_pGameInstance->Key_Down(DIK_T)
- //|| m_pGameInstance->Key_Down(DIK_G)
- //|| m_pGameInstance->Key_Down(DIK_B)
- )
- {
- return S_OK;
- }
- return E_FAIL;
-}
-
-HRESULT CPlayer::InputMove()
-{
- if (m_pGameInstance->Key_Pressing(DIK_W)
- || m_pGameInstance->Key_Pressing(DIK_A)
- || m_pGameInstance->Key_Pressing(DIK_S)
- || m_pGameInstance->Key_Pressing(DIK_D))
- {
- return S_OK;
- }
- return E_FAIL;
-}
-
-void CPlayer::Behavior_IdleEnter() {
- pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
-
- if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG | FSMSTATE::WALK)) {
- if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) {
- pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) {
- pairAnimInfo = m_Animation[STATEANIM::WALK_STOP];
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) {
- // pairAnimInfo = m_Animation[STATEANIM::spr]
- }
- }
-
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_IdleExitCheck()
-{
- // S_OK -> 현 상태 유지
- // E_FAIL -> 현 상태 탈출
- if (SUCCEEDED(InputSystem())) {
- //Event
- return S_OK;
- }
- if (SUCCEEDED(InputSkill())) {
- if (m_pGameInstance->Key_Down(DIK_SPACE)) {
- m_pFSM->Change_State(FSMSTATE::JUMP);
- }
- else if (m_pGameInstance->Key_Down(DIK_LCONTROL)) {
- m_pFSM->Change_State(FSMSTATE::DODGE);
- }
- else if (m_pGameInstance->Key_Down(DIK_E)) {
- //m_pFSM->Change_State(FSMSTATE::AAA);
- }
- else if (m_pGameInstance->Key_Down(DIK_R)) {
- //m_pFSM->Change_State(FSMSTATE::SKILL);
- }
- else if (m_pGameInstance->Key_Down(DIK_Q)) {
- //m_pFSM->Change_State(FSMSTATE::SKILL2);
- }
- else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
- //m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK);
- }
- else if (m_pGameInstance->Key_Down(DIK_1)) {
- //m_pFSM->Change_State(FSMSTATE::CAST);
- }
- return E_FAIL;
- }
- if (SUCCEEDED(InputMove())) {
- m_pFSM->Change_State(FSMSTATE::MOVE);
- return E_FAIL;
- }
- return S_OK;
-}
-
-void CPlayer::Behavior_IdleExit()
-{
- m_pFSM->Disable_State(FSMSTATE::IDLE);
-}
-
-void CPlayer::Behavior_MoveEnter()
-{
- pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::SPRINT];
- _bool bFoward = m_pGameInstance->Key_Pressing(DIK_W);
- _bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
- _bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
- _bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
-
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE | FSMSTATE::LAND | FSMSTATE::COMBAT)) {
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
- // Idle -> Move
- if (true == m_bSprintToggle) {
- m_pFSM->Enable_State(FSMSTATE::SPRINT);
-
- if (true == bFoward) {
- pairAnimInfo = m_Animation[STATEANIM::SPRINT];
- }
- else {
- // ?
- }
- }
- else if (true == m_bWalkToggle) {
- m_pFSM->Enable_State(FSMSTATE::WALK);
-
- if (true == bFoward) {
- pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
- }
- else if (true == bBackward) {
- pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
- }
- }
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::DODGE | FSMSTATE::LAND)) {
- // OtherMove -> AnotherMove
-
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::COMBAT)) {
- // Combat -> Move
-
- }
- }
- else { // While Moving
- if (true == m_bSprintToggle) {
- m_pFSM->Enable_State(FSMSTATE::SPRINT);
- pairAnimInfo = m_Animation[STATEANIM::SPRINT];
-
- }
- else if (true == m_bWalkToggle) {
- m_pFSM->Enable_State(FSMSTATE::WALK);
- if (true == bFoward) {
- pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
- }
- else if (true == bBackward) {
- pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
- }
- //else if (true == bLeft){
- // pairAnimInfo = m_Animation[STATEANIM::WALK_STOP];
- //}
- //else if (true == bRight){
- // pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
- //}
- }
- }
-
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_MoveExitCheck()
-{
- if (SUCCEEDED(InputSystem())) {
- //Event
- return S_OK;
- }
- if (SUCCEEDED(InputSkill())) {
- if (m_pGameInstance->Key_Down(DIK_SPACE)) {
- m_pFSM->Change_State(FSMSTATE::JUMP);
- }
- else if (m_pGameInstance->Key_Down(DIK_LCONTROL)) {
- m_pFSM->Change_State(FSMSTATE::DODGE);
- }
- else if (m_pGameInstance->Key_Down(DIK_E)) {
- //m_pFSM->Change_State(FSMSTATE::AAA);
- }
- else if (m_pGameInstance->Key_Down(DIK_R)) {
- //m_pFSM->Change_State(FSMSTATE::SKILL);
- }
- else if (m_pGameInstance->Key_Down(DIK_Q)) {
- //m_pFSM->Change_State(FSMSTATE::SKILL2);
- }
- else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
- //m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK);
- }
- else if (m_pGameInstance->Key_Down(DIK_1)) {
- //m_pFSM->Change_State(FSMSTATE::CAST);
- }
- return E_FAIL;
- }
- if (SUCCEEDED(InputMove())) {
-
- if (m_pGameInstance->Key_Pressing(DIK_W)){
-
- }
- if (m_pGameInstance->Key_Pressing(DIK_A)){
-
- }
- if (m_pGameInstance->Key_Pressing(DIK_S)){
-
- }
- if (m_pGameInstance->Key_Pressing(DIK_D)){
-
- }
- return S_OK;
- }
- m_pFSM->Change_State(FSMSTATE::IDLE);
- return E_FAIL;
-}
-
-void CPlayer::Behavior_MoveExit()
-{
- m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK);
-}
-
-void CPlayer::Behavior_JumpEnter()
-{
- pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::JUMP_SPRINT];
- m_pFSM->Enable_State(FSMSTATE::JUMP);
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::JOG | FSMSTATE::WALK)) {
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
- // Idle -> Jump
- // pairAnimInfo = Get_AnimInfo(STATEANIM::Jump_IDLE);
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) {
- pairAnimInfo = m_Animation[STATEANIM::JUMP_JOG];
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) {
-
- }
- }
- else {
- // Drop?
- }
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_JumpExitCheck()
-{
- if (SUCCEEDED(InputSystem())) {
- //Event
- return S_OK;
- }
- if (IsCurrentKeyFrame("Jump")) {
- m_pFSM->Change_State(FSMSTATE::LAND);
- return E_FAIL;
- }
- return S_OK;
-}
-
-void CPlayer::Behavior_JumpExit()
-{
- m_pFSM->Disable_State(FSMSTATE::JUMP);
-}
-
-void CPlayer::Behavior_LandEnter()
-{
- pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::LAND);
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_LandExitCheck()
-{
- if (SUCCEEDED(InputSystem())) {
- //Event
- //return S_OK;
- }
- if (m_pModelCom->IsFinishedAnim()) {
- m_pFSM->Change_State(FSMSTATE::IDLE);
- return E_FAIL;
- } // 혹시 Land to (Jog, Sprint, Dodge) 같은 애니메이션 있으면 여기에 분기 조건 넣으면 됨
- return S_OK;
-}
-
-void CPlayer::Behavior_LandExit()
-{
- m_pFSM->Disable_State(FSMSTATE::LAND);
-}
-
-void CPlayer::Behavior_DodgeEnter()
-{
- // 혹시 @@ to Dodge 있으면 여기에
- pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::DODGE);
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_DodgeExitCheck()
-{
- if (SUCCEEDED(InputSystem())) {
- //Event
- //return S_OK;
- }
- if (m_pModelCom->IsFinishedAnim()) {
- m_pFSM->Change_State(FSMSTATE::IDLE);
- return E_FAIL;
- }
- return S_OK;
-}
-
-void CPlayer::Behavior_DodgeExit()
-{
- m_pFSM->Disable_State(FSMSTATE::DODGE);
-}
-
-
-void CPlayer::Add_FSM()
-{
-#pragma region Behavior_Movement_NotFocus
- {
- CState_Idle::STATE_IDLE_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
- Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
- Desc.funcPriorityUpdate = nullptr;
- Desc.funcLateUpdate = nullptr;
- m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
- }
- {
- CState_Move::STATE_MOVE_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
- Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
- Desc.funcPriorityUpdate = nullptr;
- Desc.funcLateUpdate = nullptr;
- m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
- }
-#pragma endregion
-#pragma region Behavior_Movement_Focus
- {
- CState_Jump::STATE_JUMP_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_JumpEnter(); };
- Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_JumpExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_JumpExit(); };
- m_States.emplace(FSMSTATE::JUMP, CState_Jump::Create(&Desc));
- }
- {
- CState_Land::STATE_LAND_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_LandEnter(); };
- Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_LandExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_LandExit(); };
- m_States.emplace(FSMSTATE::LAND, CState_Land::Create(&Desc));
- }
- {
- CState_Dodge::STATE_DODGE_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_DodgeEnter(); };
- Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_DodgeExit(); };
- Desc.funcPriorityUpdate = nullptr;
- Desc.funcLateUpdate = nullptr;
- m_States.emplace(FSMSTATE::DODGE, CState_Dodge::Create(&Desc));
- }
-#pragma endregion
-#pragma region Behavior_Combat_NotFocus
-
-#pragma endregion
-#pragma region Behavior_Combat_Focus
-
-#pragma endregion
-
-}
-
-void CPlayer::Set_Anim()
-{
-
- m_Animation[STATEANIM::DODGE] = { 802,false };
-
- m_Animation[STATEANIM::SKILL] = { 593,false };
- m_Animation[STATEANIM::SKILL2] = { 915,false };
- m_Animation[STATEANIM::LIGHT_ATTACK] = { 413,false };
- m_Animation[STATEANIM::LAND] = { 259,false };
- m_Animation[STATEANIM::CAST] = { 696,false };
-
- m_Animation[STATEANIM::IDLE] = { 266,true };
- m_Animation[STATEANIM::IDLE_TURN_L] = { 270,false };
- m_Animation[STATEANIM::IDLE_TURN_R] = { 430,false };
- m_Animation[STATEANIM::IDLE_TURN_BWD] = { 268,false };
-
- m_Animation[STATEANIM::WALK_FWD] = { 625,true };
- m_Animation[STATEANIM::WALK_BWD] = { 166,true };
- m_Animation[STATEANIM::WALK_STOP] = { 344,false };
-
- m_Animation[STATEANIM::JOG_FWD] = { 167,true };
- m_Animation[STATEANIM::JOG_STOP] = { 289,false };
-
- m_Animation[STATEANIM::JUMP] = { 205,false };
- m_Animation[STATEANIM::JUMP_JOG] = { 203,false };
- m_Animation[STATEANIM::JUMP_SPRINT] = { 207,false };
-
- m_Animation[STATEANIM::SPRINT] = { 599,true };
-
-}
-#pragma endregion STATE
-
CPlayer* CPlayer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CPlayer* pInstance = new CPlayer(pDevice, pContext);
@@ -765,30 +309,18 @@ void CPlayer::Describe_Entity()
GUI::DragFloat3("Pos", Pos3);
- _float RotR,RotU,RotL;
+ _float RotR, RotU, RotL;
RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT));
RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP));
RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK));
float Rot3[3] = { RotR, RotU,RotL };
GUI::DragFloat3("Rot", Rot3);
-
-}
-_bool CPlayer::IsSprint()
-{
- if (m_pGameInstance->Key_Down(DIK_LSHIFT))
- {
- return m_bSprintToggle = !m_bSprintToggle;
- }
- return false;
-}
-_bool CPlayer::IsWalk()
-{
- if (m_pGameInstance->Key_Down(DIK_C))
- {
- return m_bWalkToggle = !m_bWalkToggle;
- }
- return false;
+ string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
+ GUI::Text(AnimList.c_str());
+
+ GUI::Checkbox("Render", &m_bVisible);
+
}
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
new file mode 100644
index 000000000..42fa72364
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -0,0 +1,648 @@
+#include "pch.h"
+#include "Player.h"
+
+#include "GameInstance.h"
+#include "CamPosition_Socket.h"
+#include "Camera_Gaze.h"
+#include "CamPosition_Arm.h"
+#include "Wand.h"
+#include "Character_Controller.h"
+#include "CallBack_Playable_Behavior.h"
+#include "CamPosition_Shoulder.h"
+#include "CallBack_Playable_HitReport.h"
+
+#pragma region STATE
+#include "State_Idle.h"
+#include "State_Dodge.h"
+#include "State_Jump.h"
+#include "State_Land.h"
+#include "State_Move.h"
+#include "State_Combat.h"
+#pragma endregion
+
+#include "Bombard.h"
+
+#pragma region States
+void CPlayer::TestKeyInput(_float fTimeDelta)
+{
+ if (m_pGameInstance->Key_Down(DIK_F1))
+ {
+ m_eSpell = STATEANIM::ACCIO;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F2))
+ {
+ m_eSpell = STATEANIM::DESCENDO;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F3))
+ {
+ m_eSpell = STATEANIM::DEPULSO;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F4))
+ {
+ m_eSpell = STATEANIM::DIFFINDO;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F5))
+ {
+ m_eSpell = STATEANIM::DISILLUSION_ENTER;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F6))
+ {
+ m_eSpell = STATEANIM::DISILLUSION_EXIT;
+ }
+
+}
+
+HRESULT CPlayer::InputAction()
+{
+ if (
+ m_pGameInstance->Key_Down(DIK_SPACE)
+ || m_pGameInstance->Key_Down(DIK_LCONTROL)
+ || m_pGameInstance->Key_Down(DIK_E)
+ || m_pGameInstance->Key_Down(DIK_R)
+ || m_pGameInstance->Key_Down(DIK_Q)
+ || m_pGameInstance->Mouse_Up(DIM_LBUTTON)
+ || m_pGameInstance->Key_Down(DIK_LSHIFT)
+ || m_pGameInstance->Key_Down(DIK_C)
+ || m_pGameInstance->Key_Down(DIK_V)
+ )
+ {
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
+HRESULT CPlayer::InputMove()
+{
+ if (m_pGameInstance->Key_Pressing(DIK_W)
+ || m_pGameInstance->Key_Pressing(DIK_A)
+ || m_pGameInstance->Key_Pressing(DIK_S)
+ || m_pGameInstance->Key_Pressing(DIK_D))
+ {
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
+HRESULT CPlayer::InputSpell()
+{
+ if (
+ m_pGameInstance->Key_Down(DIK_1)
+ || m_pGameInstance->Key_Down(DIK_2)
+ || m_pGameInstance->Key_Down(DIK_3)
+ || m_pGameInstance->Key_Down(DIK_4)
+ )
+ {
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
+void CPlayer::Behavior_IdleEnter() {
+ m_pFSM->Enable_State(FSMSTATE::IDLE);
+ pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
+
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::SPRINT)) {
+
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_STOP];
+ }
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) {
+ pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
+ }
+
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) {
+ pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
+ }
+ }
+ m_bSprintToggle = false;
+ m_bWalkToggle = false;
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_IdleExitCheck()
+{
+ // S_OK -> 현 상태 유지
+ // E_FAIL -> 현 상태 탈출
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) {
+ if (m_pGameInstance->Key_Down(DIK_SPACE)) {
+ m_pFSM->Change_State(FSMSTATE::JUMP);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_LCONTROL)) {
+ m_pFSM->Change_State(FSMSTATE::DODGE);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_R)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_Q)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (SUCCEEDED(InputSpell())) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_V)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+
+ return E_FAIL;
+ }
+ if (SUCCEEDED(InputMove())) {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
+
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ return S_OK;
+}
+
+void CPlayer::Behavior_IdleExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::IDLE);
+}
+
+void CPlayer::Behavior_MoveEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _bool bFoward = m_pGameInstance->Key_Pressing(DIK_W);
+ _bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
+ _bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
+ _bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
+ m_pFSM->Enable_State(FSMSTATE::MOVE);
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE)) {
+ if (true == m_bSprintToggle) {
+ m_pFSM->Enable_State(FSMSTATE::SPRINT);
+ m_bWalkToggle = false;
+ if (true == bFoward) {
+ pairAnimInfo = m_Animation[STATEANIM::SPRINT];
+ }
+ }
+ else if (true == m_bWalkToggle) {
+ m_pFSM->Enable_State(FSMSTATE::WALK);
+ m_bSprintToggle = false;
+ if (true == bFoward) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
+ }
+ else if (true == bBackward) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
+ }
+ }
+ else
+ {
+ m_pFSM->Enable_State(FSMSTATE::JOG);
+ m_bSprintToggle = false;
+ m_bWalkToggle = false;
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ }
+ }
+ else { // While Moving
+ if (true == m_bSprintToggle) {
+ m_pFSM->Enable_State(FSMSTATE::SPRINT);
+ m_bWalkToggle = false;
+ pairAnimInfo = m_Animation[STATEANIM::SPRINT];
+
+ }
+ else if (true == m_bWalkToggle) {
+ m_pFSM->Enable_State(FSMSTATE::WALK);
+ m_bSprintToggle = false;
+ if (true == bFoward) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
+ }
+ else if (true == bBackward) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
+ }
+ }
+ else {
+ m_pFSM->Enable_State(FSMSTATE::JOG);
+ m_bSprintToggle = false;
+ m_bWalkToggle = false;
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ }
+ }
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_MoveExitCheck()
+{
+ pair<_uint, _bool> pairAnimInfo;
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) {
+ if (m_pGameInstance->Key_Down(DIK_SPACE)) {
+ m_pFSM->Change_State(FSMSTATE::JUMP);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_LCONTROL)) {
+ m_pFSM->Change_State(FSMSTATE::DODGE);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_R)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_Q)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (SUCCEEDED(InputSpell())) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_V)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_LSHIFT)) {
+ m_bSprintToggle = !m_bSprintToggle;
+ m_bWalkToggle = false;
+ if (m_bSprintToggle)
+ {
+ m_pFSM->Enable_State(FSMSTATE::SPRINT);
+
+ pairAnimInfo = m_Animation[STATEANIM::SPRINT];
+ }
+ else
+ {
+ m_pFSM->Enable_State(FSMSTATE::JOG);
+ m_pFSM->Disable_State(FSMSTATE::SPRINT);
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_C)) {
+ m_bWalkToggle = !m_bWalkToggle;
+ m_bSprintToggle = false;
+ if (m_bWalkToggle)
+ {
+ m_pFSM->Enable_State(FSMSTATE::WALK);
+ pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
+ }
+ else
+ {
+ m_pFSM->Enable_State(FSMSTATE::JOG);
+ m_pFSM->Disable_State(FSMSTATE::WALK);
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ return E_FAIL;
+ }
+ if (SUCCEEDED(InputMove())) {
+ return S_OK;
+ }
+
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+
+ return E_FAIL;
+}
+
+void CPlayer::Behavior_MoveExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK);
+}
+
+void CPlayer::Behavior_JumpEnter()
+{
+ pair<_uint, _bool> pairAnimInfo;
+ m_pFSM->Enable_State(FSMSTATE::JUMP);
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::WALK | FSMSTATE::JOG | FSMSTATE::SPRINT)) {
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP);
+ }
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) {
+ pairAnimInfo = m_Animation[STATEANIM::JUMP_SPRINT];
+ }
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP);
+ }
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP_JOG);
+ }
+ }
+ else {
+ // Drop?
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_JumpExitCheck()
+{
+ if (IsCurrentKeyFrame("Jump")) {
+ m_pFSM->Change_State(FSMSTATE::LAND);
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CPlayer::Behavior_JumpExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::JUMP);
+}
+
+void CPlayer::Behavior_LandEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::LAND);
+ pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::LAND);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_LandExitCheck()
+{
+ if (m_pModelCom->IsFinishedAnim()) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ } // 혹시 Land to (Jog, Sprint, Dodge) 같은 애니메이션 있으면 여기에 분기 조건 넣으면 됨
+
+ if (SUCCEEDED(InputMove())) {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CPlayer::Behavior_LandExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::LAND);
+}
+
+void CPlayer::Behavior_DodgeEnter()
+{
+ // 혹시 @@ to Dodge 있으면 여기에
+ m_pFSM->Enable_State(FSMSTATE::DODGE);
+ pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::DODGE);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_DodgeExitCheck()
+{
+ if (m_pModelCom->IsFinishedAnim()) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CPlayer::Behavior_DodgeExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::DODGE);
+}
+
+void CPlayer::Behavior_CombatEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::COMBAT);
+
+ if (m_pGameInstance->Key_Down(DIK_R)) {
+ m_pFSM->Enable_State(FSMSTATE::SKILL);
+ pairAnimInfo = m_Animation[STATEANIM::SKILL];
+ }
+ else if (m_pGameInstance->Key_Down(DIK_Q)) {
+ m_pFSM->Enable_State(FSMSTATE::SKILL2);
+ pairAnimInfo = m_Animation[STATEANIM::SKILL2];
+ }
+ else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
+ m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK);
+ pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
+ }
+ else if (SUCCEEDED(InputSpell())) {
+ m_pFSM->Enable_State(FSMSTATE::SPELL);
+ if (m_eSpell != STATEANIM::END)
+ {
+ switch (m_eSpell)
+ {
+ case STATEANIM::DEPULSO:
+ pairAnimInfo = m_Animation[STATEANIM::DEPULSO];
+ m_eSpell = STATEANIM::END;
+ break;
+ case STATEANIM::DIFFINDO:
+ pairAnimInfo = m_Animation[STATEANIM::DIFFINDO];
+ m_eSpell = STATEANIM::END;
+ break;
+ case STATEANIM::DISILLUSION_ENTER:
+ pairAnimInfo = m_Animation[STATEANIM::DISILLUSION_ENTER];
+ m_eSpell = STATEANIM::END;
+ break;
+ case STATEANIM::DISILLUSION_EXIT:
+ pairAnimInfo = m_Animation[STATEANIM::DISILLUSION_EXIT];
+ m_eSpell = STATEANIM::END;
+ break;
+ default:
+ pairAnimInfo = m_Animation[STATEANIM::SPELL];
+ break;
+ }
+ }
+ else
+ pairAnimInfo = m_Animation[STATEANIM::SPELL];
+ }
+ else if (m_pGameInstance->Key_Down(DIK_V)) {
+ m_pFSM->Enable_State(FSMSTATE::MAPHELP);
+ pairAnimInfo = m_Animation[STATEANIM::MAPHELP];
+
+ }
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_CombatExitCheck()
+{
+ pair<_uint, _bool> pairAnimInfo;
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) {
+ if (m_pGameInstance->Key_Down(DIK_R))
+ {
+ m_pFSM->Enable_State(FSMSTATE::SKILL);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_Q))
+ {
+ m_pFSM->Enable_State(FSMSTATE::SKILL2);
+ pairAnimInfo = m_Animation[STATEANIM::SKILL2];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON))
+ {
+ m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK);
+ _uint iIndex = m_pModelCom->Get_AnimIndex();
+ if (m_Animation[STATEANIM::LIGHT_ATTACK].first <= iIndex && m_Animation[STATEANIM::LIGHT_ATTACK].first + 3 > iIndex) {
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
+ if (fRatio >= 0.1f) {
+ pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
+ pairAnimInfo.first = iIndex + 1;
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+ }
+ else if (SUCCEEDED(InputSpell()))
+ {
+ m_pFSM->Enable_State(FSMSTATE::SPELL);
+ _uint iIndex = m_pModelCom->Get_AnimIndex();
+ if (m_Animation[STATEANIM::SPELL].first <= iIndex && m_Animation[STATEANIM::SPELL].first + 3 > iIndex) {
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
+ if (fRatio >= 0.15f) {
+ pairAnimInfo = m_Animation[STATEANIM::SPELL];
+ pairAnimInfo.first = iIndex + 1;
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+ }
+ else if (m_pGameInstance->Key_Down(DIK_V))
+ {
+ m_pFSM->Enable_State(FSMSTATE::MAPHELP);
+ pairAnimInfo = m_Animation[STATEANIM::MAPHELP];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+
+ if (m_pFSM->IsEnable(FSMSTATE::SPELL) && IsCurrentKeyFrame("Combat"))
+ {
+ if (m_eSpell != STATEANIM::END)
+ {
+ switch (m_eSpell)
+ {
+ case STATEANIM::ACCIO:
+ pairAnimInfo = m_Animation[STATEANIM::ACCIO];
+ break;
+ case STATEANIM::DESCENDO:
+ pairAnimInfo = m_Animation[STATEANIM::DESCENDO];
+ break;
+ default:
+ break;
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_eSpell = STATEANIM::END;
+ return E_FAIL;
+ }
+ }
+
+ if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Combat")) {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
+
+ if (m_pModelCom->IsFinishedAnim()) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+
+ return E_FAIL;
+}
+
+void CPlayer::Behavior_CombatExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::LIGHT_ATTACK | FSMSTATE::SPELL | FSMSTATE::SKILL | FSMSTATE::SKILL2 | FSMSTATE::MAPHELP);
+}
+
+void CPlayer::Add_FSM()
+{
+#pragma region Behavior_Movement_NotFocus
+ {
+ CState_Idle::STATE_IDLE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
+ }
+ {
+ CState_Move::STATE_MOVE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }
+ if (m_pGameInstance->Key_Pressing(DIK_D)) { m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); };
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
+ }
+#pragma endregion
+#pragma region Behavior_Movement_Focus
+ {
+ CState_Jump::STATE_JUMP_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_JumpEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_JumpExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_JumpExit(); };
+ m_States.emplace(FSMSTATE::JUMP, CState_Jump::Create(&Desc));
+ }
+ {
+ CState_Land::STATE_LAND_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_LandEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_LandExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_LandExit(); };
+ m_States.emplace(FSMSTATE::LAND, CState_Land::Create(&Desc));
+ }
+ {
+ CState_Dodge::STATE_DODGE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_DodgeEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_DodgeExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }
+ if (m_pGameInstance->Key_Pressing(DIK_D)) { m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); };
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::DODGE, CState_Dodge::Create(&Desc));
+ }
+#pragma endregion
+#pragma region Behavior_Combat_NotFocus
+ {
+ CState_Combat::STATE_COMBAT_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_CombatEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_CombatExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_CombatExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::COMBAT, CState_Combat::Create(&Desc));
+ }
+#pragma endregion
+#pragma region Behavior_Combat_Focus
+
+#pragma endregion
+
+}
+
+void CPlayer::Set_Anim()
+{
+ m_Animation[STATEANIM::IDLE] = { 266,true };
+ m_Animation[STATEANIM::IDLE_TURN_L] = { 270,false };
+ m_Animation[STATEANIM::IDLE_TURN_R] = { 430,false };
+ m_Animation[STATEANIM::IDLE_TURN_BWD] = { 268,false };
+
+ m_Animation[STATEANIM::WALK_FWD] = { 625,true };
+ m_Animation[STATEANIM::WALK_BWD] = { 166,true };
+ m_Animation[STATEANIM::WALK_STOP] = { 344,false };
+
+ m_Animation[STATEANIM::JOG_FWD] = { 167,true };
+ m_Animation[STATEANIM::JOG_STOP] = { 289,false };
+
+ m_Animation[STATEANIM::JUMP] = { 205,false };
+ m_Animation[STATEANIM::JUMP_JOG] = { 203,false };
+ m_Animation[STATEANIM::JUMP_SPRINT] = { 207,false };
+
+ m_Animation[STATEANIM::SPRINT] = { 599,true };
+
+ m_Animation[STATEANIM::LAND] = { 259,false };
+
+ m_Animation[STATEANIM::DODGE] = { 802,false };
+
+ m_Animation[STATEANIM::SKILL] = { 593,false };
+ m_Animation[STATEANIM::SKILL2] = { 915,false };
+ m_Animation[STATEANIM::LIGHT_ATTACK] = { 413,false };
+ m_Animation[STATEANIM::SPELL] = { 696,false };
+ m_Animation[STATEANIM::MAPHELP] = { 122,false };
+ m_Animation[STATEANIM::ACCIO] = { 417,false };
+ m_Animation[STATEANIM::DESCENDO] = { 418,false };
+ m_Animation[STATEANIM::DEPULSO] = { 782,false };
+ m_Animation[STATEANIM::DIFFINDO] = { 786,false };
+ m_Animation[STATEANIM::LUMOS] = { 782,false };
+ m_Animation[STATEANIM::DISILLUSION_ENTER] = { 585,false };
+ m_Animation[STATEANIM::DISILLUSION_EXIT] = { 586,false };
+}
+#pragma endregion State
+
diff --git a/Jusin154_Team3D/Client/Private/SkyBox.cpp b/Jusin154_Team3D/Client/Private/SkyBox.cpp
index e575e3870..e59e8b727 100644
--- a/Jusin154_Team3D/Client/Private/SkyBox.cpp
+++ b/Jusin154_Team3D/Client/Private/SkyBox.cpp
@@ -39,7 +39,7 @@ void CSkyBox::Priority_Update(_float fTimeDelta)
void CSkyBox::Update(_float fTimeDelta)
{
- m_pTransformCom->Set_State(STATE::POSITION, m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_CAMERA)->Get_Object()->Get_WorldPostion());
+ m_pTransformCom->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition());
}
void CSkyBox::Late_Update(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Client/Private/State_Combat.cpp b/Jusin154_Team3D/Client/Private/State_Combat.cpp
index 35b611131..1e8e15653 100644
--- a/Jusin154_Team3D/Client/Private/State_Combat.cpp
+++ b/Jusin154_Team3D/Client/Private/State_Combat.cpp
@@ -15,9 +15,15 @@ void CState_Combat::Enter()
HRESULT CState_Combat::Update(_float fTimeDelta)
{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
if (E_FAIL == (__super::Update(fTimeDelta))) {
return E_FAIL;
}
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
return S_OK;
}
@@ -31,7 +37,8 @@ HRESULT CState_Combat::Initialize(STATE_COMBAT_DESC* pDesc)
if (FAILED(__super::Initialize(pDesc))) {
return E_FAIL;
}
- m_pOwner = pDesc->pOwner;
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
m_pModel = m_pOwner->Get_Component();
m_pFSM = m_pOwner->Get_Component();
diff --git a/Jusin154_Team3D/Client/Private/TrailObject.cpp b/Jusin154_Team3D/Client/Private/TrailObject.cpp
new file mode 100644
index 000000000..5565c2e68
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/TrailObject.cpp
@@ -0,0 +1,297 @@
+#include "pch.h"
+#include "TrailObject.h"
+
+#include "GameInstance.h"
+#include "Trail.h"
+
+
+CTrailObject::CTrailObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CPartObject{ pDevice, pContext }
+{
+}
+
+CTrailObject::CTrailObject(const CTrailObject& rhs)
+ : CPartObject(rhs)
+{
+}
+
+HRESULT CTrailObject::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CTrailObject::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+void CTrailObject::Priority_Update(_float fTimeDelta)
+{
+
+}
+
+void CTrailObject::Update(_float fTimeDelta)
+{
+ m_pTrailCom->Trail_Update(fTimeDelta, m_pParentTransformCom->Get_XMWorldMatrix());
+}
+
+void CTrailObject::Late_Update(_float fTimeDelta)
+{
+ if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
+ m_pGameInstance->Add_RenderGroup(RENDER::EFFECT, this);
+ }
+
+}
+
+HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel)
+{
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pMasking_TextureCom);
+ SAFE_RELEASE(m_pNoise_TextureCom);
+
+ _string strPerfectFilePath = pPath;
+
+ strPerfectFilePath += ".bin";
+
+ DWORD dwByte(0);
+
+ HANDLE hFile = CreateFileW(
+ CMyTools::ToWstring(strPerfectFilePath).c_str(), // 파일 이름
+ GENERIC_READ, // 읽기 모드
+ FILE_SHARE_READ, // 다른 프로세스도 읽기 가능
+ NULL,
+ OPEN_EXISTING, // 기존 파일 열기
+ FILE_ATTRIBUTE_NORMAL,
+ NULL
+ );
+
+ m_strPath = strPerfectFilePath;
+
+ if (hFile == INVALID_HANDLE_VALUE) {
+ MessageBox(NULL, L"오브젝트 읽기 실패", L"System Message", MB_OK);
+ return E_FAIL;
+ }
+
+
+ if (!ReadFile(hFile, &m_eEffectType, sizeof(EFFECT_TYPE), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ size_t iComponentLength = {};
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ m_strTrailDiffuseName = szName;
+
+ m_isDiffuse = true;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailDiffuseName),
+ reinterpret_cast(&m_pDiffuse_TextureCom))))
+ return E_FAIL;
+
+
+ }
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ m_strTrailNoiseName = szName;
+
+ m_isNoise = true;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailNoiseName),
+ reinterpret_cast(&m_pNoise_TextureCom))))
+ return E_FAIL;
+
+ }
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ m_strTrailMaskingName = szName;
+
+ m_isMask = true;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailMaskingName),
+ reinterpret_cast(&m_pMasking_TextureCom))))
+ return E_FAIL;
+ }
+
+ m_pTrailCom->Load_Trail(hFile);
+
+ CloseHandle(hFile);
+
+
+ MessageBox(NULL, L"트레일 로드 성공", L"System Message", MB_OK);
+
+ return S_OK;
+}
+
+HRESULT CTrailObject::Ready_Components(void* pArg)
+{
+
+ if (FAILED(__super::Ready_Components(nullptr))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_POSTEX, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ CTrail::TRAIL_DESC pTrailDesc;
+
+ pTrailDesc.vHigh = _float3(0.f, 1.f, 0.f);
+ pTrailDesc.vLow = _float3(0.f, -1.f, 0.f);
+
+ if (FAILED(Add_Component(ENUM_CLASS(LEVEL::STATIC), &m_pTrailCom, &pTrailDesc))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CTrailObject::Render()
+{
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL))))
+ return E_FAIL;
+
+ if (FAILED(Bind_ShaderResources()))
+ return E_FAIL;
+
+ if (FAILED(m_pTrailCom->Render()))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+
+
+
+CTrailObject* CTrailObject::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CTrailObject* pInstance = new CTrailObject(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CTrailObject");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CTrailObject::Clone(void* pArg, CGameObject* pOwner)
+{
+ CTrailObject* pInstance = new CTrailObject(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CTrailObject");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CTrailObject::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pMasking_TextureCom);
+ SAFE_RELEASE(m_pNoise_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pTrailCom);
+}
+
+void CTrailObject::Describe_Entity()
+{
+}
+
+HRESULT CTrailObject::Bind_ShaderResources()
+{
+
+ if (FAILED(m_pTrailCom->Bind_Resources()))
+ return E_FAIL;
+
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
+ 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_isDiffuse", &m_isDiffuse, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isMask", &m_isMask, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoise", &m_isNoise, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+ if (m_pDiffuse_TextureCom != nullptr)
+ {
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_DiffuseTexture", 0))) {
+ return E_FAIL;
+ }
+ }
+
+ if (m_pNoise_TextureCom != nullptr)
+ {
+ if (FAILED(m_pNoise_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_NoiseTexture", 0))) {
+ return E_FAIL;
+ }
+ }
+
+ if (m_pMasking_TextureCom != nullptr)
+ {
+ if (FAILED(m_pMasking_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_MaskingTexture", 0))) {
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
+}
diff --git a/Jusin154_Team3D/Client/Public/Bombard.h b/Jusin154_Team3D/Client/Public/Bombard.h
new file mode 100644
index 000000000..c53c892e3
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Bombard.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CBombard final : public CEffect_Container
+{
+private:
+ CBombard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CBombard(const CBombard& rhs);
+ virtual ~CBombard() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+ class CPhysXEffectHitBox* m_pPhysHitBox = {};
+ class CPartObject* m_pLight_Projectile = {};
+public:
+ static CBombard* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h b/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h
index 0ce2d5088..26b2a247d 100644
--- a/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h
+++ b/Jusin154_Team3D/Client/Public/CamPosition_Shoulder.h
@@ -43,8 +43,16 @@ class CCamPosition_Shoulder final : public CCamPosition
_float2 m_vAccDegreeXY = {};
_float3 m_vShoulderPosRatio = { 1.f, 2.f, -1.f };
+ _float3 m_vShoulderStartRatio = { 1.f, 2.f, -1.f };
+ _float3 m_vShoulderOtherRatio = { 1.f, 2.f, -1.f };
+
+ _bool m_bLerp = { false };
+ _float2 m_vLerpTimer = { 0.f, 1.f };
+
+
CCamPosition_Target* m_pTarget_LookPart = { nullptr };
CCamPosition_Target* m_pTarget_FollowPart = { nullptr };
+ class CCamera_Gaze* m_pBinded_Camera = { nullptr };
public:
static CCamPosition_Shoulder* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Client/Public/Camera_Debug.h b/Jusin154_Team3D/Client/Public/Camera_Debug.h
index 0662b8e1e..ca7cb5070 100644
--- a/Jusin154_Team3D/Client/Public/Camera_Debug.h
+++ b/Jusin154_Team3D/Client/Public/Camera_Debug.h
@@ -13,7 +13,6 @@ class CCamera_Debug final : public CCamera
_float3 vEye{}, vAt{};
_float fMouseSensor{};
}CAMERA_DEBUG_DESC;
-
private:
CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CCamera_Debug(const CCamera_Debug& rhs);
@@ -39,7 +38,7 @@ class CCamera_Debug final : public CCamera
public:
static CCamera_Debug* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CCamera_Debug* Clone(void* pArg, CGameObject* pOwner) override;
+ virtual CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
diff --git a/Jusin154_Team3D/Client/Public/Camera_Gaze.h b/Jusin154_Team3D/Client/Public/Camera_Gaze.h
index ee3c3f931..7b7d26a2f 100644
--- a/Jusin154_Team3D/Client/Public/Camera_Gaze.h
+++ b/Jusin154_Team3D/Client/Public/Camera_Gaze.h
@@ -10,9 +10,6 @@ class CCamera_Gaze final : public CCamera
public:
typedef struct tagCamera_Gaze : public CCamera::CAMERA_DESC
{
- _bool bTransitionLerp = { false };
- _bool bLookLerp = { false };
- _bool bFollowLerp = { false };
}CAMERA_GAZE_DESC;
private:
CCamera_Gaze(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -22,6 +19,10 @@ class CCamera_Gaze final : public CCamera
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
+ void Update_LerpTimer(Engine::_float fTimeDelta);
+ void Enable_FollowLerp();
+ void Enable_LookLerp();
+ void Toggle_Priority();
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
diff --git a/Jusin154_Team3D/Client/Public/Client_Macro.h b/Jusin154_Team3D/Client/Public/Client_Macro.h
index 074c0d74d..3d6fa32ba 100644
--- a/Jusin154_Team3D/Client/Public/Client_Macro.h
+++ b/Jusin154_Team3D/Client/Public/Client_Macro.h
@@ -29,6 +29,7 @@ namespace Client {
#pragma region OBJECT
#define CAMERA_DEBUG TEXT("CAMERA_DEBUG")
+#define CAMERA_SHOULDER TEXT("CAMERA_SHOULDER")
#pragma endregion
#pragma region COMPONENT
@@ -38,6 +39,7 @@ namespace Client {
#define LAYER_FLOOR TEXT("Layer_Floor")
#define LAYER_WALL TEXT("Layer_Wall")
#define LAYER_CUBE TEXT("Layer_Cube")
+#define LAYER_SKYBOX TEXT("Layer_SkyBox")
#define LAYER_EDITOR_CAMERA TEXT("Layer_Editor_Camera")
#define LAYER_BACKGROUND TEXT("Layer_BackGround")
#define LAYER_MARKER TEXT("Layer_Marker")
diff --git a/Jusin154_Team3D/Client/Public/EffectObject.h b/Jusin154_Team3D/Client/Public/EffectObject.h
new file mode 100644
index 000000000..1ff1ea0c2
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/EffectObject.h
@@ -0,0 +1,136 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "PartObject.h"
+
+NS_BEGIN(Engine)
+class CInstance_Model;
+class CShader;
+class CTexture;
+class CLight;
+class CTrail;
+NS_END
+
+NS_BEGIN(Client)
+
+class CEffectObject abstract : public CPartObject
+{
+public:
+ typedef struct tagEffectInfo
+ {
+ _float4 vColor = { 0.f ,0.f ,0.f ,1.f };
+
+ _float2 vDiffuseUVGainAmount = {};
+ _float2 vMaskingUVGainAmount = {};
+ _float2 vNoiseUVGainAmount = {};
+
+ _float2 vDiffuseDistortionUVGainAmount = {};
+ _float2 vMaskDistortionUVGainAmount = {};
+
+ _float2 vUVCutting = { 1.f ,1.f };
+ _float2 vUVMaskCutting = { 1.f ,1.f };
+
+ _int iMaskMoveLerpOption = { 0 };
+ _int iDiffuseMoveLerpOption = { 0 };
+ _int iNoiseMoveLerpOption = { 0 };
+
+ _int iMaskDistortionMoveLerpOption = { 0 };
+ _int iDiffuseDistortionMoveLerpOption = { 0 };
+
+ _int iBlurWeight = { 0 };
+
+
+ _bool isDiffuse = {};
+ _bool isMasking = {};
+ _bool isDissolve = {};
+ _bool isNoise = {};
+ _bool isEmissive = {};
+ _bool isDistortion = {};
+ _bool isDiffuseUVMove = {};
+ _bool isNoiseUVMove = {};
+ _bool isMaskUVMove = {};
+ _bool isBlur = {};
+ _bool isBillboard = {};
+
+
+ _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f };
+ _float fDiffuseAlpha = { 1.f };
+ _float fBlurIntensity = {};
+ _float fNoiseDistortionIntensity = {};
+ _float fEmissiveStrength = { 0.f };
+
+ LIGHT_DESC LightDesc = {};
+ RENDER eRenderOrder = { RENDER::EFFECT };
+
+ _bool isReverseDissolve = {};
+
+ EFFECT_TYPE eEffectType = { EFFECT_TYPE::EFFECT };
+
+ _bool isEmissiveDissolve = { false };
+
+ _bool isMaskClampSample = { false };
+ _bool isNoiseColor = { false };
+ _bool isNoiseAlpha = { false };
+ _bool isNomalDissolve = {};
+
+ _float fSoftenExp = { 1.31429f };
+ _float fSoftStrength = {};
+ _float fCoreBoost = {};
+ _float fRadius = {};
+
+ _float fSoftMaskEdge = {};
+ _float fSoftMask = {};
+
+
+ }EFFECT_INFO;
+
+
+protected:
+ CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEffectObject(const CEffectObject& rhs);
+ virtual ~CEffectObject() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual HRESULT Render_Blur() override;
+public:
+ HRESULT Load(const _char* pFilePath, LEVEL eLevel);
+
+protected:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+protected:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pNoise_TextureCom = { nullptr };
+ CTexture* m_pMasking_TextureCom = { nullptr };
+ CTexture* m_pDissolve_TextureCom = { nullptr };
+ CTexture* m_pEmissive_TextureCom = { nullptr };
+ CTexture* m_pDistortion_TextureCom = { nullptr };
+
+ CShader* m_pShaderCom = { nullptr };
+ CLight* m_pLightCom = { nullptr };
+
+ CInstance_Model* m_pInstance_ModelCom = { nullptr };
+
+
+protected:
+ EFFECT_INFO m_EffectInfo = {};
+ _string m_strDiffuseName = {};
+ _string m_strNoiseName = {};
+ _string m_strMaskingName = {};
+ _string m_strDissolveName = {};
+ _string m_strModelName = {};
+ _string m_strEmissiveName = {};
+ _string m_strDistortionName = {};
+
+public:
+ virtual void Free() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/EffectParts.h b/Jusin154_Team3D/Client/Public/EffectParts.h
new file mode 100644
index 000000000..6517ab292
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/EffectParts.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "EffectObject.h"
+
+NS_BEGIN(Engine)
+class CModel;
+class CShader;
+NS_END
+
+NS_BEGIN(Client)
+
+class CEffectParts final : public CEffectObject
+{
+private:
+ CEffectParts(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEffectParts(const CEffectParts& rhs);
+ virtual ~CEffectParts() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+
+public:
+ static CEffectParts* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Effect_Container.h b/Jusin154_Team3D/Client/Public/Effect_Container.h
new file mode 100644
index 000000000..e0e067265
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Effect_Container.h
@@ -0,0 +1,51 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "ContainerObject.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CEffect_Container abstract : public CContainerObject
+{
+protected:
+ CEffect_Container(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CEffect_Container(const CEffect_Container& rhs);
+ virtual ~CEffect_Container() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+public:
+ HRESULT Load_Directory(const _char* pPath);
+protected:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+
+ void Update_Event(_float fTimeDelta);
+
+protected:
+ _wstring m_wstrEffectName = {};
+
+ _bool m_isLoop = {};
+
+ _float m_fAccTime = {};
+ _float m_fPreAccTime = {};
+ _float m_fDuration = {};
+ _float m_fDelay = {};
+ _bool m_isDelayed = { false };
+
+ map<_float, function> m_Events = {};
+
+public:
+ virtual void Free() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Level_GamePlay.h b/Jusin154_Team3D/Client/Public/Level_GamePlay.h
index 3c2f124c7..fd70267a6 100644
--- a/Jusin154_Team3D/Client/Public/Level_GamePlay.h
+++ b/Jusin154_Team3D/Client/Public/Level_GamePlay.h
@@ -27,7 +27,6 @@ class CLevel_GamePlay final : public CLevel
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
HRESULT Ready_Layer_Camera();
HRESULT Ready_Layer_Sound();
- HRESULT Ready_Layer_Effect(const _wstring& strLayerTag);
HRESULT Ready_Layer_Player(const _wstring& strLayerTag);
HRESULT Ready_Layer_SkyBox(const _wstring& strLayerTag);
diff --git a/Jusin154_Team3D/Client/Public/Loader.h b/Jusin154_Team3D/Client/Public/Loader.h
index fe9223f44..3534ff9c8 100644
--- a/Jusin154_Team3D/Client/Public/Loader.h
+++ b/Jusin154_Team3D/Client/Public/Loader.h
@@ -36,7 +36,8 @@ class CLoader final : public CBase
HRESULT Loading_For_GamePlay();
HRESULT Loading_For_Field();
HRESULT Loading_For_Restart();
-
+private:
+ HRESULT Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function AddPrototypeEvent);
public:
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
virtual void Free() override;
diff --git a/Jusin154_Team3D/Client/Public/NomalJap.h b/Jusin154_Team3D/Client/Public/NomalJap.h
new file mode 100644
index 000000000..3c99a2848
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/NomalJap.h
@@ -0,0 +1,41 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CNomalJap final : public CEffect_Container
+{
+private:
+ CNomalJap(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CNomalJap(const CNomalJap& rhs);
+ virtual ~CNomalJap() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+ class CPhysXEffectHitBox* m_pPhysHitBox = {};
+public:
+ static CNomalJap* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/PhysXEffectHitBox.h b/Jusin154_Team3D/Client/Public/PhysXEffectHitBox.h
new file mode 100644
index 000000000..5c5f0d4de
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/PhysXEffectHitBox.h
@@ -0,0 +1,61 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "GameObject.h"
+#include "CallBack_EffectHitBox_Behavior.h"
+#include "CallBack_EffectHitBox_HitReport.h"
+
+NS_BEGIN(Engine)
+class CModel;
+class CShader;
+class CRigidBody;
+NS_END
+
+NS_BEGIN(Client)
+
+class CPhysXEffectHitBox final : public CGameObject
+{
+public:
+ typedef struct tagPhysXDummyDesc
+ {
+ _float3 vPos = {};
+ _float3 vRotRPY = {};
+ _uint iSubKind = {};
+ _float3 vDeltaPos = {};
+ _float2 vLifeTime = {};
+ }PHYSXDUMMY_DESC;
+private:
+ CPhysXEffectHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CPhysXEffectHitBox(const CPhysXEffectHitBox& rhs);
+ virtual ~CPhysXEffectHitBox() = 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:
+ CCharacter_Controller* m_pCharacter_Controller = { nullptr };
+ CModel* m_pModelCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CCallBack_EffectHitBox_Behavior* m_pCallBack_Behavior = { nullptr };
+ CCallBack_EffectHitBox_HitReport* m_pCallBack_HitReport = { nullptr };
+ _float3 m_vDeltaPos = {};
+ _float2 m_vLifeTime = { };
+
+
+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 CPhysXEffectHitBox* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h
index 497fe5c7b..b39d1ed33 100644
--- a/Jusin154_Team3D/Client/Public/Player.h
+++ b/Jusin154_Team3D/Client/Public/Player.h
@@ -7,21 +7,12 @@ NS_BEGIN(Client)
class CPlayer final : public CUnit
{
-public:
- struct InputCondition
- {
- FSMSTATE::ESTATE state;
- function<_bool()> checker;
- };
-
private:
CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CPlayer(const CPlayer& Prototype);
virtual ~CPlayer() = 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;
@@ -33,10 +24,10 @@ class CPlayer final : public CUnit
size_t m_iStateMask = { 0 };
_float m_fDirectionRadian = 0.f;
- vector m_InputConditions;
_bool m_bSprintToggle = { false };
_bool m_bWalkToggle = { false };
+
class CCamPosition_Socket* m_pCamPosition_TopDown_LookPart = { nullptr };
class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr };
class CCamPosition_Shoulder* m_pCamPosition_ShoulderPart = { nullptr };
@@ -46,6 +37,8 @@ class CPlayer final : public CUnit
class CCallBack_Playable_Behavior* m_pCallBack_Behavior = { nullptr };
class CCallBack_Playable_HitReport* m_pCallBack_HitReport = { nullptr };
private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
HRESULT Ready_Components();
HRESULT Ready_Parts();
HRESULT Bind_ShaderResources();
@@ -57,15 +50,21 @@ class CPlayer final : public CUnit
virtual void Describe_Entity() override;
#pragma region STATE
+
+public:
+ virtual void Reset_Sprint() { m_bSprintToggle = false; }
+ virtual void Reset_Walk() { m_bWalkToggle = false; }
+
private:
+ void TestKeyInput(_float fTimeDelta);
virtual void Add_FSM();
virtual void Set_Anim();
- _bool IsSprint();
- _bool IsWalk();
- HRESULT InputSystem();
- HRESULT InputSkill();
+ HRESULT InputAction();
HRESULT InputMove();
+ HRESULT InputSpell();
+
+ STATEANIM::ESTATE m_eSpell = { STATEANIM::END };
void Behavior_IdleEnter();
HRESULT Behavior_IdleExitCheck();
@@ -87,17 +86,11 @@ class CPlayer final : public CUnit
HRESULT Behavior_DodgeExitCheck();
void Behavior_DodgeExit();
-
-public:
- virtual void Reset_Sprint() { m_bSprintToggle = false; }
- virtual void Reset_Walk() { m_bWalkToggle = false; }
-
+ void Behavior_CombatEnter();
+ HRESULT Behavior_CombatExitCheck();
+ void Behavior_CombatExit();
#pragma endregion
-
-
-
-
};
NS_END
diff --git a/Jusin154_Team3D/Client/Public/State_Combat.h b/Jusin154_Team3D/Client/Public/State_Combat.h
index df71f9f51..edb8d29fc 100644
--- a/Jusin154_Team3D/Client/Public/State_Combat.h
+++ b/Jusin154_Team3D/Client/Public/State_Combat.h
@@ -8,7 +8,8 @@ class CState_Combat final : public CState_Root
{
public:
typedef struct tagCombat : public CState_Root::STATE_ROOT_DESC {
-
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
}STATE_COMBAT_DESC;
private:
CState_Combat();
@@ -19,6 +20,10 @@ class CState_Combat final : public CState_Root
virtual HRESULT Update(_float fTimeDelta);
virtual void Exit();
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
private:
HRESULT Initialize(STATE_COMBAT_DESC* pDesc);
diff --git a/Jusin154_Team3D/Client/Public/TrailObject.h b/Jusin154_Team3D/Client/Public/TrailObject.h
new file mode 100644
index 000000000..988ef6ea8
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/TrailObject.h
@@ -0,0 +1,63 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "EffectObject.h"
+
+NS_BEGIN(Engine)
+class CShader;
+class CTexture;
+class CTrail;
+NS_END
+
+NS_BEGIN(Client)
+
+class CTrailObject final : public CPartObject
+{
+private:
+ CTrailObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CTrailObject(const CTrailObject& rhs);
+ virtual ~CTrailObject() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+public:
+ HRESULT Load_Trail(const _char* pPath, LEVEL eLevel);
+private:
+ HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Render() override;
+
+public:
+ static CTrailObject* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pNoise_TextureCom = { nullptr };
+ CTexture* m_pMasking_TextureCom = { nullptr };
+
+ CShader* m_pShaderCom = { nullptr };
+ CTrail* m_pTrailCom = { nullptr };
+
+ _string m_strTrailDiffuseName = {};
+ _string m_strTrailNoiseName = {};
+ _string m_strTrailMaskingName = {};
+
+ _string m_strPath = {};
+ _string m_strName = {};
+
+ _bool m_isDiffuse = {};
+ _bool m_isNoise = {};
+ _bool m_isMask = {};
+
+ EFFECT_TYPE m_eEffectType = { EFFECT_TYPE::TRAIL };
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Circle_S.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Circle_S.bin
new file mode 100644
index 000000000..dd9540349
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Circle_S.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4d134c8cb1ad572871031b8731afc595a46080ae2c10bb888aa1adda962c7b7c
+size 811
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin
index 8905548cc..ac6aa58f4 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:0bddaec7c43953cf48b607de04044f826d0b938d3a8febd4c3412e60cdc219d3
-size 754
+oid sha256:4919e0e868585d27f3175e2b1ae95f1bc2cf34e9114231e19a54469ef6fa0ca6
+size 762
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin
index 68c274b11..9d42652d4 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:6527034abc9bec6aeb549613fe9005b652e5dc454b968fa814663439c2dc5cea
-size 707
+oid sha256:4da051ec4d8760ce5cdb5eeb1b62d35d2cb732a84427c73c88b48edabaaf5820
+size 715
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin
new file mode 100644
index 000000000..7c65c882d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:593da97d845239af6f8c60bd6fe6188564ca834291cba69623ba9aa789a22858
+size 807
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin
new file mode 100644
index 000000000..b19f1f2a2
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:98c1aabafa6c9c8397a94e56e80159251eda4d449b40ed612a17b7c76f9b9ed8
+size 764
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin
new file mode 100644
index 000000000..ae3113402
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:43cf5bf0f9692bfca0f9dc049ad9290a60da09058403001a81767c6aca8cec3b
+size 758
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin
new file mode 100644
index 000000000..ce0af12bf
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c4be9d23c9e5746dfe3be5ab71dbf8fc62ac187ebc75f2ae284678defa2f54a4
+size 762
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin
new file mode 100644
index 000000000..61a654e8b
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:40d47864f42963f9aba8af3ee094187a08a53475ba09e014ee473b89cd315732
+size 766
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin
new file mode 100644
index 000000000..088719d88
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bb5a86b4dd6de00f3cbce4e6ec95e9b030a6907d596e33a1d9e176e3fab68d1a
+size 758
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin
new file mode 100644
index 000000000..ee6bb4fa9
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:379f94d9deec6c0a0376c82208c27fdd2ce7d70a18f92150186b886324ce4b1c
+size 758
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin
new file mode 100644
index 000000000..06d3c7681
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1677b131af3603894b1382c1238bc86c9531d8c98b4df95bbf8030084e91ea40
+size 863
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Pt.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Pt.bin
new file mode 100644
index 000000000..65f32c568
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Shoot_Pt.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4f5cae6be738dfbed366df4b2feab895ea73cf7c0b38fcd0949e3307b61cba2b
+size 754
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin
new file mode 100644
index 000000000..be380dad1
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:be68ab7cbb5c751eb4df1cf178ac391f86f61175bc1203f1e9aa67acb4a7701c
+size 713
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Circle0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Circle0.bin
deleted file mode 100644
index df3d71cf2..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Circle0.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:00d283741ea12a585fbea22dce225faccd6387d835dcead66b2f5e3396ac5ef0
-size 807
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Circle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Circle1.bin
deleted file mode 100644
index fe8911802..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Circle1.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6be7b1f059c23cc86d6492b9adc0e23a486c914523114bef806c6740e0439ab8
-size 756
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Explosion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Explosion.bin
deleted file mode 100644
index 926ec86a8..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Explosion.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a805244677b5601cd024802b35b456a379c931285b6b4056231ebc1fcb511b40
-size 750
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_0.bin
deleted file mode 100644
index 508558701..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_0.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2a13f34f5fa1739da81aaa652d0aa0528c552b45739fd7a1688a3a677c26af3f
-size 707
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_1.bin
deleted file mode 100644
index eb63deff2..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_1.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8341c87c732cb69671bc7bcbc4e8d0d4173c8ab2115967144626e8b92f1650e1
-size 707
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_2.bin
deleted file mode 100644
index b5bfbbb96..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_2.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:79b814bffb0445f8cbddddcd299673df2c15bf469175a1e47f953a711dbf5142
-size 707
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_3.bin
deleted file mode 100644
index e7117e0b0..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_PT_3.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:45b640a0bbb2ea7b5b63fc88d9995c916897f102446c28b06f534348bd1ca80f
-size 707
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Projectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Projectile.bin
deleted file mode 100644
index 1dc1e4f83..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Projectile.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d6a2393e330944b0ee49c639fe99ea6164989ceccc597e48e84551b1d64375d8
-size 788
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Smoke.bin
deleted file mode 100644
index be3c2b23e..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard_Smoke.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:65218dbabefd07543025bba00c4bee0617bee83b98de57c9844547781372bf19
-size 705
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapImpact.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapImpact.bin
index 759f7f1d3..e75f4ffde 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapImpact.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapImpact.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a6b892cfdd0a8aef117fb7a4afc7089653666870c2e1d23c520824963387f5bd
-size 807
+oid sha256:32e55b25ea8269a7a4fc33173977213d7fc0adef4e0e7438d4944bb2c259ca38
+size 815
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapLight.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapLight.bin
index 6e3ead7ee..8f2a7b7d5 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapLight.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapLight.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3213bb3a0a08e1d868afc52ec304493e5111271f7661c8db56ce9eb641cde6c4
-size 752
+oid sha256:02d0b970957db4b839f69a8b31ed9372ab3e3ec59c266d47e0795aa89ec4b462
+size 760
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapParticle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapParticle1.bin
index 458c4302c..433e13866 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapParticle1.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapParticle1.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:90dc0962c1416a37debe58bc5b44d8697872f7e9a01fe4585565354517595f3f
-size 700
+oid sha256:25e6939fd9ea31c481cc986c29c39b777adf39a26accbda51083571243bbcca6
+size 708
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin
index 87689f225..b57256294 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f5839f16366a626c1e4b91b7e49c71e28e0aad4cfdf649a2e54329aa0413f087
-size 790
+oid sha256:125761b44eb1740cbd69cf816ba9842655f3beb45ab478d240286711f85c5d5e
+size 798
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile2.bin
index 55326b2b2..4544d45d5 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile2.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapProjectile2.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b7f3086b12947b00771ddb624c4e89b20cec830c1ddb9eafa1e74de28a5058d0
-size 747
+oid sha256:d39015be44876db680d6b0e1884c4e68560653c39ec690c5b8f44428e887305f
+size 755
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin
index df6a48467..09f300105 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e447fb46c0fe49c8acc0061ee4b8cf68bdb59c63ee314c9b02a37d5309ac0406
-size 743
+oid sha256:91ce8fb795d36a82c8223f56c8e612fd684a52217337fe2aae2778087e48f925
+size 751
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin
index 2fe8b6abc..dad2a6d5b 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a6c04308bbd7dfa71570413576d4f66de96fb6269307201396c9794923c68fb2
-size 753
+oid sha256:cc62cee26718e7c20b11b610a5607b0f6316172e086c4ac3f58611922cdb8321
+size 761
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin
index 16f0fd880..b7e3b92cc 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:cfea59a237f53e73b02cb6623ab2cd0120f1f586aee6921f4bc570086fc065ef
-size 698
+oid sha256:d49ec12307cb4d9073e9030fc60e99714605ee22274cef75f29d2e25f1e88832
+size 706
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin
index c271186f7..db020210a 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:bf9deea4ae9b01a688785bedf0d08a1179a32af2f0ceaa7020cf7b71749b85e5
-size 755
+oid sha256:cb14da6c40cd2e3296a9c7bd245cd9a27b18334a0484c2730492a0f287c71a18
+size 763
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Bombard.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Bombard.bin
index 34de99318..14775195c 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Bombard.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Bombard.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:ea5f0901fe1f61804ff823cc87eca481d0c8572ef56dc3d0e33fa53316b3245d
-size 236
+oid sha256:f6e731b6987906f2448658f99848e20631838757b20c6950a643f81136b47690
+size 502
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin
index 6fe41b744..b28813ac9 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:bb36372372bf2af8134a67602cbfcb12d59453bd9de39d84dd5f6ca28e14e684
-size 178
+oid sha256:79e33167c83a310664da5a9b9e606fc0ad4a8b1842ae20549aadf92690a7b70d
+size 352
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap2.bin
index 4bf1f68b3..905d91a18 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap2.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap2.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:6091a75b6a0306f07a76699af2d033104315ec52205cdfdd3f633cd9a36ea77d
-size 174
+oid sha256:1b6d8cd29ebd1ffea4e26cdbb65b8a67715def4288899a0e1e4ca20c179fe436
+size 352
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap3.bin
index 20aafc905..6cde20e1d 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap3.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Jap3.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:58315360932a699e60721381028c74c9e28f29dd38e8ceaf0c501ee056d7bf0c
-size 228
+oid sha256:9b1efe4c752d8a215f19adc218baba9872d7687684f56b0059ac14af146504f3
+size 352
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Light.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Light.bin
index df0e49ab1..f1e2e3409 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Light.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Light.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e3610476d496d331ec27dd61739b2928f352629b4d904dcb1b79242dc8924f3a
-size 201
+oid sha256:84d17ab11d560e988be1ad90a370d344435218dd79e33e6de5abcae334c98a3e
+size 352
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Smoke1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Smoke1.bin
deleted file mode 100644
index cdf2e890b..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Smoke1.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:15e844a209069d289f4e267e6045fa6887257681163d5b146c97be76fa062db8
-size 752
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin
index 38bf119a0..bcdcc68c7 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:efe9a30cc81959dd7133ce0bb6276ac5b92eb16e2f1e154832623b9bd5965b90
-size 747
+oid sha256:2a0e85af914bd239835cf11ddf9d5cc7e9a5eb8e10b3ca58d35671a80c17ef20
+size 755
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin
deleted file mode 100644
index 668d54bb0..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:92d5aa0adaad0ee75c2344d15eed70744786932153fb53f219efd2835764d29e
-size 746
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin
deleted file mode 100644
index 7d64ccea8..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9d4184e9553e467b77c5466e0cedd9f00168ffed4aea52c07053aa9a7ed03096
-size 699
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Circle0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Circle0.bin
index 7c5ef33f2..a755382ec 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Circle0.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Circle0.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d5706ffe31f04c0bee3e089e4f239a76fb67bd1237fb22ba8cd01a6fc7e9d17e
-size 799
+oid sha256:367f943b40ade0726986aa1bf3c0d67b29b535681ae6d6d10a7a6ef74bfb6b4f
+size 807
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Circle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Circle1.bin
new file mode 100644
index 000000000..d1e526981
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Circle1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c4926f2fc8de0565aeffcc27f993b21770f59435302231d1305e35f73a94e5b
+size 764
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Explosion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Explosion.bin
index 3774f7ca0..a84bc4fcb 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Explosion.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Explosion.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:2893656232894ac1cc91992b9c97bbba75fcb21e69bc5de935141bc147df9b4e
-size 742
+oid sha256:58e65c18ffa77da07af960c7c2206cc3b52c4c76862728263e68d4e802704961
+size 758
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_0.bin
index a9904eb23..e184a87a0 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_0.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_0.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e01d1835e23745c543e00f24fd199d7d89732682bcdddbb23c1ed221bd5bb9eb
-size 699
+oid sha256:1df4432e91ffc3bf002e0df74d9452abc3c15a72d99889f8945b9bc37d333908
+size 762
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_1.bin
index c01996bd6..04f1b87a8 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_1.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_1.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:8336e77446690682b872e84a9b60cdcea71bbd75b808e8d31c1b02483b561d01
-size 699
+oid sha256:965f49909fafbff69f2c8051229d6017d421e3a122bd0507dbf4d3c1235df6c5
+size 766
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_2.bin
index 34596452d..564ee46e5 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_2.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_2.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4e81d31a047678292fe9d68aabd4cb75590a1816003a8f4cc29d85b6c3ec31a3
-size 699
+oid sha256:74aeb2cb30380db5a9f884b19cdba229ab5621c761d516c92c27c31f274163e5
+size 758
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_3.bin
index 5a0b6a7f3..3926dbdee 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_3.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_PT_3.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:76950f5acde485735c077385f894e217dcfc30dc97d7a21711f2ee149f49b2d3
-size 699
+oid sha256:ef29c7294e103dc613454ed272b1db897b0a1de1bfa03ff8dfb63bef0456461c
+size 758
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Projectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Projectile.bin
index cca1aabe7..b65e3d130 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Projectile.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Projectile.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d41b91c21d40d0c747bf7d7ced3bb1db8a4c6b6fc31893ee7111122170bc40ff
-size 780
+oid sha256:20f6073f983564c9b03ce321adbd375080f4060b9514d2b4f32960bbe7f7d907
+size 863
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Shoot_Pt.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Shoot_Pt.bin
new file mode 100644
index 000000000..a1223fd57
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Shoot_Pt.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b2875c3a6331f86254d7fb8029a33fd68748d1375c445b98fc30912206ffa210
+size 754
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Smoke.bin
index 1c843fca0..064799431 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Smoke.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Bombard_Smoke.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a00327d0f76135b565c06bbf73f38d8afc7b7469b9cf1e66dd3e3f05411f9a6e
-size 697
+oid sha256:413a07275ca91d24fab10ab675a21f34958019fc747a01b363c45619636e1629
+size 713
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapImpact.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapImpact.bin
deleted file mode 100644
index 56796e513..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapImpact.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e7736584a24f1972257417aebda878d3464f37f0da0f27dad48cabd21ff6eca8
-size 799
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapLight.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapLight.bin
deleted file mode 100644
index dc1165384..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapLight.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:40fd0d79f844262822104ed5e604e072258f29ce6f2be142198273d40d23aecf
-size 744
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapParticle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapParticle1.bin
deleted file mode 100644
index 4f9d56f76..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapParticle1.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d115f65e6f5e4603e16248081717cf5b3aceb1112c6368dead4eeafc8b9a16d3
-size 692
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile.bin
deleted file mode 100644
index 737dcd279..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:297b79febe8f4107fc34192a3b7ace5f0646bc5049d5c763983bca1828359ce4
-size 782
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile2.bin
deleted file mode 100644
index bbdae3a81..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/JapProjectile2.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:50ff8d62caafa01c666960e0b72737da4bfa8905cce9af90c93229a39adf1854
-size 739
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin
deleted file mode 100644
index d6d424595..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8b015bbe1091e4d524d7c7c637f5a42b931cc00e218d2307b637c6bd2103baf9
-size 735
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin
deleted file mode 100644
index 9accc766d..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f1adb0b74c940aa6db942d9a71370cba3a9e095d34ea7b998c89a57e85af686e
-size 745
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin
deleted file mode 100644
index 834552570..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d8646e5b9f972c65252ec77a97a97306cf484918ee3a41f451ef2e33c9a37fef
-size 690
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin
deleted file mode 100644
index 0847cebf5..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e4b6c8694927adf82c81db8733687eea942c26557bad8b4c23cea43aa067c84d
-size 747
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Smoke1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Smoke1.bin
deleted file mode 100644
index f13f07f59..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Smoke1.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5f303dd4a3616b41c4a2dc5838d28579af68dab52871503cb3f90bf03e81877d
-size 744
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Test.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Test.bin
deleted file mode 100644
index a2d043337..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Test.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ac035576a895f825fa0b0f35847cc45849d20accf2cdf7b40354da6761793b40
-size 739
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
index c9e4f582d..ba1161adb 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
@@ -33,7 +33,9 @@ Texture2D g_ShadowTexture;
Texture2D g_PreShadowTexture;
Texture2D g_BlurTexture;
Texture2D g_BlurXTexture;
+
Texture2D g_BlurWeightTexture;
+Texture2D g_BlurWeightXTexture;
Texture2D g_SurfaceTexture;
@@ -313,12 +315,33 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
return Out;
}
-float g_fWeights[32] =
+//float g_fWeights[32] =
+//{
+// 0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
+// 0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
+// 0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
+// 0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
+//};
+
+float g_fWeights[128] =
{
- 0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
- 0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
- 0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
- 0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
+ 0.000209902, 0.000241594, 0.000277451, 0.000317919, 0.000363477, 0.000414637, 0.000471944, 0.000535974,
+ 0.000607333, 0.000686659, 0.000774615, 0.000871889, 0.00097919, 0.00109725, 0.00122679, 0.00136858,
+ 0.00152334, 0.00169183, 0.00187477, 0.00207285, 0.00228675, 0.0025171, 0.00276448, 0.0030294,
+ 0.00331231, 0.00361356, 0.00393342, 0.00427205, 0.00462949, 0.00500564, 0.0054003, 0.00581308,
+ 0.00624346, 0.00669075, 0.00715411, 0.0076325, 0.00812472, 0.0086294, 0.009145, 0.0096698,
+ 0.0102019, 0.0107393, 0.0112798, 0.0118211, 0.0123608, 0.0128962, 0.0134249, 0.0139441,
+ 0.0144511, 0.0149431, 0.0154174, 0.0158713, 0.0163021, 0.0167073, 0.0170844, 0.0174311,
+ 0.0177452, 0.0180246, 0.0182676, 0.0184726, 0.0186383, 0.0187635, 0.0188474, 0.0188895,
+
+ 0.0188895, 0.0188474, 0.0187635, 0.0186383, 0.0184726, 0.0182676, 0.0180246, 0.0177452,
+ 0.0174311, 0.0170844, 0.0167073, 0.0163021, 0.0158713, 0.0154174, 0.0149431, 0.0144511,
+ 0.0139441, 0.0134249, 0.0128962, 0.0123608, 0.0118211, 0.0112798, 0.0107393, 0.0102019,
+ 0.0096698, 0.009145, 0.0086294, 0.00812472, 0.0076325, 0.00715411, 0.00669076, 0.00624346,
+ 0.00581308, 0.0054003, 0.00500564, 0.00462948, 0.00427205, 0.00393342, 0.00361356, 0.00331231,
+ 0.0030294, 0.00276448, 0.0025171, 0.00228675, 0.00207285, 0.00187477, 0.00169183, 0.00152334,
+ 0.00136858, 0.00122679, 0.00109725, 0.000979191, 0.000871889, 0.000774615, 0.000686658, 0.000607333,
+ 0.000535973, 0.000471944, 0.000414637, 0.000363477, 0.000317919, 0.000277451, 0.000241594, 0.000209902
};
@@ -395,30 +418,25 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
//}
float4 vColor = 0.f;
- //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
- //int iBlurMin;
- //int iBlurMax;
- //if (iBlurWeight % 2 == 0)
- //{
- // iBlurMin = -1 * iBlurWeight / 2;
- // iBlurMax = iBlurWeight / 2;
- //}
- //else
- //{
- // iBlurMin = -iBlurWeight / 2;
- // iBlurMax = iBlurWeight / 2 + 1;
- //}
+ int iBlurWeight = (int)(round(g_BlurWeightXTexture.Sample(ClampSampler, In.vTexcoord).r) * 128.f);
- //[loop] // 변수로 루프돌리려면 반드시 필요함
+ int iBlurMin;
+ int iBlurMax;
- for (int i = -15; i < 16; ++i)
+ iBlurMin = -1 * (iBlurWeight / 2) + 1;
+ iBlurMax = iBlurWeight / 2;
+
+ // // 변수로 루프돌리려면 반드시 필요함
+
+
+ for (int i = -63; i < 64; ++i)
{
vTexcoord.x = In.vTexcoord.x;
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
- vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 63] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBackBuffer += vColor;
@@ -429,6 +447,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
struct PS_OUT_BLUR_X
{
float4 vBlurX : SV_TARGET0;
+ float4 vBlurWeight : SV_TARGET1;
};
@@ -439,35 +458,38 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
float2 vTexcoord;
float4 vColor = 0.f;
- //TODO 블러 조절 해보려햇는데 실패함..
+ float fBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r;
+ int iBlurWeight = (int) (round(fBlurWeight) * 128.f);
- //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
+
- //int iBlurMin;
- //int iBlurMax;
+ int iBlurMin;
+ int iBlurMax;
- //if (iBlurWeight % 2 == 0)
+ iBlurMin = -1 * (iBlurWeight / 2) + 1;
+ iBlurMax = iBlurWeight / 2;
+
+ //for (int i = -15; i < 16; ++i)
//{
- // iBlurMin = -1 * iBlurWeight / 2;
- // iBlurMax = iBlurWeight / 2;
- //}
- //else
- //{
- // iBlurMin = -iBlurWeight / 2;
- // iBlurMax = iBlurWeight / 2 + 1;
+ // vTexcoord.x = In.vTexcoord.x;
+ // vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
+
+ // vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
//}
- //[loop] // 변수로 루프돌리려면 반드시 필요함
+ //Out.vBackBuffer += vColor;
- for (int i = -15; i < 16; ++i)
+
+ for (int i = -63; i < 64; ++i)
{
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
vTexcoord.y = In.vTexcoord.y;
- vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 63] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBlurX = vColor;
+ Out.vBlurWeight = fBlurWeight;
return Out;
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
index 117084542..bc18364e1 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
@@ -38,6 +38,7 @@ struct ParticleValue
float fSizeDrag;
float3 vDeltaSize;
+ float2 vDelay;
};
@@ -79,6 +80,17 @@ void CS_MAIN(
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
+ particleValue.vDelay.x += fTimeDelta;
+
+ if (particleValue.vDelay.x < particleValue.vDelay.y)
+ {
+
+ g_VBInstanceOutput[iIndex] = particle;
+ g_ParticleValueOutput[iIndex] = particleValue;
+
+ return;
+ }
+
// 라이프타임 움직임
particle.vLifeTime.x += fTimeDelta;
@@ -97,7 +109,7 @@ void CS_MAIN(
particle.vLifeTime.x = 0.f;
particleValue.vAniIndex.x = 0.f;
-
+ particleValue.vDelay.x = 0.f;
g_VBInstanceOutput[iIndex] = particle;
g_ParticleValueOutput[iIndex] = particleValue;
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
index fd32c126f..a7503bee5 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl
@@ -525,7 +525,6 @@ PS_OUT PS_HpBar(PS_IN In)
float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv);
Color = tex1;
-
float2 reversuv = In.vTexcoord;
reversuv.x = 1.0f - Finaluv;
@@ -537,7 +536,9 @@ PS_OUT PS_HpBar(PS_IN In)
tex2.rgb = float3(0.f, 0.f, 0.f);
}
- tex2.rgb *= float3(112.f, 241.f, 31.f) / 255.f;
+ float3 Green = float3(112.f, 241.f, 31.f) / 255.f;
+ Green *= 1.2f;
+ tex2.rgb *= Green;
if (all(Color.rgb >= float3(70.f / 255.f, 70.f / 255.f, 70.f / 255.f)))
Color = tex2;
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl
index d6eae9ff4..d6b238656 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl
@@ -3,6 +3,7 @@
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
Texture2D g_Texture;
+Texture2D g_Texture1;
float g_fAlpha;
float g_fOwnerAlpha;
@@ -97,6 +98,32 @@ PS_OUT PS_Alpha_Blend(PS_IN In)
return Out;
}
+PS_OUT PS_Megic_Meter(PS_IN In)
+{
+ PS_OUT Out;
+ float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
+ float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
+
+ float4 color = float4(1.f, 1.f, 1.f, 1.f);
+ float4 tex1 = g_Texture.Sample(ClampSampler, In.vTexcoord);
+ float4 tex2 = g_Texture1.Sample(ClampSampler, In.vTexcoord);
+
+ color = tex1;
+ tex2.rgb *= Blue * 1.5f;
+
+ if (all(color.rgb >= float3(65.f / 255.f, 65.f / 255.f, 65.f / 255.f)))
+ color = tex2;
+
+ //if(color.a <= 0.4f)
+ // discard;
+
+ color.a *= Alpha;
+
+ Out.vColor = color;
+
+ return Out;
+}
+
technique11 PosTexTechnique11
{
pass Default
@@ -120,4 +147,15 @@ technique11 PosTexTechnique11
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_Alpha_Blend();
}
+
+ pass Megic_Meter
+ {
+ SetRasterizerState(RS_Default);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_AlphaBlend, 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_Megic_Meter();
+ }
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
index 8a0db6625..8223c063c 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
@@ -28,8 +28,7 @@ struct ParticleValue
float fSizeDrag;
float3 vDeltaSize;
-
-
+ float2 vDelay;
};
@@ -81,7 +80,7 @@ float g_fBlurIntensity; //블러 세기
float g_fNoiseDistortionIntensity; // 디스토션 왜곡 세기
float4 g_vEmissive;
-float g_fEmissiveStrength;
+float g_fEmissiveStrength;
float g_fSoftenExp;
float g_fSoftStrength;
@@ -104,13 +103,17 @@ bool g_isMaskUVMove;
bool g_isNoiseUVMove;
bool g_isReverseDissolve;
+
bool g_isEmissiveDissolve;
+bool g_isEmissiveDissolveReverse;
+
bool g_isMaskClampSample;
bool g_isNoiseColor;
bool g_isNoiseAlpha;
bool g_isNomalDissolve;
+
float g_fFar;
float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
@@ -310,6 +313,12 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
float2 vMaskingTime = g_ParticleValue[In.iGPUIndex].vMaskingUVMoveTime;
float2 vNoiseUVMoveTime = g_ParticleValue[In.iGPUIndex].vNoiseUVMoveTime;
float2 vDistortionUVMoveTime = g_ParticleValue[In.iGPUIndex].vDistortionUVMoveTime;
+ float2 vDelay = g_ParticleValue[In.iGPUIndex].vDelay;
+
+ if (vDelay.x < vDelay.y)
+ {
+ discard;
+ }
if (g_isDiffuse == true)
{
@@ -407,20 +416,23 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
vMtrlMask = g_MaskingTexture.Sample(ClampSampler, vMaskTexcoord);
else
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
+
+
+ float fSoftMask;
+
+ if (g_fSoftMask > FLT_EPSILON5)
+ fSoftMask = saturate((vMtrlMask.r - g_fSoftMaskEdge) * g_fSoftMask);
+
+ vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * fSoftMask);
+
}
else
{
vMtrlMask.r = 1.f;
}
-
- float fSoftMask;
-
- if (g_fSoftMask > FLT_EPSILON5)
- fSoftMask = saturate((vMtrlMask.r - g_fSoftMaskEdge) * g_fSoftMask);
-
- vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * fSoftMask);
-
+
+
if (vMtrlDiffuse.a <= 0.f)
discard;
@@ -496,6 +508,13 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
fEmissiveStrength *= (1.f - In.vLifeTime.x / In.vLifeTime.y);
}
+ if (g_isEmissiveDissolveReverse == true)
+ {
+ fEmissiveStrength *= (In.vLifeTime.x / In.vLifeTime.y);
+ }
+
+
+
Out.vColorTarget = vEmissiveMtrl * fEmissive * fEmissiveStrength; // 이미시브 스트랭스
return Out;
@@ -544,6 +563,7 @@ struct PS_BLUR_IN
struct PS_BLUR_OUT
{
float4 vDiffuse : SV_TARGET0;
+ float4 vBlurWeight : SV_TARGET1;
};
@@ -551,7 +571,6 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
{
PS_BLUR_OUT Out;
-
vector vMtrlDiffuse;
vector vMtrlMask;
vector vMtrlNoise;
@@ -563,12 +582,18 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
float2 vMaskingTime = g_ParticleValue[In.iGPUIndex].vMaskingUVMoveTime;
float2 vNoiseUVMoveTime = g_ParticleValue[In.iGPUIndex].vNoiseUVMoveTime;
float2 vDistortionUVMoveTime = g_ParticleValue[In.iGPUIndex].vDistortionUVMoveTime;
+ float2 vDelay = g_ParticleValue[In.iGPUIndex].vDelay;
+
+ if (vDelay.x < vDelay.y)
+ {
+ discard;
+ }
if (g_isDiffuse == true)
{
float2 UV; // 이미지의 UV값
- UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
+ UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex));
if (g_isDiffuseUVMove)
{
@@ -617,7 +642,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
{
float2 vNoiseUV = In.vTexcoord;
- if(g_isNoiseUVMove == true)
+ if (g_isNoiseUVMove == true)
vNoiseUV = In.vTexcoord + SelectLerpUV(g_vNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iNoiseMoveLerpOption);
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
@@ -634,7 +659,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
{
float2 vMaskTexcoord = In.vTexcoord;
- vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex.x));
+ vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex));
// 마스크 디스토션
if (g_isDistortion == true)
@@ -660,31 +685,29 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
vMtrlMask = g_MaskingTexture.Sample(ClampSampler, vMaskTexcoord);
else
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
-
+
+
+ float fSoftMask;
+
+ if (g_fSoftMask > FLT_EPSILON5)
+ fSoftMask = saturate((vMtrlMask.r - g_fSoftMaskEdge) * g_fSoftMask);
+
+ vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * fSoftMask);
+
+ if (vMtrlDiffuse.a <= 0.f)
+ discard;
}
else
{
vMtrlMask.r = 1.f;
}
-
-
-
- float softMask = saturate((vMtrlMask.r - 0.1) * 1.0);
-
- vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * softMask);
-
- if (vMtrlDiffuse.a <= 0.f)
- discard;
-
vMtrlDiffuse.a *= g_fDiffuseAlpha;
if (g_isDissolve == true)
{
- vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
-
if (g_isNomalDissolve)
{
vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y);
@@ -706,10 +729,12 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
}
}
+
// 색깔 추가할 처리 (이미시브)
+
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
@@ -741,10 +766,9 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
fEmissiveStrength *= (1.f - In.vLifeTime.x / In.vLifeTime.y);
}
- vEmissiveMtrl = vEmissiveMtrl * fEmissive * fEmissiveStrength;
-
Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity + vEmissiveMtrl.rgb, vMtrlDiffuse.a); /** vector(vEmissiveColor * fSmoothAlpha, vMtrlDiffuse.a);*/
+ Out.vBlurWeight = g_iBlurWeight / 128.f;
return Out;
}
@@ -766,7 +790,7 @@ technique11 DefaultTechnique
{
SetRasterizerState(RS_Nocull);
SetDepthStencilState(DSS_None, 0);
- SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ SetBlendState(BS_WB_Acc, 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_NON_NORMALMAP();
@@ -782,8 +806,6 @@ technique11 DefaultTechnique
PixelShader = compile ps_5_0 PS_BLUR();
}
-
-
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/FinisherMeterOutline.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/FinisherMeterOutline.png
new file mode 100644
index 000000000..2e6e2a594
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/FinisherMeterOutline.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/HpBarBG1.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/HpBarBG1.png
deleted file mode 100644
index 0275521be..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/HpBarBG1.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_AncientMagicFinisher.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_AncientMagicFinisher.png
new file mode 100644
index 000000000..99e1c8e34
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_AncientMagicFinisher.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HUD_HealthMeterFill.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HUD_HealthMeterFill.png
index 574a9cb5e..b63ee71ec 100644
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HUD_HealthMeterFill.png and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HUD_HealthMeterFill.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HealthMeter_LeftEnd_4K.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HealthMeter_LeftEnd_4K.png
deleted file mode 100644
index 600b313df..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HealthMeter_LeftEnd_4K.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HealthMeter_Middle_4K.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HealthMeter_Middle_4K.png
deleted file mode 100644
index e6c2ab4f6..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HealthMeter_Middle_4K.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HealthMeter_RightEnd_4K.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HealthMeter_RightEnd_4K.png
deleted file mode 100644
index f9ac9de3c..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_HealthMeter_RightEnd_4K.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_SpellDiamond_Red.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_SpellDiamond_Red.png
deleted file mode 100644
index 4f7dffb00..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_SpellDiamond_Red.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_SpellTypeBack_Yellow.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_SpellTypeBack_Yellow.png
deleted file mode 100644
index 9518d2203..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_SpellTypeBack_Yellow.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_SpellTypeDiamond_Forceful.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_SpellTypeDiamond_Forceful.png
deleted file mode 100644
index 0a10588a0..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_SpellTypeDiamond_Forceful.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_AMFillPotion.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_AMFillPotion.png
new file mode 100644
index 000000000..835903409
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_AMFillPotion.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_BeastBliss.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_BeastBliss.png
new file mode 100644
index 000000000..28b07a644
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_BeastBliss.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Edurus.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Edurus.png
new file mode 100644
index 000000000..a66c8633e
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Edurus.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_EssenceOfDittany.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_EssenceOfDittany.png
new file mode 100644
index 000000000..90347927c
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_EssenceOfDittany.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_FelixFelicis.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_FelixFelicis.png
new file mode 100644
index 000000000..15a3e3857
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_FelixFelicis.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Girding.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Girding.png
new file mode 100644
index 000000000..946c872f1
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Girding.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_HorklumpJuice.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_HorklumpJuice.png
new file mode 100644
index 000000000..1486cf649
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_HorklumpJuice.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_InvisibilityPotion.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_InvisibilityPotion.png
new file mode 100644
index 000000000..6a0dc9b84
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_InvisibilityPotion.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Maxima.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Maxima.png
new file mode 100644
index 000000000..647db47b6
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Maxima.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Sun_Syrup.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Sun_Syrup.png
new file mode 100644
index 000000000..c8368887b
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_Sun_Syrup.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_WoundCleaning.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_WoundCleaning.png
new file mode 100644
index 000000000..c971988e3
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Potions/UI_T_WoundCleaning.png differ
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index 0b20027ff..272c63f9a 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -177,7 +177,9 @@
-
+
+
+
@@ -206,11 +208,13 @@
+
+
-
+
false
@@ -237,7 +241,9 @@
false
+
+
@@ -303,7 +309,9 @@
-
+
+
+
@@ -332,11 +340,13 @@
+
+
-
+
false
@@ -363,7 +373,10 @@
false
+
+
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index a4e8509b6..5c2069a50 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -40,9 +40,6 @@
{fb090860-8f24-4f71-9daf-7fd971a8f5c2}
-
- {0eeb6d5c-db23-4147-b981-8346c879a1eb}
-
{085e6bcb-1fe4-4857-bfc6-ed6fc0218358}
@@ -298,6 +295,9 @@
{0db597d8-c4e7-479a-9b7e-9014b79a5e03}
+
+ {7e8b7123-11fb-4946-99fe-3265932d0536}
+
{072a4e85-ba07-4ffd-bdb1-ddac02558242}
@@ -307,12 +307,12 @@
{1c11a2a1-ad0a-4f0b-8a86-5ab9fc68a69f}
-
- {b899b53a-c8cf-451a-ab5d-6945cac88276}
-
{92110a48-81d0-4e98-be06-05dd078d0488}
+
+ {c81350c7-0edb-4e51-babf-09bf627414f1}
+
{a56502cb-b0b8-4ea7-bc5e-5482b416fef9}
@@ -343,6 +343,33 @@
{54eef1b7-a5ee-444f-9577-44ffc8c3d8bc}
+
+ {b4e1da25-c952-4ff4-92fd-7f1501d8c005}
+
+
+ {7683f642-58f7-4a79-a78c-b29540bdab10}
+
+
+ {b6ec3441-6b18-45d1-80ba-03aa6df7f9e2}
+
+
+ {ee7ebf3c-8798-41cb-a261-31ca5041909c}
+
+
+ {94ad00fa-52a1-4d53-b44e-5bb849a25201}
+
+
+ {0d5c1798-4922-498e-afed-d1778c8e77b9}
+
+
+ {b899b53a-c8cf-451a-ab5d-6945cac88276}
+
+
+ {1962eafc-d147-494f-8d09-d96b78014958}
+
+
+ {1c4860c7-bc8a-4bed-b545-ed3ef0b02748}
+
@@ -378,9 +405,6 @@
01.Level\01.Logo
-
- 02.GameObjects\Dummys\DebugCamera
-
02.GameObjects\Dummys\DummyRect
@@ -657,15 +681,12 @@
02.GameObjects\Camera\CameraPosition
-
- 02.GameObjects\Camera\CameraPosition\Player
-
-
- 02.GameObjects\Camera
-
02.GameObjects\Wand
+
+ 02.GameObjects\Layer_Effect\Effect\06.Bombard
+
80.State
@@ -675,6 +696,30 @@
02.GameObjects\Env\05.AlphaMap
+
+ 02.GameObjects\Camera\Debug
+
+
+ 02.GameObjects\Camera\CameraPosition\Arm
+
+
+ 02.GameObjects\Camera\CameraPosition\Socket
+
+
+ 02.GameObjects\Camera\CameraPosition\Player\Shoulder
+
+
+ 02.GameObjects\Camera\CameraPosition\Player\Target
+
+
+ 50.UI\GamePlay_Canvas\Action_Panel\Spell_Slot_Preview
+
+
+ 50.UI\GamePlay_Canvas\Action_Panel\Potion
+
+
+ 50.UI\GamePlay_Canvas\Action_Panel\Magic_Meter
+
@@ -697,9 +742,6 @@
01.Level\01.Logo
-
- 02.GameObjects\Dummys\DebugCamera
-
99.Define\DEFAULT
@@ -982,12 +1024,6 @@
02.GameObjects\Camera\CameraPosition
-
- 02.GameObjects\Camera\CameraPosition\Player
-
-
- 02.GameObjects\Camera
-
02.GameObjects\Wand
@@ -997,9 +1033,39 @@
02.GameObjects\Player
+
+ 02.GameObjects\Layer_Effect\Effect\06.Bombard
+
02.GameObjects\Env\05.AlphaMap
+
+ 50.UI\GamePlay_Canvas\Action_Panel\Spell_Slot_Preview
+
+
+ 50.UI\GamePlay_Canvas\Action_Panel\Potion
+
+
+ 50.UI\GamePlay_Canvas\Action_Panel\Magic_Meter
+
+
+ 02.GameObjects\Camera\Debug
+
+
+ 02.GameObjects\Camera\CameraPosition\Arm
+
+
+ 02.GameObjects\Camera\CameraPosition\Socket
+
+
+ 02.GameObjects\Camera\CameraPosition\Player\Shoulder
+
+
+ 02.GameObjects\Camera\CameraPosition\Player\Target
+
+
+ 02.GameObjects\Player
+
diff --git a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp
index 6d43368e2..3cc914936 100644
--- a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp
+++ b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp
@@ -6,6 +6,7 @@
#include "Spell_Overlay.h"
#include "Slot_Number.h"
#include "HpBarBG.h"
+#include "Magic_Meter.h"
CAction_Panel::CAction_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CPanelObject(pDevice, pContext)
@@ -144,13 +145,18 @@ HRESULT CAction_Panel::Ready_Element(void* pArg)
return E_FAIL;
}
Add_Element(TEXT("HpBarBG"), m_pHpBarBG);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Magic_Meter"), m_pMagic_Meter);
return S_OK;
}
CAction_Panel* CAction_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CAction_Panel* pInstance = new CAction_Panel(pDevice, pContext);
-
+
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CAction_Panel");
diff --git a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp.bak b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp.bak
new file mode 100644
index 000000000..c91f89041
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp.bak
@@ -0,0 +1,193 @@
+#include "pch.h"
+#include "Action_Panel.h"
+#include "GameInstance.h"
+#include "Spell_Slot.h"
+#include "Spell_Image.h"
+#include "Spell_Overlay.h"
+#include "Slot_Number.h"
+#include "HpBarBG.h"
+#include "Magic_Meter.h
+
+CAction_Panel::CAction_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CPanelObject(pDevice, pContext)
+{
+}
+
+CAction_Panel::CAction_Panel(const CAction_Panel& rhs)
+ :CPanelObject(rhs)
+{
+}
+
+HRESULT CAction_Panel::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CAction_Panel::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 1515.f;
+ Desc.fY = 850.f;
+ Desc.fSizeX = 700.f;
+ Desc.fSizeY = 400.f;
+
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Element(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_bVisible = true;
+ return S_OK;
+}
+
+void CAction_Panel::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CAction_Panel::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ __super::Update(fTimeDelta);
+}
+
+void CAction_Panel::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bVisible) {
+
+ }
+ __super::Late_Update(fTimeDelta);
+
+}
+
+HRESULT CAction_Panel::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CAction_Panel::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CAction_Panel::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+HRESULT CAction_Panel::Ready_Components(void* pArg)
+{
+ return S_OK;
+}
+
+HRESULT CAction_Panel::Ready_Element(void* pArg)
+{
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpell_Slot))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Spell_Slot"), m_pSpell_Slot);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Image))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Spell_Image"), m_pSpell_Image);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpell_Overlay))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Spell_Overlay"), m_pSpell_Overlay);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSlot_Number))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Slot_Number"), m_pSlot_Number);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pHpBarBG))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("HpBarBG"), m_pHpBarBG);
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMagic_Meter))))
+ {
+ return E_FAIL;
+ }
+ Add_Element(TEXT("Magic_Meter"), m_pMagic_Meter);
+ return S_OK;
+}
+
+CAction_Panel* CAction_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CAction_Panel* pInstance = new CAction_Panel(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CAction_Panel");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CAction_Panel::Clone(void* pArg, CGameObject* pOwner)
+{
+ CAction_Panel* pInstance = new CAction_Panel(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CAction_Panel");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CAction_Panel::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CAction_Panel::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/Bombard.cpp b/Jusin154_Team3D/Editor/Private/Bombard.cpp
new file mode 100644
index 000000000..0e293e18f
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Bombard.cpp
@@ -0,0 +1,193 @@
+#include "pch.h"
+#include "Bombard.h"
+
+#include "GameInstance.h"
+#include "EditEffect.h"
+#include "Dummy_PhysXEffectHitBox.h"
+
+
+CBombard::CBombard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CBombard::CBombard(const CBombard& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CBombard::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CBombard::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Child()))
+ return E_FAIL;
+
+ if (FAILED(Load_Directory("../Bin/Resources/Data/Effect/Bombard/")))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"Bombard";
+
+ CPartObject* pShootPt = Get_PartObject("Bombard_Shoot_Pt");
+ m_pLight_Projectile = Get_PartObject("Bombard_Projectile");
+ CPartObject* pCircle0 = Get_PartObject("Bombard_Circle0");
+
+ pShootPt->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+ m_pLight_Projectile->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+ pCircle0->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+
+ pCircle0->Set_Visible(true);
+ pShootPt->Set_Visible(true);
+ m_pLight_Projectile->Set_Visible(true);
+
+ SAFE_ADDREF(m_pLight_Projectile);
+ m_fDuration = 2.5f;
+
+ return S_OK;
+}
+
+void CBombard::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CBombard::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+ _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
+
+ m_pLight_Projectile->Get_Component()->Translation(vOwnerLook * 2.f);
+}
+
+void CBombard::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CBombard::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CBombard::Ready_Child()
+{
+ CDummy_PhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
+
+ m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
+
+ XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
+
+ Desc.vRotRPY = { 0.f, 0.f, 0.f };
+ Desc.iSubKind = 70;
+ Desc.vDeltaPos = { 0.f, 0.f, 2.f };
+ Desc.vLifeTime = { 0.f, 2.f };
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
+ assert(false);
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+CBombard* CBombard::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CBombard* pInstance = new CBombard(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CBombard");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CBombard::Clone(void* pArg, CGameObject* pOwner)
+{
+ CBombard* pInstance = new CBombard(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CBombard");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CBombard::OnCollision(CGameObject* pOther , void* pDesc)
+{
+ //CTransform* pOtherTransform = p
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+
+ for (auto& pPair : m_PartObjects)
+ {
+ pPair.second->Set_Visible(true);
+ pPair.second->Get_Component()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
+ }
+
+
+ m_pLight_Projectile->Set_Visible(false);
+ Get_PartObject("Bombard_Shoot_Pt")->Set_Visible(false);
+
+ _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK);
+ Get_PartObject("Bombard_Smoke")->Get_Component()->Translation(vOwnerLook);
+
+ Get_PartObject("Bombard_Circle0")->Set_Visible(false);
+
+ m_pPhysHitBox->Set_Dead();
+}
+
+void CBombard::Free()
+{
+ __super::Free();
+
+ //if(m_pPhysHitBox != nullptr)
+ // if (m_pPhysHitBox->Get_Depth() == false)
+ // SAFE_RELEASE(m_pPhysHitBox);
+
+ SAFE_RELEASE(m_pLight_Projectile);
+
+}
+
+void CBombard::Describe_Entity()
+{
+
+}
+
+HRESULT CBombard::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Editor/Private/CamPosition_Arm.cpp b/Jusin154_Team3D/Editor/Private/CamPosition_Arm.cpp
index 14c06801f..2f00ec9dc 100644
--- a/Jusin154_Team3D/Editor/Private/CamPosition_Arm.cpp
+++ b/Jusin154_Team3D/Editor/Private/CamPosition_Arm.cpp
@@ -6,12 +6,10 @@ CCamPosition_Arm::CCamPosition_Arm(ID3D11Device* pDevice, ID3D11DeviceContext* p
: CCamPosition(pDevice, pContext)
{
}
-
CCamPosition_Arm::CCamPosition_Arm(const CCamPosition_Arm& rhs)
: CCamPosition(rhs)
{
}
-
HRESULT CCamPosition_Arm::Initialize_Prototype()
{
return S_OK;
@@ -44,6 +42,7 @@ void CCamPosition_Arm::Priority_Update(_float fTimeDelta)
void CCamPosition_Arm::Update(_float fTimeDelta)
{
+
}
void CCamPosition_Arm::Late_Update(_float fTimeDelta)
@@ -96,12 +95,10 @@ CCamPosition_Arm* CCamPosition_Arm::Clone(void* pArg, class CGameObject* pOWner)
return pInstance;
}
-
void CCamPosition_Arm::Free()
{
__super::Free();
}
-
void CCamPosition_Arm::Describe_Entity()
{
}
diff --git a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp
new file mode 100644
index 000000000..839277a46
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp
@@ -0,0 +1,225 @@
+#include "pch.h"
+#include "CamPosition_Shoulder.h"
+#include "CamPosition_Target.h"
+#include "GameInstance.h"
+#include "Camera_Gaze.h"
+
+CCamPosition_Shoulder::CCamPosition_Shoulder(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CCamPosition(pDevice, pContext)
+{
+}
+CCamPosition_Shoulder::CCamPosition_Shoulder(const CCamPosition_Shoulder& rhs)
+ : CCamPosition(rhs)
+{
+}
+HRESULT CCamPosition_Shoulder::Initialize_Prototype()
+{
+ return S_OK;
+}
+HRESULT CCamPosition_Shoulder::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg))) {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_SubParts())) {
+ return E_FAIL;
+ }
+
+ CAMERA_SHOULDER_DESC* pDesc = static_cast(pArg);
+ {
+ m_fMouseSensor = pDesc->fMouseSensor;
+ m_vShoulderPosRatio = pDesc->vInitialLook;
+ m_fShoulderDistance = pDesc->fShoulderDistance;
+ m_vAccDegreeXY = { 0.f, 0.f };
+ m_fCameraFocalLength = pDesc->fCameraFocalLength;
+ m_fBackFrontRatio = pDesc->fBackFrontRatio;
+
+ m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio = pDesc->vInitialLook;
+ m_vShoulderStartRatio.x *= -1.f;
+ m_pTransformCom->Set_State(STATE::POSITION,
+ m_pParentTransformCom->Get_State(STATE::POSITION)
+ + XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio)) * m_fShoulderDistance);
+
+ _vector vShoulderPos = Get_WorldPostion();
+ _vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
+ _vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
+ vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
+
+ CTransform* pLookTransform = m_pTarget_LookPart->Get_Component();
+ CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component();
+
+ pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
+ pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
+ }
+
+ return S_OK;
+}
+
+void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
+{
+ if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
+ return;
+ }
+ if (true == m_bMovable) {
+ m_vAccDegreeXY.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
+ m_vAccDegreeXY.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
+ }
+
+ _vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
+ _vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
+ vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
+
+ m_pTransformCom->Set_State(STATE::POSITION, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance);
+ _vector vShoulderPos = Get_WorldPostion();
+ _vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
+ _vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
+ vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
+
+ CTransform* pLookTransform = m_pTarget_LookPart->Get_Component();
+ CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component();
+
+ pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
+ pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
+}
+
+void CCamPosition_Shoulder::Update(_float fTimeDelta)
+{
+ if (m_pGameInstance->Key_Up(DIK_O)) {
+ m_pBinded_Camera->Toggle_Priority();
+ }
+ if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
+ return;
+ }
+ Describe_Entity();
+ if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
+ m_bMovable = !m_bMovable;
+ }
+ if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) {
+ m_pGameInstance->Toggle_MouseCenter();
+ }
+ if (m_pGameInstance->Key_Up(DIK_P)) {
+ m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio;
+ m_vShoulderStartRatio.x *= -1.f;
+ m_bLerp = true;
+ m_vLerpTimer.x = 0.f;
+ }
+}
+
+void CCamPosition_Shoulder::Late_Update(_float fTimeDelta)
+{
+ if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
+ return;
+ }
+ if (true == m_bLerp) {
+ m_vLerpTimer.x += fTimeDelta;
+ XMStoreFloat3(&m_vShoulderPosRatio, XMVectorLerp(XMLoadFloat3(&m_vShoulderStartRatio), XMLoadFloat3(&m_vShoulderOtherRatio), m_vLerpTimer.x / m_vLerpTimer.y));
+ if (m_vLerpTimer.x > m_vLerpTimer.y) {
+ m_bLerp = false;
+ m_vLerpTimer.x = 0.f;
+
+ m_vShoulderPosRatio = m_vShoulderOtherRatio;
+ }
+ }
+}
+
+HRESULT CCamPosition_Shoulder::Render()
+{
+ return S_OK;
+}
+
+_vector CCamPosition_Shoulder::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CCamPosition_Shoulder::Ready_Components(void* pArg)
+{
+ CTransform::TRANSFORM_DESC DescTransfrom = {};
+ DescTransfrom.fRadius = 30.f;
+ DescTransfrom.fRotationPerSec = 0.f;
+ DescTransfrom.fSpeedPerSec = 0.f;
+ if (FAILED(__super::Ready_Components(&DescTransfrom))) {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+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_FollowPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc);
+ }
+
+ CCamera_Gaze::CAMERA_GAZE_DESC CameraDesc{};
+ CameraDesc.fFovy = XMConvertToRadians(60.0f);
+ CameraDesc.fNear = 0.1f;
+ CameraDesc.fFar = 300.f;
+ CameraDesc.fSpeedPerSec = 5.f;
+ CameraDesc.fRotationPerSec = XMConvertToRadians(90.f);
+ CameraDesc.pFollowTarget = m_pTarget_FollowPart;
+ CameraDesc.pLookTarget = m_pTarget_LookPart;
+ CameraDesc.iPriority = 51;
+ CameraDesc.pCameraKey = CAMERA_SHOULDER;
+ CameraDesc.bEnableTransitionLerp = true;
+ CameraDesc.bEnableFollowLerp = true;
+ CameraDesc.bEnableLookLerp = true;
+ CameraDesc.vTransitionTime = { 0.f, 1.f };
+ CameraDesc.vFollowLerpTime = { 0.f, 0.16f };
+ CameraDesc.vLookLerpTime = { 0.f, 0.16f };
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &m_pBinded_Camera)))
+ {
+ return E_FAIL;
+ }
+ m_pGameInstance->Add_Camera(g_iStaticLevel, m_pBinded_Camera, CAMERA_SHOULDER);
+
+
+ return S_OK;
+}
+CCamPosition_Shoulder* CCamPosition_Shoulder::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CCamPosition_Shoulder* pInstance = new CCamPosition_Shoulder(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CCamPosition_Shoulder");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+CCamPosition_Shoulder* CCamPosition_Shoulder::Clone(void* pArg, class CGameObject* pOWner)
+{
+ CCamPosition_Shoulder* pInstance = new CCamPosition_Shoulder(*this);
+ pInstance->m_pOwner = pOWner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CCamPosition_Shoulder");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+void CCamPosition_Shoulder::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pTarget_LookPart);
+ SAFE_RELEASE(m_pTarget_FollowPart);
+}
+void CCamPosition_Shoulder::Describe_Entity()
+{
+ GUI::Begin("Cam_Shoulder");
+ m_pTransformCom->Describe_Entity();
+ GUI::Text("fMouseSensor : %.1f", &m_fMouseSensor);
+ GUI::SliderFloat("ShoulderDistance", &m_fShoulderDistance, 0.f, 10.f, "%.1f");
+ GUI::SliderFloat("BackFrontRatio", &m_fBackFrontRatio, 0.01f, 0.99f, "%.2f");
+ GUI::Text("Pitch Yaw : %f %f", &m_vAccDegreeXY.x, &m_vAccDegreeXY.y);
+ GUI::SliderFloat3("ShoulderPosRatio", (_float*)&m_vShoulderPosRatio, -2.f, 2.f, "%.1f");
+ GUI::End();
+}
diff --git a/Jusin154_Team3D/Editor/Private/CamPosition_Player.cpp b/Jusin154_Team3D/Editor/Private/CamPosition_Socket.cpp
similarity index 53%
rename from Jusin154_Team3D/Editor/Private/CamPosition_Player.cpp
rename to Jusin154_Team3D/Editor/Private/CamPosition_Socket.cpp
index cf636702f..7fc1bd947 100644
--- a/Jusin154_Team3D/Editor/Private/CamPosition_Player.cpp
+++ b/Jusin154_Team3D/Editor/Private/CamPosition_Socket.cpp
@@ -1,18 +1,18 @@
#include "pch.h"
-#include "CamPosition_Player.h"
+#include "CamPosition_Socket.h"
-CCamPosition_Player::CCamPosition_Player(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CCamPosition_Socket::CCamPosition_Socket(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CCamPosition(pDevice, pContext)
{
}
-CCamPosition_Player::CCamPosition_Player(const CCamPosition_Player& rhs)
+CCamPosition_Socket::CCamPosition_Socket(const CCamPosition_Socket& rhs)
:CCamPosition(rhs)
{
}
-void CCamPosition_Player::Priority_Update(_float fTimeDelta)
+void CCamPosition_Socket::Priority_Update(_float fTimeDelta)
{
/*_matrix socketMatrix = {};
@@ -24,29 +24,29 @@ void CCamPosition_Player::Priority_Update(_float fTimeDelta)
m_pTransformCom->Set_WorldMatrix(/*socketMatrix * */XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
}
-void CCamPosition_Player::Update(_float fTimeDelta)
+void CCamPosition_Socket::Update(_float fTimeDelta)
{
}
-void CCamPosition_Player::Late_Update(_float fTimeDelta)
+void CCamPosition_Socket::Late_Update(_float fTimeDelta)
{
}
-HRESULT CCamPosition_Player::Initialize_Prototype()
+HRESULT CCamPosition_Socket::Initialize_Prototype()
{
return S_OK;
}
-HRESULT CCamPosition_Player::Initialize(void* pArg)
+HRESULT CCamPosition_Socket::Initialize(void* pArg)
{
CAMERAPOSITION_PLAYER_DESC* pDesc = static_cast (pArg);
//m_pSocketMatrices = pDesc->pSocketMatrices;
- if (FAILED(__super::Initialize(pArg)))
+ if (FAILED(__super::Initialize(pArg)))
{
return E_FAIL;
}
- if (FAILED(Ready_Components(pArg)))
+ if (FAILED(Ready_Components(pArg)))
{
return E_FAIL;
}
@@ -54,9 +54,9 @@ HRESULT CCamPosition_Player::Initialize(void* pArg)
return S_OK;
}
-HRESULT CCamPosition_Player::Ready_Components(void* pArg)
+HRESULT CCamPosition_Socket::Ready_Components(void* pArg)
{
- if (FAILED(__super::Ready_Components(pArg)))
+ if (FAILED(__super::Ready_Components(pArg)))
{
return E_FAIL;
}
@@ -64,14 +64,14 @@ HRESULT CCamPosition_Player::Ready_Components(void* pArg)
return S_OK;
}
-HRESULT CCamPosition_Player::Bind_ShaderResources()
+HRESULT CCamPosition_Socket::Bind_ShaderResources()
{
return S_OK;
}
-CCamPosition_Player* CCamPosition_Player::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CCamPosition_Socket* CCamPosition_Socket::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
- CCamPosition_Player* pInstance = new CCamPosition_Player(pDevice, pContext);
+ CCamPosition_Socket* pInstance = new CCamPosition_Socket(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
@@ -82,9 +82,9 @@ CCamPosition_Player* CCamPosition_Player::Create(ID3D11Device* pDevice, ID3D11De
return pInstance;
}
-CCamPosition_Player* CCamPosition_Player::Clone(void* pArg, class CGameObject* pOWner)
+CCamPosition_Socket* CCamPosition_Socket::Clone(void* pArg, class CGameObject* pOWner)
{
- CCamPosition_Player* pInstance = new CCamPosition_Player(*this);
+ CCamPosition_Socket* pInstance = new CCamPosition_Socket(*this);
pInstance->m_pOwner = pOWner;
if (FAILED(pInstance->Initialize(pArg)))
{
@@ -95,11 +95,11 @@ CCamPosition_Player* CCamPosition_Player::Clone(void* pArg, class CGameObject* p
return pInstance;
}
-void CCamPosition_Player::Free()
+void CCamPosition_Socket::Free()
{
__super::Free();
}
-void CCamPosition_Player::Describe_Entity()
+void CCamPosition_Socket::Describe_Entity()
{
}
diff --git a/Jusin154_Team3D/Editor/Private/CamPosition_Target.cpp b/Jusin154_Team3D/Editor/Private/CamPosition_Target.cpp
new file mode 100644
index 000000000..c3b561717
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/CamPosition_Target.cpp
@@ -0,0 +1,94 @@
+#include "pch.h"
+
+#include "CamPosition_Target.h"
+
+CCamPosition_Target::CCamPosition_Target(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CCamPosition(pDevice, pContext)
+{
+}
+CCamPosition_Target::CCamPosition_Target(const CCamPosition_Target& rhs)
+ :CCamPosition(rhs)
+{
+}
+
+void CCamPosition_Target::Priority_Update(_float fTimeDelta)
+{
+}
+
+void CCamPosition_Target::Update(_float fTimeDelta)
+{
+}
+
+void CCamPosition_Target::Late_Update(_float fTimeDelta)
+{
+}
+
+_vector CCamPosition_Target::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CCamPosition_Target::Initialize_Prototype()
+{
+ return S_OK;
+}
+HRESULT CCamPosition_Target::Initialize(void* pArg)
+{
+ CAMERAPOSITION_TARGET_DESC* pDesc = static_cast (pArg);
+ if (FAILED(__super::Initialize(pArg))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CCamPosition_Target::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CCamPosition_Target::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+CCamPosition_Target* CCamPosition_Target::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CCamPosition_Target* pInstance = new CCamPosition_Target(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CCamPosition_Target");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+CCamPosition_Target* CCamPosition_Target::Clone(void* pArg, class CGameObject* pOWner)
+{
+ CCamPosition_Target* pInstance = new CCamPosition_Target(*this);
+ pInstance->m_pOwner = pOWner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CCamPosition_Target");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+void CCamPosition_Target::Free()
+{
+ __super::Free();
+}
+void CCamPosition_Target::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/DebugCamera.cpp b/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp
similarity index 68%
rename from Jusin154_Team3D/Editor/Private/DebugCamera.cpp
rename to Jusin154_Team3D/Editor/Private/Camera_Debug.cpp
index 2952b68c6..d37e0cb12 100644
--- a/Jusin154_Team3D/Editor/Private/DebugCamera.cpp
+++ b/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp
@@ -1,23 +1,27 @@
#include "pch.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Shader.h"
-CDebugCamera::CDebugCamera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CCamera_Debug::CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CCamera(pDevice, pContext)
{
}
-CDebugCamera::CDebugCamera(const CDebugCamera& rhs)
+CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs)
: CCamera(rhs)
{
}
-void CDebugCamera::Priority_Update(_float fTimeDelta)
+void CCamera_Debug::Priority_Update(_float fTimeDelta)
{
+ m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, false);
}
-void CDebugCamera::Update(_float fTimeDelta)
+void CCamera_Debug::Update(_float fTimeDelta)
{
+ if (false == m_bActive) {
+ return;
+ }
Transition(fTimeDelta);
_float3 vCamPos = {};
XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION));
@@ -66,21 +70,24 @@ void CDebugCamera::Update(_float fTimeDelta)
__super::Bind_Matrices();
}
-void CDebugCamera::Late_Update(_float fTimeDelta)
+void CCamera_Debug::Late_Update(_float fTimeDelta)
{
+ if (false == m_bActive) {
+ return;
+ }
}
-HRESULT CDebugCamera::Render()
+HRESULT CCamera_Debug::Render()
{
return S_OK;
}
-HRESULT CDebugCamera::Initialize_Prototype()
+HRESULT CCamera_Debug::Initialize_Prototype()
{
return S_OK;
}
-HRESULT CDebugCamera::Initialize(void* pArg)
+HRESULT CCamera_Debug::Initialize(void* pArg)
{
CAMERA_DEBUG_DESC* pDesc = static_cast(pArg);
m_fMouseSensor = pDesc->fMouseSensor;
@@ -97,12 +104,10 @@ HRESULT CDebugCamera::Initialize(void* pArg)
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
m_bActive = true;
- m_pGameInstance->Add_Camera(NEXT_LEVEL, this, m_pCameraKey);
- m_pGameInstance->Bind_Camera(NEXT_LEVEL, m_pCameraKey, false);
return S_OK;
}
-HRESULT CDebugCamera::Ready_Components(void* pArg)
+HRESULT CCamera_Debug::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
@@ -111,46 +116,46 @@ HRESULT CDebugCamera::Ready_Components(void* pArg)
return S_OK;
}
-HRESULT CDebugCamera::Bind_ShaderResources()
+HRESULT CCamera_Debug::Bind_ShaderResources()
{
return S_OK;
}
-void CDebugCamera::Set_InitialPos()
+void CCamera_Debug::Set_InitialPos()
{
m_pTransformCom->Set_WorldMatrix(m_matInitial);
}
-CDebugCamera* CDebugCamera::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CCamera_Debug* CCamera_Debug::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
- CDebugCamera* pInstance = new CDebugCamera(pDevice, pContext);
+ CCamera_Debug* pInstance = new CCamera_Debug(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
- MSG_BOX("Failed to Created : CDebugCamera");
+ MSG_BOX("Failed to Created : CCamera_Debug");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
-CGameObject* CDebugCamera::Clone(void* pArg, CGameObject* pOwner)
+CGameObject* CCamera_Debug::Clone(void* pArg, CGameObject* pOwner)
{
- CDebugCamera* pInstance = new CDebugCamera(*this);
+ CCamera_Debug* pInstance = new CCamera_Debug(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
- MSG_BOX("Failed to Cloned : CDebugCamera");
+ MSG_BOX("Failed to Cloned : CCamera_Debug");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
-void CDebugCamera::Free()
+void CCamera_Debug::Free()
{
__super::Free();
}
-void CDebugCamera::Describe_Entity()
+void CCamera_Debug::Describe_Entity()
{
}
diff --git a/Jusin154_Team3D/Editor/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Editor/Private/Camera_Gaze.cpp
index a7eeb9049..81b6771d0 100644
--- a/Jusin154_Team3D/Editor/Private/Camera_Gaze.cpp
+++ b/Jusin154_Team3D/Editor/Private/Camera_Gaze.cpp
@@ -13,9 +13,27 @@ CCamera_Gaze::CCamera_Gaze(const CCamera_Gaze& rhs)
void CCamera_Gaze::Priority_Update(_float fTimeDelta)
{
+ if (false == m_bActive) {
+ return;
+ }
if (false == m_bIsCurrentTransition) {
- m_pTransformCom->Set_State(STATE::POSITION, m_pFollowTarget->Get_Component()->Get_State(STATE::POSITION));
- m_pTransformCom->LookAt(m_pLookTarget->Get_Component()->Get_State(STATE::POSITION));
+ if (m_bEnable_FollowLerp) {
+ _vector vNewPos = XMVectorSetW(XMVectorLerp(XMLoadFloat3(&m_vFollowPos_Src), XMLoadFloat3(&m_vFollowPos_Dest), m_vFollowLerpTime.x / m_vFollowLerpTime.y), 1.f);
+ m_pTransformCom->Set_State(STATE::POSITION, vNewPos);
+ }
+ else {
+ m_pTransformCom->Set_State(STATE::POSITION, m_pFollowTarget->Get_Component()->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);
+ m_pTransformCom->LookAt(vNewLook);
+ }
+ else {
+ m_pTransformCom->LookAt(m_pLookTarget->Get_Component()->Get_State(STATE::POSITION));
+ }
+ }
+ else {
+
}
m_bActive = true;
__super::Bind_Matrices();
@@ -23,22 +41,81 @@ void CCamera_Gaze::Priority_Update(_float fTimeDelta)
void CCamera_Gaze::Update(_float fTimeDelta)
{
+ GUI::Text("%d", m_iPriority);
+ if (false == m_bActive) {
+ return;
+ }
+ Transition(fTimeDelta);
+ Update_LerpTimer(fTimeDelta);
+
+ Describe_Entity();
+}
+
+void CCamera_Gaze::Update_LerpTimer(Engine::_float fTimeDelta)
+{
+ if (false == m_bActive) {
+ return;
+ }
+ if (true == m_bEnable_LookLerp) {
+ m_vLookLerpTime.x += fTimeDelta;
+ if (m_vLookLerpTime.y <= m_vLookLerpTime.x) {
+ m_vLookLerpTime.x = 0.f;
+ m_bEnable_LookLerp = false;
+ XMStoreFloat3(&m_vLookPos_Src, XMLoadFloat3(&m_vLookPos_Dest));
+ XMStoreFloat3(&m_vLookPos_Dest, m_pLookTarget->Get_WorldPostion());
+ }
+ }
+
+ if (true == m_bEnable_FollowLerp) {
+ m_vFollowLerpTime.x += fTimeDelta;
+ if (m_vFollowLerpTime.y <= m_vFollowLerpTime.x) {
+ m_vFollowLerpTime.x = 0.f;
+ m_bEnable_FollowLerp = false;
+ XMStoreFloat3(&m_vFollowPos_Src, m_pTransformCom->Get_State(STATE::POSITION));
+ XMStoreFloat3(&m_vFollowPos_Dest, m_pFollowTarget->Get_WorldPostion());
+ }
+ }
+}
+
+void CCamera_Gaze::Enable_FollowLerp()
+{
+ m_bEnable_FollowLerp = true;
+ m_vFollowLerpTime.x = 0.f;
+ XMStoreFloat3(&m_vFollowPos_Src, 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());
+}
+
+void CCamera_Gaze::Toggle_Priority()
+{
+ if (m_iPriority == 99) {
+ m_iPriority = 51;
+ }
+ else {
+ m_iPriority = 99;
+ m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, false);
+ }
}
void CCamera_Gaze::Late_Update(_float fTimeDelta)
{
+ if (false == m_bActive) {
+ return;
+ }
}
-
HRESULT CCamera_Gaze::Render()
{
return S_OK;
}
-
HRESULT CCamera_Gaze::Initialize_Prototype()
{
return S_OK;
}
-
HRESULT CCamera_Gaze::Initialize(void* pArg)
{
@@ -52,7 +129,6 @@ HRESULT CCamera_Gaze::Initialize(void* pArg)
return S_OK;
}
-
HRESULT CCamera_Gaze::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
@@ -61,12 +137,10 @@ HRESULT CCamera_Gaze::Ready_Components(void* pArg)
return S_OK;
}
-
HRESULT CCamera_Gaze::Bind_ShaderResources()
{
return S_OK;
}
-
CCamera_Gaze* CCamera_Gaze::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CCamera_Gaze* pInstance = new CCamera_Gaze(pDevice, pContext);
@@ -78,7 +152,6 @@ CCamera_Gaze* CCamera_Gaze::Create(ID3D11Device* pDevice, ID3D11DeviceContext* p
return pInstance;
}
-
CGameObject* CCamera_Gaze::Clone(void* pArg, CGameObject* pOwner)
{
CCamera_Gaze* pInstance = new CCamera_Gaze(*this);
@@ -91,13 +164,35 @@ CGameObject* CCamera_Gaze::Clone(void* pArg, CGameObject* pOwner)
return pInstance;
}
-
void CCamera_Gaze::Free()
{
__super::Free();
}
-
void CCamera_Gaze::Describe_Entity()
{
+ GUI::Begin("Camera_Gaze_Describe");
+ m_pTransformCom->Describe_Entity();
+ GUI::Text("LOOK_SRC %.2f, %.2f, %.2f", m_vLookPos_Src.x, m_vLookPos_Src.y, m_vLookPos_Src.z);
+ GUI::Text("LOOK_DST %.2f, %.2f, %.2f", m_vLookPos_Dest.x, m_vLookPos_Dest.y, m_vLookPos_Dest.z);
+ GUI::Text("FOLLOW_SRC %.2f, %.2f, %.2f", m_vFollowPos_Src.x, m_vFollowPos_Src.y, m_vFollowPos_Src.z);
+ GUI::Text("FOLLOW_DST %.2f, %.2f, %.2f", m_vFollowPos_Dest.x, m_vFollowPos_Dest.y, m_vFollowPos_Dest.z);
+ GUI::Checkbox("TransitionLerp", &m_bEnable_TransitionLerp);
+ if (true == m_bEnable_TransitionLerp) {
+ GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vTransitionTime.x, m_vTransitionTime.y);
+ GUI::SliderFloat("TranslationTime", &m_vTransitionTime.y, 0.1f, 3.f, "%.1f");
+ }
+ GUI::Checkbox("LookLerp", &m_bEnable_LookLerp);
+ if (true == m_bEnable_LookLerp) {
+ GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vLookLerpTime.x, m_vLookLerpTime.y);
+ GUI::SliderFloat("LookTime", &m_vLookLerpTime.y, 0.1f, 3.f, "%.1f");
+ }
+
+ GUI::Checkbox("FollowLerp", &m_bEnable_FollowLerp);
+ if (true == m_bEnable_FollowLerp) {
+ GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vFollowLerpTime.x, m_vFollowLerpTime.y);
+ GUI::SliderFloat("FollowTime", &m_vFollowLerpTime.y, 0.1f, 3.f, "%.1f");
+ }
+
+ GUI::End();
}
diff --git a/Jusin154_Team3D/Editor/Private/DummyObject.cpp b/Jusin154_Team3D/Editor/Private/DummyObject.cpp
index 72c59ab06..7f3568f40 100644
--- a/Jusin154_Team3D/Editor/Private/DummyObject.cpp
+++ b/Jusin154_Team3D/Editor/Private/DummyObject.cpp
@@ -2,7 +2,7 @@
#include "DummyObject.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
CDummyObject::CDummyObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CUnit(pDevice, pContext)
@@ -44,11 +44,7 @@ void CDummyObject::Priority_Update(_float fTimeDelta)
void CDummyObject::Update(_float fTimeDelta)
{
- m_pModelCom->ComputeAnimation();
-
m_pModelCom->Play_Animation(fTimeDelta,m_pTransformCom);
-
-
}
void CDummyObject::Late_Update(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Editor/Private/DummySkyBox.cpp b/Jusin154_Team3D/Editor/Private/DummySkyBox.cpp
index 32e8b87dc..f31cebd48 100644
--- a/Jusin154_Team3D/Editor/Private/DummySkyBox.cpp
+++ b/Jusin154_Team3D/Editor/Private/DummySkyBox.cpp
@@ -2,7 +2,7 @@
#include "DummySkyBox.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Layer.h"
#include "Camera_Gaze.h"
@@ -40,9 +40,7 @@ void CDummySkyBox::Priority_Update(_float fTimeDelta)
void CDummySkyBox::Update(_float fTimeDelta)
{
-#ifdef gimch
- m_pTransformCom->Set_State(STATE::POSITION, m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_CAMERA)->Get_Object()->Get_WorldPostion());
-#endif // !기무리
+ m_pTransformCom->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition());
}
void CDummySkyBox::Late_Update(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp
index 9983ecb9b..a7c386903 100644
--- a/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp
+++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp
@@ -2,7 +2,9 @@
#include "Dummy_PhysXPlayable.h"
#include "Dummy_PhysXEffectHitBox.h"
#include "GameInstance.h"
+
#include "NomalJap.h"
+#include "Bombard.h"
#include "TrailObject.h"
@@ -54,7 +56,7 @@ void CDummy_PhysXPlayable::Update(_float fTimeDelta)
}
if (m_pGameInstance->Key_Up(DIK_O)) {
{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) {
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) {
assert(false);
return;
}
@@ -115,15 +117,6 @@ HRESULT CDummy_PhysXPlayable::Initialize(void* pArg)
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
- CPartObject::PARTOBJECT_DESC PartsDesc{};
-
- PartsDesc.pParentTransform = m_pTransformCom;
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, &PartsDesc, this))) {
- assert(false);
- return E_FAIL;
- }
-
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp
index 1cd833c01..21b96d88e 100644
--- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp
+++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp
@@ -41,8 +41,8 @@ void CEditEffect::Priority_Update(_float fTimeDelta)
void CEditEffect::Update(_float fTimeDelta)
{
- //if (m_bVisible == false)
- // return;
+ if (m_bVisible == false)
+ return;
if (m_pInstance_ModelCom == nullptr)
return;
@@ -70,6 +70,9 @@ void CEditEffect::Late_Update(_float fTimeDelta)
m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this);
}
+ if (m_EffectInfo.isOnlyBlur == true)
+ return;
+
m_pGameInstance->Add_RenderGroup(RENDER::EFFECT, this);
}
@@ -383,14 +386,21 @@ void CEditEffect::Describe_Entity()
const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" };
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" , "UI" };
+ const char* pEffectType[] = { "EFFECT" , "TRAIL" };
_int iCurrentItem = static_cast<_int>(m_EffectInfo.eRenderOrder);
+ _int iCurrentType = static_cast<_int>(m_EffectInfo.eEffectType);
if (ImGui::Combo("Render Order", &iCurrentItem, pRenderNames, ENUM_CLASS(RENDER::END)))
{
m_EffectInfo.eRenderOrder = static_cast(iCurrentItem);
}
-
+
+ if (ImGui::Combo("Effect Type", &iCurrentType, pEffectType, ENUM_CLASS(EFFECT_TYPE::END)))
+ {
+ m_EffectInfo.eEffectType = static_cast(iCurrentType);
+ }
+
GUI::Checkbox("Visible", &m_bVisible);
m_pTransformCom->Describe_Entity();
@@ -417,10 +427,11 @@ void CEditEffect::Describe_Entity()
if (GUI::TreeNode("BLUR"))
{
GUI::Checkbox("Blur", &m_EffectInfo.isBlur);
+ GUI::Checkbox("OnlyBlur", &m_EffectInfo.isOnlyBlur);
ImGui::PushItemWidth(80);
GUI::DragFloat("BlurIntensity", &m_EffectInfo.fBlurIntensity, 0.005f, 0.f, 1.f);
- GUI::DragInt("BlurWeight", &m_EffectInfo.iBlurWeight, 1.f, 0, 32);
+ GUI::DragInt("BlurWeight", &m_EffectInfo.iBlurWeight, 2.f, 0, 128);
ImGui::PopItemWidth();
@@ -733,19 +744,19 @@ void CEditEffect::Describe_Entity()
GUI::TreePop();
}
- ImGui::Begin("Simple Plot");
+ //ImGui::Begin("Simple Plot");
- ImGui::PlotLines("Value", m_ValueVector.data(), (int)m_ValueVector.size(), 0, nullptr, FLT_MAX, FLT_MAX, ImVec2(0, 100));
+ //ImGui::PlotLines("Value", m_ValueVector.data(), (int)m_ValueVector.size(), 0, nullptr, FLT_MAX, FLT_MAX, ImVec2(0, 100));
- GUI::InputFloat("InputValue", &m_fInputValue);
+ //GUI::InputFloat("InputValue", &m_fInputValue);
- if (GUI::Button("AddValue"))
- {
- m_ValueVector.push_back(m_fInputValue);
- }
+ //if (GUI::Button("AddValue"))
+ //{
+ // m_ValueVector.push_back(m_fInputValue);
+ //}
- ImGui::End();
+ //ImGui::End();
}
diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp
index 060dcbd5f..51a97f3be 100644
--- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp
+++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp
@@ -8,7 +8,8 @@ CEffectObject::CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContex
}
CEffectObject::CEffectObject(const CEffectObject& rhs)
- :CPartObject(rhs)
+ :CPartObject(rhs),
+ m_strPath(rhs.m_strPath)
{
}
@@ -117,7 +118,9 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
SAFE_RELEASE(m_pLightCom);
_string strPerfectFilePath = pFilePath;
-
+
+ m_strPath = strPerfectFilePath;
+
strPerfectFilePath += ".bin";
HANDLE hFile = CreateFileW(
@@ -137,7 +140,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
}
// 나중에 패키징할때 패스를 저장할거임
- m_strPath = strPerfectFilePath;
+
DWORD dwByte(0);
@@ -382,6 +385,17 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
+ return S_OK;
+}
+
+HRESULT CEffectObject::Load()
+{
+
+ if (FAILED(Load(m_strPath.c_str(), static_cast(NEXT_LEVEL))))
+ return E_FAIL;
+
+
+
return S_OK;
}
@@ -695,6 +709,12 @@ HRESULT CEffectObject::Bind_ShaderResources()
return E_FAIL;
}
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isEmissiveDissolveReverse", &m_EffectInfo.isEmissiveDissolveReverse, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
+
+
if (FAILED(m_pShaderCom->Bind_RawValue("g_vColor", &m_EffectInfo.vColor, sizeof(_float4)))) {
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp
index 1cb0fe226..858163a37 100644
--- a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp
+++ b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp
@@ -198,7 +198,11 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
return E_FAIL;
}
- pEditEffect->Load(strPath.c_str(), LEVEL::EFFECT);
+ if (FAILED(pEditEffect->Load(strPath.c_str(), LEVEL::EFFECT)))
+ {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
SAFE_RELEASE(pEditEffect);
@@ -235,6 +239,66 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
return S_OK;
}
+HRESULT CEffect_Container::Load_Directory(const _char* pPath)
+{
+
+ for (const auto& file : filesystem::directory_iterator(pPath))
+ {
+ if (file.is_directory())
+ continue;
+
+ string ext = file.path().extension().string();
+
+ if (strcmp(ext.c_str(), ".bin"))
+ continue;
+
+ _char szFilePath[MAX_PATH] = {};
+
+ strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str());
+
+
+ /////////////////////////////
+
+ CEditEffect* pEditEffect = nullptr;
+
+ CPartObject::PARTOBJECT_DESC PartsDesc{};
+
+ PartsDesc.pParentTransform = m_pTransformCom;
+
+
+
+
+ /*이펙트 껍데기 생성*/
+
+ _wstring wstrFileName = file.path().stem().wstring(); //이름 넣기
+
+ if (FAILED(Add_PartObject(CMyTools::ToString(wstrFileName), NEXT_LEVEL, &pEditEffect, &PartsDesc))) {
+ assert(false);
+ return E_FAIL;
+ }
+
+
+ /*이펙트 로드 로드*/
+ size_t iPos = {};
+ _string strFilePath = szFilePath;
+
+ while ((iPos = strFilePath.find(".bin")) != std::string::npos) {
+ strFilePath.erase(iPos, 4);
+ };
+
+
+ if (FAILED(pEditEffect->Load(strFilePath.c_str(), LEVEL::EFFECT)))
+ {
+ Safe_Release(pEditEffect);
+ continue;
+ }
+
+ Safe_Release(pEditEffect);
+ }
+
+ return S_OK;
+}
+
HRESULT CEffect_Container::Ready_Components(void* pArg)
{
CTransform::TRANSFORM_DESC TransformDesc = {};
diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp
index 2d06336bb..c46d9ebf3 100644
--- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp
+++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp
@@ -520,7 +520,7 @@ void CEffect_Editor::Describe_Entity()
if( nullptr != dynamic_cast(pPartObject.second))
strName = "TrailObject" + to_string(iIndex);
else
- strName = "EffectObject" + to_string(iIndex);
+ strName = pPartObject.first;
if (GUI::TreeNode(strName.c_str()))
{
@@ -632,12 +632,12 @@ void CEffect_Editor::Describe_Entity()
GUI::SameLine();
- if (GUI::Button("LOAD PACKAGE"))
+ if (GUI::Button("LOAD DIRECTORY"))
{
- if (SUCCEEDED(Load_Package(m_strPackageSavePath.c_str())))
+ if (SUCCEEDED(Load_Directory(m_strPackageSavePath.c_str())))
{
- MessageBox(NULL, L"패키징 로드 성공", L"System Message", MB_OK);
+ MessageBox(NULL, L"파일 로드 성공", L"System Message", MB_OK);
}
}
diff --git a/Jusin154_Team3D/Editor/Private/Goblin.cpp b/Jusin154_Team3D/Editor/Private/Goblin.cpp
index a520dae57..b7b8bb047 100644
--- a/Jusin154_Team3D/Editor/Private/Goblin.cpp
+++ b/Jusin154_Team3D/Editor/Private/Goblin.cpp
@@ -40,8 +40,6 @@ void CGoblin::Priority_Update(_float fTimeDelta)
void CGoblin::Update(_float fTimeDelta)
{
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
-
- m_pModelCom->ComputeAnimation();
}
void CGoblin::Late_Update(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Editor/Private/HpBarBG.cpp b/Jusin154_Team3D/Editor/Private/HpBarBG.cpp
index 453d3da78..886d6c437 100644
--- a/Jusin154_Team3D/Editor/Private/HpBarBG.cpp
+++ b/Jusin154_Team3D/Editor/Private/HpBarBG.cpp
@@ -45,6 +45,7 @@ HRESULT CHpBarBG::Initialize(void* pArg)
m_fCurrentHp = m_fMaxHp;
m_fMoveSpeed = 5.f;
m_fHpBG = _float2(0, m_fSizeX);
+ SizeUpX(210.f);
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Level_BloomViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_BloomViewer.cpp
index 589c479d3..3e404ddd6 100644
--- a/Jusin154_Team3D/Editor/Private/Level_BloomViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_BloomViewer.cpp
@@ -1,7 +1,7 @@
#include "pch.h"
#include "Level_BloomViewer.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Dummy_Cube.h"
#include "Dummy_Globe.h"
#include "MainLight.h"
@@ -91,21 +91,28 @@ HRESULT CLevel_BloomViewer::Render()
HRESULT CLevel_BloomViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
{
- CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
- CameraDesc.fFovy = XMConvertToRadians(60.0f);
- CameraDesc.fNear = 0.1f;
- CameraDesc.fFar = 500.f;
- CameraDesc.vEye = _float3(0.f, 10.f, -10.f);
- CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
- CameraDesc.fSpeedPerSec = 5.f;
- CameraDesc.pCameraKey = TEXT("Debug_Camera");
- CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
- CameraDesc.fMouseSensor = 0.1f;
+ CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
+ Camera_Desc.fFovy = XMConvertToRadians(60.0f);
+ Camera_Desc.fNear = 0.1f;
+ Camera_Desc.fFar = 200.f;
+ Camera_Desc.vEye = _float3(0.f, 10.f, -10.f);
+ Camera_Desc.vAt = _float3(0.f, 0.f, 0.f);
+ Camera_Desc.fSpeedPerSec = 5.f;
+ Camera_Desc.pCameraKey = CAMERA_DEBUG;
+ Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
+ Camera_Desc.fMouseSensor = 0.1f;
+ Camera_Desc.iPriority = 70;
+ Camera_Desc.pFollowTarget = { nullptr };
+ Camera_Desc.pLookTarget = { nullptr };
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL,
- strLayerTag, &CameraDesc)))
+ CCamera_Debug* pCamera = { nullptr };
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))) {
return E_FAIL;
-
+ }
+ m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG);
+ if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
index 61f00c69d..a25a3e5d9 100644
--- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
@@ -2,7 +2,7 @@
#include "Level_EffectViewer.h"
#include "GameInstance.h"
#include "Level_Loading.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "TestEffect.h"
#include "Effect_Editor.h"
#include "Dummy_Cube.h"
@@ -72,21 +72,28 @@ HRESULT CLevel_EffectViewer::Render()
HRESULT CLevel_EffectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
{
- CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
- CameraDesc.fFovy = XMConvertToRadians(60.0f);
- CameraDesc.fNear = 0.1f;
- CameraDesc.fFar = 500.f;
- CameraDesc.vEye = _float3(0.f, 10.f, -10.f);
- CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
- CameraDesc.fSpeedPerSec = 5.f;
- CameraDesc.pCameraKey = TEXT("Debug_Camera");
- CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
- CameraDesc.fMouseSensor = 0.1f;
+ CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
+ Camera_Desc.fFovy = XMConvertToRadians(60.0f);
+ Camera_Desc.fNear = 0.1f;
+ Camera_Desc.fFar = 200.f;
+ Camera_Desc.vEye = _float3(0.f, 10.f, -10.f);
+ Camera_Desc.vAt = _float3(0.f, 0.f, 0.f);
+ Camera_Desc.fSpeedPerSec = 5.f;
+ Camera_Desc.pCameraKey = CAMERA_DEBUG;
+ Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
+ Camera_Desc.fMouseSensor = 0.1f;
+ Camera_Desc.iPriority = 70;
+ Camera_Desc.pFollowTarget = { nullptr };
+ Camera_Desc.pLookTarget = { nullptr };
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL,
- strLayerTag, &CameraDesc)))
+ CCamera_Debug* pCamera = { nullptr };
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))) {
return E_FAIL;
-
+ }
+ m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG);
+ if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp
index e7ad90e29..3db4df98b 100644
--- a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp
@@ -3,7 +3,7 @@
#include "GameInstance.h"
#include "Level_Loading.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Terrain.h"
#include "MapObject_Manager.h"
#include "BuildingContainer.h"
@@ -68,22 +68,28 @@ HRESULT CLevel_MapViewer::Ready_Layer_Light()
HRESULT CLevel_MapViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
{
- CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
- CameraDesc.fFovy = XMConvertToRadians(60.0f);
- CameraDesc.fNear = 0.1f;
- CameraDesc.fFar = 500.f;
- CameraDesc.vEye = _float3(0.f, 10.f, -10.f);
- CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
- CameraDesc.fSpeedPerSec = 5.f;
- CameraDesc.pCameraKey = TEXT("Debug_Camera");
- CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
- CameraDesc.fMouseSensor = 0.1f;
+ CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
+ Camera_Desc.fFovy = XMConvertToRadians(60.0f);
+ Camera_Desc.fNear = 0.1f;
+ Camera_Desc.fFar = 200.f;
+ Camera_Desc.vEye = _float3(0.f, 10.f, -10.f);
+ Camera_Desc.vAt = _float3(0.f, 0.f, 0.f);
+ Camera_Desc.fSpeedPerSec = 5.f;
+ Camera_Desc.pCameraKey = CAMERA_DEBUG;
+ Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
+ Camera_Desc.fMouseSensor = 0.1f;
+ Camera_Desc.iPriority = 70;
+ Camera_Desc.pFollowTarget = { nullptr };
+ Camera_Desc.pLookTarget = { nullptr };
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL,
- strLayerTag, &CameraDesc)))
+ CCamera_Debug* pCamera = { nullptr };
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))) {
return E_FAIL;
-
-
+ }
+ m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG);
+ if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp
index 2d1795709..89cbf3237 100644
--- a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp
@@ -7,7 +7,7 @@
#include "Head.h"
#include "Hair.h"
#include "Dummy_Cube.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Layer.h"
#include "GameObject.h"
#include "DummyObject.h"
@@ -58,7 +58,11 @@ void CLevel_ObjectViewer::Update(_float fTimeDelta)
Find_Anim();
- //m_Test->Describe_Entity();
+ if (m_Test)
+ {
+ m_Test->Describe_Entity();
+ }
+
}
HRESULT CLevel_ObjectViewer::Render()
@@ -658,20 +662,28 @@ void CLevel_ObjectViewer::Find_Anim()
HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
{
- CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
- CameraDesc.fFovy = XMConvertToRadians(60.0f);
- CameraDesc.fNear = 0.1f;
- CameraDesc.fFar = 500.f;
- CameraDesc.vEye = _float3(0.f, 5.f, -5.f);
- CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
- CameraDesc.fSpeedPerSec = 5.f;
- CameraDesc.pCameraKey = TEXT("Debug_Camera");
- CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
- CameraDesc.fMouseSensor = 0.1f;
+ CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
+ Camera_Desc.fFovy = XMConvertToRadians(60.0f);
+ Camera_Desc.fNear = 0.1f;
+ Camera_Desc.fFar = 200.f;
+ Camera_Desc.vEye = _float3(0.f, 10.f, -10.f);
+ Camera_Desc.vAt = _float3(0.f, 0.f, 0.f);
+ Camera_Desc.fSpeedPerSec = 5.f;
+ Camera_Desc.pCameraKey = CAMERA_DEBUG;
+ Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
+ Camera_Desc.fMouseSensor = 0.1f;
+ Camera_Desc.iPriority = 70;
+ Camera_Desc.pFollowTarget = { nullptr };
+ Camera_Desc.pLookTarget = { nullptr };
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL,
- strLayerTag, &CameraDesc)))
+ CCamera_Debug* pCamera = { nullptr };
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))) {
return E_FAIL;
+ }
+ m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG);
+ if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) {
+ return E_FAIL;
+ }
return S_OK;
}
@@ -702,8 +714,8 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag)
- //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
- // return E_FAIL;
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
+ return E_FAIL;
/*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
return E_FAIL;*/
diff --git a/Jusin154_Team3D/Editor/Private/Level_PhysXLab.cpp b/Jusin154_Team3D/Editor/Private/Level_PhysXLab.cpp
index 5312c8fe2..26291d98c 100644
--- a/Jusin154_Team3D/Editor/Private/Level_PhysXLab.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_PhysXLab.cpp
@@ -3,7 +3,7 @@
#include "GameInstance.h"
#include "Level_Loading.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Terrain.h"
#include "Dummy_PhysXBox.h"
#include "Dummy_PhysXPlayable.h"
@@ -62,21 +62,28 @@ HRESULT CLevel_PhysXLab::Ready_Layer_Light()
HRESULT CLevel_PhysXLab::Ready_Layer_Camera(const _wstring& strLayerTag)
{
- CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
- CameraDesc.fFovy = XMConvertToRadians(60.0f);
- CameraDesc.fNear = 0.1f;
- CameraDesc.fFar = 100.f;
- CameraDesc.vEye = _float3(0.f, 10.f, -10.f);
- CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
- CameraDesc.fSpeedPerSec = 2.f;
- CameraDesc.pCameraKey = TEXT("Debug_Camera");
- CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
- CameraDesc.fMouseSensor = 0.1f;
+ CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
+ Camera_Desc.fFovy = XMConvertToRadians(60.0f);
+ Camera_Desc.fNear = 0.1f;
+ Camera_Desc.fFar = 200.f;
+ Camera_Desc.vEye = _float3(0.f, 10.f, -10.f);
+ Camera_Desc.vAt = _float3(0.f, 0.f, 0.f);
+ Camera_Desc.fSpeedPerSec = 5.f;
+ Camera_Desc.pCameraKey = CAMERA_DEBUG;
+ Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
+ Camera_Desc.fMouseSensor = 0.1f;
+ Camera_Desc.iPriority = 70;
+ Camera_Desc.pFollowTarget = { nullptr };
+ Camera_Desc.pLookTarget = { nullptr };
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL,
- strLayerTag, &CameraDesc)))
+ CCamera_Debug* pCamera = { nullptr };
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))) {
return E_FAIL;
-
+ }
+ m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG);
+ if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) {
+ return E_FAIL;
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 0b7430985..b41ab4dd0 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -4,7 +4,7 @@
#pragma region DEFAULT_HEADER
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "DummyRect.h"
#include "MainApp.h"
#include "Dummy_Cube.h"
@@ -25,7 +25,9 @@
#include "Broom.h"
#include
#include "Camera_Gaze.h"
-#include "CamPosition_Player.h"
+#include "CamPosition_Socket.h"
+#include "CamPosition_Target.h"
+#include "CamPosition_Shoulder.h"
#include "CamPosition_Arm.h"
#include "Wand.h"
@@ -58,6 +60,8 @@
#include "Spell_Overlay.h"
#include "Slot_Number.h"
#include "HpBarBG.h"
+#include "Potion.h"
+#include "Magic_Meter.h"
#include "IMGUIUI.h"
@@ -85,6 +89,7 @@
#include "Dummy_Plane.h"
#include "TrailObject.h"
#include "NomalJap.h"
+#include "Bombard.h"
#pragma endregion
@@ -254,7 +259,7 @@ HRESULT CLoader::Loading_For_Logo()
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDebugCamera::Create(m_pDevice, m_pContext)))) {
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamera_Debug::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
@@ -397,6 +402,22 @@ HRESULT CLoader::Loading_For_UI()
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+
+ });
+
+ Asset_FileLoad("../Bin/Resources/Textures/Potions", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
+ {
+
+ _string strFilePath = pFilePath;
+ _wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
+
+
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
return E_FAIL;
@@ -426,6 +447,24 @@ HRESULT CLoader::Loading_For_UI()
return E_FAIL;
}
+ CVIBuffer_UI_Instance::UI_INSTANCE_DESC Magic_MeterDesc{};
+
+ Magic_MeterDesc.iNum = 5;
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Magic_Meter_UI_Instance"),
+ CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Magic_MeterDesc)))) {
+ return E_FAIL;
+ }
+
+ CVIBuffer_UI_Instance::UI_INSTANCE_DESC Spell_Slot_PreviewDesc{};
+
+ Spell_Slot_PreviewDesc.iNum = 5;
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Spell_Slot_Previe_UI_Instance"),
+ CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Spell_Slot_PreviewDesc)))) {
+ return E_FAIL;
+ }
+
m_strMessage = TEXT("Shader Loading..");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIEDITOR,
@@ -530,6 +569,14 @@ HRESULT CLoader::Loading_For_UI()
{
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CPotion::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMagic_Meter::Create(m_pDevice, m_pContext))))
+ {
+ return E_FAIL;
+ }
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext))))
{
@@ -733,10 +780,9 @@ HRESULT CLoader::Loading_For_Effect()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_PhysXWall::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CDebugCamera::Create(m_pDevice, m_pContext)))) {
+ if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CEditEffect::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
-
if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CTestEffect::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
@@ -745,10 +791,6 @@ HRESULT CLoader::Loading_For_Effect()
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CEditEffect::Create(m_pDevice, m_pContext)))) {
- return E_FAIL;
- }
-
if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CDummy_Plane::Create(m_pDevice, m_pContext))))
return E_FAIL;
@@ -768,7 +810,9 @@ HRESULT CLoader::Loading_For_Effect()
if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CDummy_Cube::Create(m_pDevice, m_pContext))))
return E_FAIL;
-
+ if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CBombard::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
m_strMessage = TEXT("Loading Success!");
@@ -1244,6 +1288,32 @@ HRESULT CLoader::Loading_For_ObjectViewer()
m_strMessage = TEXT("Model Loading..");
+ // Heavy Wall
+ CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
+ {
+ Desc.eType = ACTOR::BOX;
+ Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ };
+ Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
+ Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
+ Desc.vMatInfo = { 0.5f, 0.5f, 0.6f };
+ Desc.fContactOffset = { 0.05f };
+ Desc.vhalfGeometryInfo = { 2.5f, 4.5f, 3.5f };
+ Desc.fDensity = 10.f;
+ Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
+ Desc.eLockFlag = {};
+ Desc.vAutoDamping = { 100.f, 100.f };
+ }
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
vector*>> futures = {};
#pragma region BODY
@@ -1320,7 +1390,7 @@ HRESULT CLoader::Loading_For_ObjectViewer()
#pragma region MONSTER
futures.emplace_back(Deferred_ModelLoad(
- MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
+ MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_Goblin_Model")
));
futures.emplace_back(Deferred_ModelLoad(
@@ -1343,7 +1413,7 @@ HRESULT CLoader::Loading_For_ObjectViewer()
TEXT("Prototype_Component_Npc_Model")
));
futures.emplace_back(Deferred_ModelLoad(
- MODEL::NONANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
+ MODEL::NONANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(),
TEXT("Prototype_Component_Wand_Model")
));
futures.emplace_back(Deferred_ModelLoad(
@@ -1427,7 +1497,15 @@ HRESULT CLoader::Loading_For_ObjectViewer()
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Player */
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Player::Create(m_pDevice, m_pContext))))
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Socket::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
+ /* For.Prototype_GameObject_CamPosition_Shoulder */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Shoulder::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
+ /* For.Prototype_GameObject_CamPosition_Target */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Target::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Arm */
@@ -2005,7 +2083,7 @@ vector*> Contents(iLoadCount);
}
}
-#endif
+
m_strMessage = TEXT("쉐이더를(을) 로딩 중 입니다.");
@@ -2074,7 +2152,7 @@ vector*> Contents(iLoadCount);
}
Safe_Delete(Contents[i]);
}
-
+#endif
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Magic_Meter.cpp b/Jusin154_Team3D/Editor/Private/Magic_Meter.cpp
new file mode 100644
index 000000000..b9a3acdff
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Magic_Meter.cpp
@@ -0,0 +1,293 @@
+#include "pch.h"
+#include "Magic_Meter.h"
+#include "GameInstance.h"
+
+CMagic_Meter::CMagic_Meter(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CMagic_Meter::CMagic_Meter(const CMagic_Meter& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CMagic_Meter::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CMagic_Meter::Initialize(void* pArg)
+{
+
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 130.f;
+ Desc.fY = 145.f;
+ Desc.fSizeX = 80.f;
+ Desc.fSizeY = 20.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fAlpha = 1.f;
+ m_fTimeMult = 3.f;
+ m_fAngle = XMConvertToRadians(45);
+ m_fAlphaTime = 1.f;
+ m_iCols = 5;
+ UV();
+ m_pVIBufferCom->Set_Cloned(true);
+ m_pVIBufferCom->Set_Pos(0.f, 0.f, -65.f, m_fSizeY, m_iCols);
+ m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
+ m_pVIBufferCom->Set_ImageUV(pUVDesc);
+ return S_OK;
+}
+
+void CMagic_Meter::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CMagic_Meter::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+
+void CMagic_Meter::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible)
+ {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ }
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CMagic_Meter::Render()
+{
+ if (FAILED(Bind_ShaderResources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::MAGIC_METER))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render()))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+
+_vector CMagic_Meter::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+void CMagic_Meter::UV()
+{
+ pUVDesc[0].fUVStart = Compute_UVX(1);
+ pUVDesc[0].fUVEnd = Compute_UVY(1);
+ pUVDesc[1].fUVStart = Compute_UVX(2);
+ pUVDesc[1].fUVEnd = Compute_UVY(2);
+ pUVDesc[2].fUVStart = Compute_UVX(2);
+ pUVDesc[2].fUVEnd = Compute_UVY(2);
+ pUVDesc[3].fUVStart = Compute_UVX(2);
+ pUVDesc[3].fUVEnd = Compute_UVY(2);
+ pUVDesc[4].fUVStart = Compute_UVX(0);
+ pUVDesc[4].fUVEnd = Compute_UVY(0);
+}
+
+_float2 CMagic_Meter::Compute_UVX(_uint Number)
+{
+ m_fIamge_Size = { 128, 96 };
+
+ _uint iXCount = 1;
+ _uint iYCount = 3;
+
+ _float frameWidth = 128.f;
+ _float frameHeight = 32.f;
+
+ _uint frameX = Number % iXCount;
+ _uint frameY = Number / iXCount;
+
+ _float2 UVStart;
+ UVStart.x = frameX * frameWidth / m_fIamge_Size.x;
+ UVStart.y = frameY * frameHeight / m_fIamge_Size.y;
+
+ return UVStart;
+}
+
+_float2 CMagic_Meter::Compute_UVY(_uint Number)
+{
+ m_fIamge_Size = { 320.f, 128.f };
+
+ _float frameWidth = 128.f;
+ _float frameHeight = 32.f;
+
+ // Start 구함
+ _float2 UVStart = Compute_UVX(Number);
+
+ _float2 UVEnd;
+ UVEnd.x = UVStart.x + (frameWidth / m_fIamge_Size.x);
+ UVEnd.y = UVStart.y + (frameHeight / m_fIamge_Size.y);
+
+ return UVEnd;
+}
+
+HRESULT CMagic_Meter::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
+ {
+ 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_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CMagic_Meter::Ready_Components(void* pArg)
+{
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Magic_Meter_UI_Instance"), (CComponent**)&m_pVIBufferCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_FinisherMeterOutline"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_HealthMeterFill"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+
+CMagic_Meter* CMagic_Meter::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CMagic_Meter* pInstance = new CMagic_Meter(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CMagic_Meter");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CMagic_Meter::Clone(void* pArg, CGameObject* pOwner)
+{
+ CMagic_Meter* pInstance = new CMagic_Meter(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Slot");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CMagic_Meter::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pDiffuse_TextureCom1);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CMagic_Meter::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/MainLight.cpp b/Jusin154_Team3D/Editor/Private/MainLight.cpp
index 6d2c5fb53..a950ae69a 100644
--- a/Jusin154_Team3D/Editor/Private/MainLight.cpp
+++ b/Jusin154_Team3D/Editor/Private/MainLight.cpp
@@ -2,7 +2,7 @@
#include "MainLight.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
CMainLight::CMainLight(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject(pDevice, pContext)
diff --git a/Jusin154_Team3D/Editor/Private/MapObject.cpp b/Jusin154_Team3D/Editor/Private/MapObject.cpp
index cde869e7c..04cd1fb82 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject.cpp
@@ -2,7 +2,7 @@
#include "MapObject.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Layer.h"
#include "Terrain.h"
#include "VIBuffer_Terrain.h"
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp
index 7a12417b6..a78565a65 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp
@@ -2,7 +2,7 @@
#include "MapObject_Collision.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Layer.h"
#include "Terrain.h"
#include "VIBuffer_Terrain.h"
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp b/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp
index 5611c81d2..25e139117 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp
@@ -2,7 +2,7 @@
#include "MapObject_LOD.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Layer.h"
#include "Terrain.h"
#include "VIBuffer_Terrain.h"
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
index 96ca17ab4..4e19e6197 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
@@ -2,7 +2,7 @@
#include "MapObject_Manager.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "Layer.h"
#include "MapObject.h"
#include "MapObject_LOD.h"
diff --git a/Jusin154_Team3D/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp
index bfd2c7aec..26df46f54 100644
--- a/Jusin154_Team3D/Editor/Private/Player.cpp
+++ b/Jusin154_Team3D/Editor/Private/Player.cpp
@@ -2,13 +2,16 @@
#include "Player.h"
#include "GameInstance.h"
-#include "CamPosition_Player.h"
+#include "CamPosition_Socket.h"
#include "Camera_Gaze.h"
#include "CamPosition_Arm.h"
#include "Wand.h"
+#include "Character_Controller.h"
+#include "CallBack_Playable_Behavior.h"
+#include "CamPosition_Shoulder.h"
+#include "CallBack_Playable_HitReport.h"
#pragma region STATE
-
#include "State_Idle.h"
#include "State_Dodge.h"
#include "State_Jump.h"
@@ -17,6 +20,8 @@
#include "State_Combat.h"
#pragma endregion
+#include "Bombard.h"
+
CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CUnit(pDevice, pContext)
{
@@ -34,15 +39,17 @@ HRESULT CPlayer::Initialize_Prototype()
HRESULT CPlayer::Initialize(void* pArg)
{
- if (FAILED(__super::Initialize(pArg)))
+ if (FAILED(__super::Initialize(pArg))) {
return E_FAIL;
+ }
- if (FAILED(Ready_Components()))
+ if (FAILED(Ready_Components())) {
return E_FAIL;
+ }
-
- if (FAILED(Ready_Parts()))
+ if (FAILED(Ready_Parts())) {
return E_FAIL;
+ }
Load_KeyFrame();
@@ -50,6 +57,8 @@ HRESULT CPlayer::Initialize(void* pArg)
Set_Anim();
+ m_eSpell = STATEANIM::DESCENDO;
+
{
CFSM::FSM_DESC FSMDesc{};
FSMDesc.pStates = &m_States;
@@ -59,27 +68,39 @@ HRESULT CPlayer::Initialize(void* pArg)
m_pFSM->Change_State(FSMSTATE::IDLE);
}
+ m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
+ m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
return S_OK;
}
void CPlayer::Priority_Update(_float fTimeDelta)
{
+ m_pTransformCom->RewindMomentum();
+
__super::Priority_Update(fTimeDelta);
}
void CPlayer::Update(_float fTimeDelta)
{
- m_pModelCom->ComputeAnimation();
-
m_pFSM->Update_State(fTimeDelta);
+
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
+
+
__super::Update(fTimeDelta);
+ Describe_Entity();
+
+
+ m_pCharacter_Controller->Move(fTimeDelta);
+ TestKeyInput(fTimeDelta);
}
void CPlayer::Late_Update(_float fTimeDelta)
{
+ m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position());
+
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
__super::Late_Update(fTimeDelta);
@@ -87,6 +108,8 @@ void CPlayer::Late_Update(_float fTimeDelta)
HRESULT CPlayer::Render()
{
+ if (!m_bVisible)
+ return S_OK;
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
@@ -106,12 +129,16 @@ HRESULT CPlayer::Render()
return E_FAIL;
}
-
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
}
+#ifdef _DEBUG
+ m_pCharacter_Controller->Render();
+ //m_pRigidBody->Render();
+#endif
+
return S_OK;
}
@@ -126,19 +153,49 @@ HRESULT CPlayer::Ready_Components()
if (FAILED(__super::Ready_Components(&Desc))) {
return E_FAIL;
}
-
m_strModelPrototypeTag = TEXT("Prototype_Component_Npc_Model");
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
- reinterpret_cast(&m_pModelCom))))
+ reinterpret_cast(&m_pModelCom)))) {
return E_FAIL;
+ }
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
- reinterpret_cast(&m_pShaderCom))))
+ reinterpret_cast(&m_pShaderCom)))) {
return E_FAIL;
+ }
+
+ { // CCT
+ CCharacter_Controller::Character_Controller_DESC Desc{};
+
+ Desc.iSubKind = ENUM_CLASS(COLLIDABLEOBJECT::PLAYER);
+ Desc.pTransform = m_pTransformCom;
+ Desc.eBodyType = ACTOR::CAPSULE;
+ Desc.fContactOffset = 0.1f;
+ Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
+ Desc.bAutoStepping = { false };
+ Desc.fStepOffset = { 0.05f };
+ Desc.fRadius = 0.5f;
+ Desc.fHeight = 1.0f;
+ Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Playable_HitReport::Create();
+ Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Playable_Behavior::Create();
+ Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
+ return E_FAIL;
+ }
+ }
+
+ { // DO
+ CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
+ Desc.iSubKind = ENUM_CLASS(COLLIDABLEOBJECT::PLAYER);
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
+ return E_FAIL;
+ }
+ m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor());
+ }
return S_OK;
}
@@ -155,47 +212,20 @@ HRESULT CPlayer::Ready_Parts()
return E_FAIL;
}
- CCamPosition_Player::CAMERAPOSITION_PLAYER_DESC Desc{};
-
- Desc.pParentTransform = m_pTransformCom;
- //Desc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_HeadCamera");
-
- if (FAILED(Add_PartObject("Cam_TopDown_Look", g_iStaticLevel, &m_pCamPosition_TopDown_LookPart, &Desc)))
{
- return E_FAIL;
+ CCamPosition_Shoulder::CAMERA_SHOULDER_DESC Desc;
+ Desc.pParentTransform = m_pTransformCom;
+ Desc.fMouseSensor = 0.5f;
+ Desc.fShoulderDistance = 2.f;
+ Desc.fBackFrontRatio = 0.9f;
+ Desc.fCameraFocalLength = 10.f;
+ Desc.vInitialLook = { 1.f, 2.f, -1.f };
+
+ if (FAILED(Add_PartObject("Cam_Shoulder_Part", g_iStaticLevel, &m_pCamPosition_ShoulderPart, &Desc))) {
+ return E_FAIL;
+ }
}
- CCamPosition_Arm::CameraArm_DESC CameraArmDesc{};
- XMStoreFloat3(&CameraArmDesc.fAt, m_pTransformCom->Get_State(STATE::POSITION));
- CameraArmDesc.pParentTransform = m_pTransformCom;
- CameraArmDesc.fEye = { 0.f, 10.f, 10.f };
- CameraArmDesc.fMouseSensor = 0.4f;
- CameraArmDesc.fDistance = 4.f;
- CameraArmDesc.pParentTransform = m_pTransformCom;
-
- if (FAILED(Add_PartObject("Cam_TopDown_Follow", g_iStaticLevel, &m_pCamPosition_TopDown_FollowPart, &CameraArmDesc))) {
- return E_FAIL;
- }
-
- CCamera_Gaze::CAMERA_GAZE_DESC CameraDesc{};
- CameraDesc.fFovy = XMConvertToRadians(60.0f);
- CameraDesc.fNear = 0.1f;
- CameraDesc.fFar = 300.f;
- CameraDesc.fSpeedPerSec = 5.f;
- CameraDesc.fRotationPerSec = XMConvertToRadians(90.f);
- CameraDesc.pFollowTarget = m_pCamPosition_TopDown_FollowPart;
- CameraDesc.pLookTarget = m_pCamPosition_TopDown_LookPart;
- CameraDesc.iPriority = 51;
-
- CCamera_Gaze* pCamera = { nullptr };
-
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &pCamera)))
- {
- return E_FAIL;
- }
-
- m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, TEXT("CAM_TOPVIEW"));
-
return S_OK;
}
@@ -215,407 +245,6 @@ HRESULT CPlayer::Bind_ShaderResources()
}
return S_OK;
}
-
-HRESULT CPlayer::InputSystem()
-{
- if (m_pGameInstance->Key_Down(DIK_1)
- || m_pGameInstance->Key_Down(DIK_2)
- || m_pGameInstance->Key_Down(DIK_3)
- || m_pGameInstance->Key_Down(DIK_4)
- || m_pGameInstance->Key_Down(DIK_5)
- || m_pGameInstance->Key_Down(DIK_6))
- {
- return S_OK;
- }
- return E_FAIL;
-}
-
-HRESULT CPlayer::InputSkill()
-{
- if (
- m_pGameInstance->Key_Down(DIK_SPACE)
- || m_pGameInstance->Key_Down(DIK_LCONTROL)
- || m_pGameInstance->Key_Down(DIK_E)
- || m_pGameInstance->Key_Down(DIK_R)
- || m_pGameInstance->Key_Down(DIK_Q)
- || m_pGameInstance->Mouse_Up(DIM_LBUTTON)
- || m_pGameInstance->Key_Down(DIK_1)
- //|| m_pGameInstance->Key_Down(DIK_C)
- //|| m_pGameInstance->Key_Down(DIK_V)
- //|| m_pGameInstance->Key_Down(DIK_T)
- //|| m_pGameInstance->Key_Down(DIK_G)
- //|| m_pGameInstance->Key_Down(DIK_B)
- )
- {
- return S_OK;
- }
- return E_FAIL;
-}
-
-HRESULT CPlayer::InputMove()
-{
- if (m_pGameInstance->Key_Pressing(DIK_W)
- || m_pGameInstance->Key_Pressing(DIK_A)
- || m_pGameInstance->Key_Pressing(DIK_S)
- || m_pGameInstance->Key_Pressing(DIK_D))
- {
- return S_OK;
- }
- return E_FAIL;
-}
-
-void CPlayer::Behavior_IdleEnter() {
- pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
-
- if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG|FSMSTATE::WALK)) {
- if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) {
- pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) {
- pairAnimInfo = m_Animation[STATEANIM::WALK_STOP];
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) {
- // pairAnimInfo = m_Animation[STATEANIM::spr]
- }
- }
-
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_IdleExitCheck()
-{
- // S_OK -> 현 상태 유지
- // E_FAIL -> 현 상태 탈출
- if (SUCCEEDED(InputSystem())) {
- //Event
- return S_OK;
- }
- if (SUCCEEDED(InputSkill())) {
- if (m_pGameInstance->Key_Down(DIK_SPACE)) {
- m_pFSM->Change_State(FSMSTATE::JUMP);
- }
- else if (m_pGameInstance->Key_Down(DIK_LCONTROL)) {
- m_pFSM->Change_State(FSMSTATE::DODGE);
- }
- else if (m_pGameInstance->Key_Down(DIK_E)) {
- //m_pFSM->Change_State(FSMSTATE::AAA);
- }
- else if (m_pGameInstance->Key_Down(DIK_R)) {
- //m_pFSM->Change_State(FSMSTATE::SKILL);
- }
- else if (m_pGameInstance->Key_Down(DIK_Q)) {
- //m_pFSM->Change_State(FSMSTATE::SKILL2);
- }
- else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
- //m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK);
- }
- else if (m_pGameInstance->Key_Down(DIK_1)) {
- //m_pFSM->Change_State(FSMSTATE::CAST);
- }
- return E_FAIL;
- }
- if (SUCCEEDED(InputMove())) {
- m_pFSM->Change_State(FSMSTATE::MOVE);
- return E_FAIL;
- }
- return S_OK;
-}
-
-void CPlayer::Behavior_IdleExit()
-{
- m_pFSM->Disable_State(FSMSTATE::IDLE);
-}
-
-void CPlayer::Behavior_MoveEnter()
-{
- pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::SPRINT];
- _bool bFoward = m_pGameInstance->Key_Pressing(DIK_W);
- _bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
- _bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
- _bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
-
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE | FSMSTATE::LAND | FSMSTATE::COMBAT)) {
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
- // Idle -> Move
- if (true == m_bSprintToggle) {
- m_pFSM->Enable_State(FSMSTATE::SPRINT);
-
- if (true == bFoward) {
- pairAnimInfo = m_Animation[STATEANIM::SPRINT];
- }
- else {
- // ?
- }
- }
- else if (true == m_bWalkToggle) {
- m_pFSM->Enable_State(FSMSTATE::WALK);
-
- if (true == bFoward) {
- pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
- }
- else if (true == bBackward) {
- pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
- }
- }
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::DODGE | FSMSTATE::LAND)) {
- // OtherMove -> AnotherMove
-
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::COMBAT)) {
- // Combat -> Move
-
- }
- }
- else { // While Moving
- if (true == m_bSprintToggle) {
- m_pFSM->Enable_State(FSMSTATE::SPRINT);
- pairAnimInfo = m_Animation[STATEANIM::SPRINT];
-
- }
- else if (true == m_bWalkToggle) {
- m_pFSM->Enable_State(FSMSTATE::WALK);
- if (true == bFoward) {
- pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
- }
- else if (true == bBackward){
- pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
- }
- //else if (true == bLeft){
- // pairAnimInfo = m_Animation[STATEANIM::WALK_STOP];
- //}
- //else if (true == bRight){
- // pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
- //}
- }
- }
-
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_MoveExitCheck()
-{
- if (SUCCEEDED(InputSystem())) {
- //Event
- return S_OK;
- }
- if (SUCCEEDED(InputSkill())) {
- if (m_pGameInstance->Key_Down(DIK_SPACE)) {
- m_pFSM->Change_State(FSMSTATE::JUMP);
- }
- else if (m_pGameInstance->Key_Down(DIK_LCONTROL)) {
- m_pFSM->Change_State(FSMSTATE::DODGE);
- }
- else if (m_pGameInstance->Key_Down(DIK_E)) {
- //m_pFSM->Change_State(FSMSTATE::AAA);
- }
- else if (m_pGameInstance->Key_Down(DIK_R)) {
- //m_pFSM->Change_State(FSMSTATE::SKILL);
- }
- else if (m_pGameInstance->Key_Down(DIK_Q)) {
- //m_pFSM->Change_State(FSMSTATE::SKILL2);
- }
- else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
- //m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK);
- }
- else if (m_pGameInstance->Key_Down(DIK_1)) {
- //m_pFSM->Change_State(FSMSTATE::CAST);
- }
- return E_FAIL;
- }
- if (SUCCEEDED(InputMove())) {
- return S_OK;
- }
- m_pFSM->Change_State(FSMSTATE::IDLE);
- return E_FAIL;
-}
-
-void CPlayer::Behavior_MoveExit()
-{
- m_pFSM->Disable_State(FSMSTATE::MOVE|FSMSTATE::SPRINT|FSMSTATE::JOG|FSMSTATE::WALK);
-}
-
-void CPlayer::Behavior_JumpEnter()
-{
- pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::JUMP_SPRINT];
- m_pFSM->Enable_State(FSMSTATE::JUMP);
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE|FSMSTATE::JOG|FSMSTATE::WALK)) {
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
- // Idle -> Jump
- // pairAnimInfo = Get_AnimInfo(STATEANIM::Jump_IDLE);
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) {
- pairAnimInfo = m_Animation[STATEANIM::JUMP_JOG];
- }
- else if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) {
-
- }
- }
- else {
- // Drop?
- }
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_JumpExitCheck()
-{
- if (SUCCEEDED(InputSystem())) {
- //Event
- return S_OK;
- }
- if (IsCurrentKeyFrame("Jump")) {
- m_pFSM->Change_State(FSMSTATE::LAND);
- return E_FAIL;
- }
- return S_OK;
-}
-
-void CPlayer::Behavior_JumpExit()
-{
- m_pFSM->Disable_State(FSMSTATE::JUMP);
-}
-
-void CPlayer::Behavior_LandEnter()
-{
- pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::LAND);
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_LandExitCheck()
-{
- if (SUCCEEDED(InputSystem())) {
- //Event
- //return S_OK;
- }
- if (m_pModelCom->IsFinishedAnim()){
- m_pFSM->Change_State(FSMSTATE::IDLE);
- return E_FAIL;
- } // 혹시 Land to (Jog, Sprint, Dodge) 같은 애니메이션 있으면 여기에 분기 조건 넣으면 됨
- return S_OK;
-}
-
-void CPlayer::Behavior_LandExit()
-{
- m_pFSM->Disable_State(FSMSTATE::LAND);
-}
-
-void CPlayer::Behavior_DodgeEnter()
-{
- // 혹시 @@ to Dodge 있으면 여기에
- pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::DODGE);
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
-}
-
-HRESULT CPlayer::Behavior_DodgeExitCheck()
-{
- if (SUCCEEDED(InputSystem())) {
- //Event
- //return S_OK;
- }
- if (m_pModelCom->IsFinishedAnim()){
- m_pFSM->Change_State(FSMSTATE::IDLE);
- return E_FAIL;
- }
- return S_OK;
-}
-
-void CPlayer::Behavior_DodgeExit()
-{
- m_pFSM->Disable_State(FSMSTATE::DODGE);
-}
-
-void CPlayer::Add_FSM()
-{
-#pragma region Behavior_Movement_NotFocus
- {
- CState_Idle::STATE_IDLE_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
- Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
- Desc.funcPriorityUpdate = nullptr;
- Desc.funcLateUpdate = nullptr;
- m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
- }
- {
- CState_Move::STATE_MOVE_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
- Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
- Desc.funcPriorityUpdate = nullptr;
- Desc.funcLateUpdate = nullptr;
- m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
- }
-#pragma endregion
-#pragma region Behavior_Movement_Focus
- {
- CState_Jump::STATE_JUMP_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_JumpEnter(); };
- Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_JumpExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_JumpExit(); };
- m_States.emplace(FSMSTATE::JUMP, CState_Jump::Create(&Desc));
- }
- {
- CState_Land::STATE_LAND_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_LandEnter(); };
- Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_LandExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_LandExit(); };
- m_States.emplace(FSMSTATE::LAND, CState_Land::Create(&Desc));
- }
- {
- CState_Dodge::STATE_DODGE_DESC Desc{};
- Desc.pOwner = this;
- Desc.funcEnterEvent = [this]() { Behavior_DodgeEnter(); };
- Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(); };
- Desc.funcExitEvent = [this]() { Behavior_DodgeExit(); };
- Desc.funcPriorityUpdate = nullptr;
- Desc.funcLateUpdate = nullptr;
- m_States.emplace(FSMSTATE::DODGE, CState_Dodge::Create(&Desc));
- }
-#pragma endregion
-#pragma region Behavior_Combat_NotFocus
-
-#pragma endregion
-#pragma region Behavior_Combat_Focus
-
-#pragma endregion
-
-}
-
-void CPlayer::Set_Anim()
-{
-
- m_Animation[STATEANIM::DODGE] = { 802,false };
-
- m_Animation[STATEANIM::SKILL] = { 593,false };
- m_Animation[STATEANIM::SKILL2] = { 915,false };
- m_Animation[STATEANIM::LIGHT_ATTACK] = { 413,false };
- m_Animation[STATEANIM::LAND] = { 259,false };
- m_Animation[STATEANIM::CAST] = { 696,false };
-
- m_Animation[STATEANIM::IDLE] = { 266,true };
- m_Animation[STATEANIM::IDLE_TURN_L] = { 270,false };
- m_Animation[STATEANIM::IDLE_TURN_R] = { 430,false };
- m_Animation[STATEANIM::IDLE_TURN_BWD] = { 268,false };
-
- m_Animation[STATEANIM::WALK_FWD] = { 625,true };
- m_Animation[STATEANIM::WALK_BWD] = { 166,true };
- m_Animation[STATEANIM::WALK_STOP] = { 344,false };
-
- m_Animation[STATEANIM::JOG_FWD] = { 167,true };
- m_Animation[STATEANIM::JOG_STOP] = { 289,false };
-
- m_Animation[STATEANIM::JUMP] = { 205,false };
- m_Animation[STATEANIM::JUMP_JOG] = { 203,false };
- m_Animation[STATEANIM::JUMP_SPRINT] = { 207,false };
-
- m_Animation[STATEANIM::SPRINT] = { 599,true };
-
-}
-
CPlayer* CPlayer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CPlayer* pInstance = new CPlayer(pDevice, pContext);
@@ -644,12 +273,27 @@ void CPlayer::Free()
{
__super::Free();
+ if (nullptr != m_pCallBack_Behavior) {
+ m_pCallBack_Behavior->Finalize();
+ }
+ if (nullptr != m_pCallBack_HitReport) {
+ m_pCallBack_HitReport->Finalize();
+ }
+ SAFE_RELEASE(m_pCharacter_Controller);
+ SAFE_RELEASE(m_pRigidBody);
+ Safe_Delete(m_pCallBack_Behavior);
+ Safe_Delete(m_pCallBack_HitReport);
SAFE_RELEASE(m_pCamPosition_TopDown_FollowPart);
SAFE_RELEASE(m_pCamPosition_TopDown_LookPart);
+ SAFE_RELEASE(m_pCamPosition_ShoulderPart);
}
void CPlayer::Describe_Entity()
{
+ m_pCharacter_Controller->Describe_Entity();
+ _float4 vMomentum = {};
+ XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
+ GUI::Text("%.1f %.1f %.1f %.1f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
_char label[256];
for (auto& iter : m_KeyFrames)
{
@@ -665,31 +309,18 @@ void CPlayer::Describe_Entity()
GUI::DragFloat3("Pos", Pos3);
- _float RotR,RotU,RotL;
+ _float RotR, RotU, RotL;
RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT));
RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP));
RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK));
float Rot3[3] = { RotR, RotU,RotL };
GUI::DragFloat3("Rot", Rot3);
+
+
+ string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
+ GUI::Text(AnimList.c_str());
+
+ GUI::Checkbox("Render", &m_bVisible);
}
-
-_bool CPlayer::IsSprint()
-{
- if (m_pGameInstance->Key_Down(DIK_LSHIFT))
- {
- return m_bSprintToggle = !m_bSprintToggle;
- }
- return false;
-}
-
-_bool CPlayer::IsWalk()
-{
- if (m_pGameInstance->Key_Down(DIK_C))
- {
- return m_bWalkToggle = !m_bWalkToggle;
- }
- return false;
-}
-////////////////////
diff --git a/Jusin154_Team3D/Editor/Private/Player_States.cpp b/Jusin154_Team3D/Editor/Private/Player_States.cpp
new file mode 100644
index 000000000..42fa72364
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Player_States.cpp
@@ -0,0 +1,648 @@
+#include "pch.h"
+#include "Player.h"
+
+#include "GameInstance.h"
+#include "CamPosition_Socket.h"
+#include "Camera_Gaze.h"
+#include "CamPosition_Arm.h"
+#include "Wand.h"
+#include "Character_Controller.h"
+#include "CallBack_Playable_Behavior.h"
+#include "CamPosition_Shoulder.h"
+#include "CallBack_Playable_HitReport.h"
+
+#pragma region STATE
+#include "State_Idle.h"
+#include "State_Dodge.h"
+#include "State_Jump.h"
+#include "State_Land.h"
+#include "State_Move.h"
+#include "State_Combat.h"
+#pragma endregion
+
+#include "Bombard.h"
+
+#pragma region States
+void CPlayer::TestKeyInput(_float fTimeDelta)
+{
+ if (m_pGameInstance->Key_Down(DIK_F1))
+ {
+ m_eSpell = STATEANIM::ACCIO;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F2))
+ {
+ m_eSpell = STATEANIM::DESCENDO;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F3))
+ {
+ m_eSpell = STATEANIM::DEPULSO;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F4))
+ {
+ m_eSpell = STATEANIM::DIFFINDO;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F5))
+ {
+ m_eSpell = STATEANIM::DISILLUSION_ENTER;
+ }
+ if (m_pGameInstance->Key_Down(DIK_F6))
+ {
+ m_eSpell = STATEANIM::DISILLUSION_EXIT;
+ }
+
+}
+
+HRESULT CPlayer::InputAction()
+{
+ if (
+ m_pGameInstance->Key_Down(DIK_SPACE)
+ || m_pGameInstance->Key_Down(DIK_LCONTROL)
+ || m_pGameInstance->Key_Down(DIK_E)
+ || m_pGameInstance->Key_Down(DIK_R)
+ || m_pGameInstance->Key_Down(DIK_Q)
+ || m_pGameInstance->Mouse_Up(DIM_LBUTTON)
+ || m_pGameInstance->Key_Down(DIK_LSHIFT)
+ || m_pGameInstance->Key_Down(DIK_C)
+ || m_pGameInstance->Key_Down(DIK_V)
+ )
+ {
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
+HRESULT CPlayer::InputMove()
+{
+ if (m_pGameInstance->Key_Pressing(DIK_W)
+ || m_pGameInstance->Key_Pressing(DIK_A)
+ || m_pGameInstance->Key_Pressing(DIK_S)
+ || m_pGameInstance->Key_Pressing(DIK_D))
+ {
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
+HRESULT CPlayer::InputSpell()
+{
+ if (
+ m_pGameInstance->Key_Down(DIK_1)
+ || m_pGameInstance->Key_Down(DIK_2)
+ || m_pGameInstance->Key_Down(DIK_3)
+ || m_pGameInstance->Key_Down(DIK_4)
+ )
+ {
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
+void CPlayer::Behavior_IdleEnter() {
+ m_pFSM->Enable_State(FSMSTATE::IDLE);
+ pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
+
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::SPRINT)) {
+
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_STOP];
+ }
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) {
+ pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
+ }
+
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) {
+ pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
+ }
+ }
+ m_bSprintToggle = false;
+ m_bWalkToggle = false;
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_IdleExitCheck()
+{
+ // S_OK -> 현 상태 유지
+ // E_FAIL -> 현 상태 탈출
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) {
+ if (m_pGameInstance->Key_Down(DIK_SPACE)) {
+ m_pFSM->Change_State(FSMSTATE::JUMP);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_LCONTROL)) {
+ m_pFSM->Change_State(FSMSTATE::DODGE);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_R)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_Q)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (SUCCEEDED(InputSpell())) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_V)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+
+ return E_FAIL;
+ }
+ if (SUCCEEDED(InputMove())) {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
+
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ return S_OK;
+}
+
+void CPlayer::Behavior_IdleExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::IDLE);
+}
+
+void CPlayer::Behavior_MoveEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _bool bFoward = m_pGameInstance->Key_Pressing(DIK_W);
+ _bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
+ _bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
+ _bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
+ m_pFSM->Enable_State(FSMSTATE::MOVE);
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE)) {
+ if (true == m_bSprintToggle) {
+ m_pFSM->Enable_State(FSMSTATE::SPRINT);
+ m_bWalkToggle = false;
+ if (true == bFoward) {
+ pairAnimInfo = m_Animation[STATEANIM::SPRINT];
+ }
+ }
+ else if (true == m_bWalkToggle) {
+ m_pFSM->Enable_State(FSMSTATE::WALK);
+ m_bSprintToggle = false;
+ if (true == bFoward) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
+ }
+ else if (true == bBackward) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
+ }
+ }
+ else
+ {
+ m_pFSM->Enable_State(FSMSTATE::JOG);
+ m_bSprintToggle = false;
+ m_bWalkToggle = false;
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ }
+ }
+ else { // While Moving
+ if (true == m_bSprintToggle) {
+ m_pFSM->Enable_State(FSMSTATE::SPRINT);
+ m_bWalkToggle = false;
+ pairAnimInfo = m_Animation[STATEANIM::SPRINT];
+
+ }
+ else if (true == m_bWalkToggle) {
+ m_pFSM->Enable_State(FSMSTATE::WALK);
+ m_bSprintToggle = false;
+ if (true == bFoward) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
+ }
+ else if (true == bBackward) {
+ pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
+ }
+ }
+ else {
+ m_pFSM->Enable_State(FSMSTATE::JOG);
+ m_bSprintToggle = false;
+ m_bWalkToggle = false;
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ }
+ }
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_MoveExitCheck()
+{
+ pair<_uint, _bool> pairAnimInfo;
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) {
+ if (m_pGameInstance->Key_Down(DIK_SPACE)) {
+ m_pFSM->Change_State(FSMSTATE::JUMP);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_LCONTROL)) {
+ m_pFSM->Change_State(FSMSTATE::DODGE);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_R)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_Q)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (SUCCEEDED(InputSpell())) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_V)) {
+ m_pFSM->Change_State(FSMSTATE::COMBAT);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_LSHIFT)) {
+ m_bSprintToggle = !m_bSprintToggle;
+ m_bWalkToggle = false;
+ if (m_bSprintToggle)
+ {
+ m_pFSM->Enable_State(FSMSTATE::SPRINT);
+
+ pairAnimInfo = m_Animation[STATEANIM::SPRINT];
+ }
+ else
+ {
+ m_pFSM->Enable_State(FSMSTATE::JOG);
+ m_pFSM->Disable_State(FSMSTATE::SPRINT);
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_C)) {
+ m_bWalkToggle = !m_bWalkToggle;
+ m_bSprintToggle = false;
+ if (m_bWalkToggle)
+ {
+ m_pFSM->Enable_State(FSMSTATE::WALK);
+ pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
+ }
+ else
+ {
+ m_pFSM->Enable_State(FSMSTATE::JOG);
+ m_pFSM->Disable_State(FSMSTATE::WALK);
+ pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ return E_FAIL;
+ }
+ if (SUCCEEDED(InputMove())) {
+ return S_OK;
+ }
+
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+
+ return E_FAIL;
+}
+
+void CPlayer::Behavior_MoveExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK);
+}
+
+void CPlayer::Behavior_JumpEnter()
+{
+ pair<_uint, _bool> pairAnimInfo;
+ m_pFSM->Enable_State(FSMSTATE::JUMP);
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::WALK | FSMSTATE::JOG | FSMSTATE::SPRINT)) {
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP);
+ }
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) {
+ pairAnimInfo = m_Animation[STATEANIM::JUMP_SPRINT];
+ }
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP);
+ }
+ else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP_JOG);
+ }
+ }
+ else {
+ // Drop?
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_JumpExitCheck()
+{
+ if (IsCurrentKeyFrame("Jump")) {
+ m_pFSM->Change_State(FSMSTATE::LAND);
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CPlayer::Behavior_JumpExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::JUMP);
+}
+
+void CPlayer::Behavior_LandEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::LAND);
+ pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::LAND);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_LandExitCheck()
+{
+ if (m_pModelCom->IsFinishedAnim()) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ } // 혹시 Land to (Jog, Sprint, Dodge) 같은 애니메이션 있으면 여기에 분기 조건 넣으면 됨
+
+ if (SUCCEEDED(InputMove())) {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CPlayer::Behavior_LandExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::LAND);
+}
+
+void CPlayer::Behavior_DodgeEnter()
+{
+ // 혹시 @@ to Dodge 있으면 여기에
+ m_pFSM->Enable_State(FSMSTATE::DODGE);
+ pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::DODGE);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_DodgeExitCheck()
+{
+ if (m_pModelCom->IsFinishedAnim()) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+void CPlayer::Behavior_DodgeExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::DODGE);
+}
+
+void CPlayer::Behavior_CombatEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::COMBAT);
+
+ if (m_pGameInstance->Key_Down(DIK_R)) {
+ m_pFSM->Enable_State(FSMSTATE::SKILL);
+ pairAnimInfo = m_Animation[STATEANIM::SKILL];
+ }
+ else if (m_pGameInstance->Key_Down(DIK_Q)) {
+ m_pFSM->Enable_State(FSMSTATE::SKILL2);
+ pairAnimInfo = m_Animation[STATEANIM::SKILL2];
+ }
+ else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
+ m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK);
+ pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
+ }
+ else if (SUCCEEDED(InputSpell())) {
+ m_pFSM->Enable_State(FSMSTATE::SPELL);
+ if (m_eSpell != STATEANIM::END)
+ {
+ switch (m_eSpell)
+ {
+ case STATEANIM::DEPULSO:
+ pairAnimInfo = m_Animation[STATEANIM::DEPULSO];
+ m_eSpell = STATEANIM::END;
+ break;
+ case STATEANIM::DIFFINDO:
+ pairAnimInfo = m_Animation[STATEANIM::DIFFINDO];
+ m_eSpell = STATEANIM::END;
+ break;
+ case STATEANIM::DISILLUSION_ENTER:
+ pairAnimInfo = m_Animation[STATEANIM::DISILLUSION_ENTER];
+ m_eSpell = STATEANIM::END;
+ break;
+ case STATEANIM::DISILLUSION_EXIT:
+ pairAnimInfo = m_Animation[STATEANIM::DISILLUSION_EXIT];
+ m_eSpell = STATEANIM::END;
+ break;
+ default:
+ pairAnimInfo = m_Animation[STATEANIM::SPELL];
+ break;
+ }
+ }
+ else
+ pairAnimInfo = m_Animation[STATEANIM::SPELL];
+ }
+ else if (m_pGameInstance->Key_Down(DIK_V)) {
+ m_pFSM->Enable_State(FSMSTATE::MAPHELP);
+ pairAnimInfo = m_Animation[STATEANIM::MAPHELP];
+
+ }
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+}
+
+HRESULT CPlayer::Behavior_CombatExitCheck()
+{
+ pair<_uint, _bool> pairAnimInfo;
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) {
+ if (m_pGameInstance->Key_Down(DIK_R))
+ {
+ m_pFSM->Enable_State(FSMSTATE::SKILL);
+ }
+ else if (m_pGameInstance->Key_Down(DIK_Q))
+ {
+ m_pFSM->Enable_State(FSMSTATE::SKILL2);
+ pairAnimInfo = m_Animation[STATEANIM::SKILL2];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON))
+ {
+ m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK);
+ _uint iIndex = m_pModelCom->Get_AnimIndex();
+ if (m_Animation[STATEANIM::LIGHT_ATTACK].first <= iIndex && m_Animation[STATEANIM::LIGHT_ATTACK].first + 3 > iIndex) {
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
+ if (fRatio >= 0.1f) {
+ pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
+ pairAnimInfo.first = iIndex + 1;
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+ }
+ else if (SUCCEEDED(InputSpell()))
+ {
+ m_pFSM->Enable_State(FSMSTATE::SPELL);
+ _uint iIndex = m_pModelCom->Get_AnimIndex();
+ if (m_Animation[STATEANIM::SPELL].first <= iIndex && m_Animation[STATEANIM::SPELL].first + 3 > iIndex) {
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
+ if (fRatio >= 0.15f) {
+ pairAnimInfo = m_Animation[STATEANIM::SPELL];
+ pairAnimInfo.first = iIndex + 1;
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+ }
+ else if (m_pGameInstance->Key_Down(DIK_V))
+ {
+ m_pFSM->Enable_State(FSMSTATE::MAPHELP);
+ pairAnimInfo = m_Animation[STATEANIM::MAPHELP];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+
+ if (m_pFSM->IsEnable(FSMSTATE::SPELL) && IsCurrentKeyFrame("Combat"))
+ {
+ if (m_eSpell != STATEANIM::END)
+ {
+ switch (m_eSpell)
+ {
+ case STATEANIM::ACCIO:
+ pairAnimInfo = m_Animation[STATEANIM::ACCIO];
+ break;
+ case STATEANIM::DESCENDO:
+ pairAnimInfo = m_Animation[STATEANIM::DESCENDO];
+ break;
+ default:
+ break;
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_eSpell = STATEANIM::END;
+ return E_FAIL;
+ }
+ }
+
+ if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Combat")) {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
+
+ if (m_pModelCom->IsFinishedAnim()) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+
+ return E_FAIL;
+}
+
+void CPlayer::Behavior_CombatExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::LIGHT_ATTACK | FSMSTATE::SPELL | FSMSTATE::SKILL | FSMSTATE::SKILL2 | FSMSTATE::MAPHELP);
+}
+
+void CPlayer::Add_FSM()
+{
+#pragma region Behavior_Movement_NotFocus
+ {
+ CState_Idle::STATE_IDLE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
+ }
+ {
+ CState_Move::STATE_MOVE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }
+ if (m_pGameInstance->Key_Pressing(DIK_D)) { m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); };
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
+ }
+#pragma endregion
+#pragma region Behavior_Movement_Focus
+ {
+ CState_Jump::STATE_JUMP_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_JumpEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_JumpExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_JumpExit(); };
+ m_States.emplace(FSMSTATE::JUMP, CState_Jump::Create(&Desc));
+ }
+ {
+ CState_Land::STATE_LAND_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_LandEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_LandExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_LandExit(); };
+ m_States.emplace(FSMSTATE::LAND, CState_Land::Create(&Desc));
+ }
+ {
+ CState_Dodge::STATE_DODGE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_DodgeEnter(); };
+ Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_DodgeExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }
+ if (m_pGameInstance->Key_Pressing(DIK_D)) { m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); };
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::DODGE, CState_Dodge::Create(&Desc));
+ }
+#pragma endregion
+#pragma region Behavior_Combat_NotFocus
+ {
+ CState_Combat::STATE_COMBAT_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_CombatEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_CombatExitCheck(); };
+ Desc.funcExitEvent = [this]() { Behavior_CombatExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::COMBAT, CState_Combat::Create(&Desc));
+ }
+#pragma endregion
+#pragma region Behavior_Combat_Focus
+
+#pragma endregion
+
+}
+
+void CPlayer::Set_Anim()
+{
+ m_Animation[STATEANIM::IDLE] = { 266,true };
+ m_Animation[STATEANIM::IDLE_TURN_L] = { 270,false };
+ m_Animation[STATEANIM::IDLE_TURN_R] = { 430,false };
+ m_Animation[STATEANIM::IDLE_TURN_BWD] = { 268,false };
+
+ m_Animation[STATEANIM::WALK_FWD] = { 625,true };
+ m_Animation[STATEANIM::WALK_BWD] = { 166,true };
+ m_Animation[STATEANIM::WALK_STOP] = { 344,false };
+
+ m_Animation[STATEANIM::JOG_FWD] = { 167,true };
+ m_Animation[STATEANIM::JOG_STOP] = { 289,false };
+
+ m_Animation[STATEANIM::JUMP] = { 205,false };
+ m_Animation[STATEANIM::JUMP_JOG] = { 203,false };
+ m_Animation[STATEANIM::JUMP_SPRINT] = { 207,false };
+
+ m_Animation[STATEANIM::SPRINT] = { 599,true };
+
+ m_Animation[STATEANIM::LAND] = { 259,false };
+
+ m_Animation[STATEANIM::DODGE] = { 802,false };
+
+ m_Animation[STATEANIM::SKILL] = { 593,false };
+ m_Animation[STATEANIM::SKILL2] = { 915,false };
+ m_Animation[STATEANIM::LIGHT_ATTACK] = { 413,false };
+ m_Animation[STATEANIM::SPELL] = { 696,false };
+ m_Animation[STATEANIM::MAPHELP] = { 122,false };
+ m_Animation[STATEANIM::ACCIO] = { 417,false };
+ m_Animation[STATEANIM::DESCENDO] = { 418,false };
+ m_Animation[STATEANIM::DEPULSO] = { 782,false };
+ m_Animation[STATEANIM::DIFFINDO] = { 786,false };
+ m_Animation[STATEANIM::LUMOS] = { 782,false };
+ m_Animation[STATEANIM::DISILLUSION_ENTER] = { 585,false };
+ m_Animation[STATEANIM::DISILLUSION_EXIT] = { 586,false };
+}
+#pragma endregion State
+
diff --git a/Jusin154_Team3D/Editor/Private/Potion.cpp b/Jusin154_Team3D/Editor/Private/Potion.cpp
new file mode 100644
index 000000000..49ede637d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Potion.cpp
@@ -0,0 +1,222 @@
+#include "pch.h"
+#include "Potion.h"
+#include "GameInstance.h"
+
+CPotion::CPotion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CPotion::CPotion(const CPotion& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CPotion::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CPotion::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 220.f;
+ Desc.fY = 180.f;
+ Desc.fSizeX = 144.f;
+ Desc.fSizeY = 24.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fTimeMult = 3.f;
+ m_fAlpha = 1.f;
+ m_fAlphaTime = 1.f;
+ return S_OK;
+}
+
+void CPotion::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+
+void CPotion::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+
+ m_fTime += fTimeDelta * m_fTimeMult;
+
+ __super::Update(fTimeDelta);
+}
+
+void CPotion::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible) {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ __super::Late_Update(fTimeDelta);
+ }
+}
+
+HRESULT CPotion::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources())) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CPotion::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CPotion::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ 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_RawValue("g_fTime", &m_fTime, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+HRESULT CPotion::Ready_Components(void* pArg)
+{
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_WoundCleaning"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+
+CPotion* CPotion::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CPotion* pInstance = new CPotion(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CPotion");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CPotion::Clone(void* pArg, CGameObject* pOwner)
+{
+ CPotion* pInstance = new CPotion(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Image");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CPotion::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CPotion::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/RootModelPart.cpp b/Jusin154_Team3D/Editor/Private/RootModelPart.cpp
index 61acedece..489dd2283 100644
--- a/Jusin154_Team3D/Editor/Private/RootModelPart.cpp
+++ b/Jusin154_Team3D/Editor/Private/RootModelPart.cpp
@@ -2,7 +2,7 @@
#include "RootModelPart.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "ModelParts.h"
#include "Body.h"
#include "Head.h"
diff --git a/Jusin154_Team3D/Editor/Private/Spell_Slot_Preview.cpp b/Jusin154_Team3D/Editor/Private/Spell_Slot_Preview.cpp
new file mode 100644
index 000000000..9820becb0
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Spell_Slot_Preview.cpp
@@ -0,0 +1,231 @@
+#include "pch.h"
+#include "Spell_Slot_Preview.h"
+#include "GameInstance.h"
+
+CSpell_Slot_Preview::CSpell_Slot_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ :CElementObject(pDevice, pContext)
+{
+}
+
+CSpell_Slot_Preview::CSpell_Slot_Preview(const CSpell_Slot_Preview& rhs)
+ :CElementObject(rhs)
+{
+}
+
+HRESULT CSpell_Slot_Preview::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CSpell_Slot_Preview::Initialize(void* pArg)
+{
+ CUIObject::UIOBJECT_DESC Desc{};
+
+ Desc.fX = 0.f;
+ Desc.fY = 0.f;
+ Desc.fSizeX = 100.f;
+ Desc.fSizeY = 100.f;
+
+ m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
+
+ if (FAILED(__super::Initialize(&Desc)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg)))
+ {
+ return E_FAIL;
+ }
+
+ m_fAlpha = 1.f;
+ m_fTimeMult = 3.f;
+ m_fAngle = XMConvertToRadians(45);
+ m_fAlphaTime = 1.f;
+ m_pVIBufferCom->Set_Cloned(true);
+ //m_pVIBufferCom->Set_Pos(0.f, 0.f, m_fOffSetX, m_fOffSetY, m_iCols);
+ m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
+ m_pVIBufferCom->Set_ImageUV();
+ return S_OK;
+}
+
+void CSpell_Slot_Preview::Priority_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ __super::Priority_Update(fTimeDelta);
+}
+
+void CSpell_Slot_Preview::Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+
+ if (m_bFadeIn == true)
+ {
+ if (m_fAlpha <= 1.f)
+ m_fAlpha += fTimeDelta * m_fAlphaTime;
+
+ if (m_fAlpha >= 1.f)
+ {
+ m_bFadeIn = false;
+ m_fAlpha = 1.f;
+ }
+ }
+
+ if (m_bFadeOut == true)
+ {
+ if (m_fAlpha >= 0.f)
+ m_fAlpha -= fTimeDelta;
+
+ if (m_fAlpha <= 0.f)
+ {
+ m_bFadeOut = false;
+ m_fAlpha = 0.f;
+ }
+ }
+ m_fTime += fTimeDelta * m_fTimeMult;
+ __super::Update(fTimeDelta);
+}
+
+void CSpell_Slot_Preview::Late_Update(_float fTimeDelta)
+{
+ if (!__super::Chack_Visible())
+ {
+ return;
+ }
+ if (m_bVisible)
+ {
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
+ }
+ __super::Late_Update(fTimeDelta);
+}
+
+HRESULT CSpell_Slot_Preview::Render()
+{
+ if(FAILED(Bind_ShaderResources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Bind_Resources()))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pVIBufferCom->Render()))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+_vector CSpell_Slot_Preview::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+HRESULT CSpell_Slot_Preview::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
+ {
+ 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_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CSpell_Slot_Preview::Ready_Components(void* pArg)
+{
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Spell_Slot_Previe_UI_Instance"), (CComponent**)&m_pVIBufferCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr)))
+ {
+ return E_FAIL;
+ }
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+CSpell_Slot_Preview* CSpell_Slot_Preview::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CSpell_Slot_Preview* pInstance = new CSpell_Slot_Preview(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CSpell_Slot_Preview");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CSpell_Slot_Preview::Clone(void* pArg, CGameObject* pOwner)
+{
+ CSpell_Slot_Preview* pInstance = new CSpell_Slot_Preview(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CSpell_Slot");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CSpell_Slot_Preview::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuse_TextureCom);
+ SAFE_RELEASE(m_pShaderCom);
+ SAFE_RELEASE(m_pVIBufferCom);
+}
+
+void CSpell_Slot_Preview::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/State_Combat.cpp b/Jusin154_Team3D/Editor/Private/State_Combat.cpp
index 35b611131..1e8e15653 100644
--- a/Jusin154_Team3D/Editor/Private/State_Combat.cpp
+++ b/Jusin154_Team3D/Editor/Private/State_Combat.cpp
@@ -15,9 +15,15 @@ void CState_Combat::Enter()
HRESULT CState_Combat::Update(_float fTimeDelta)
{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
if (E_FAIL == (__super::Update(fTimeDelta))) {
return E_FAIL;
}
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
return S_OK;
}
@@ -31,7 +37,8 @@ HRESULT CState_Combat::Initialize(STATE_COMBAT_DESC* pDesc)
if (FAILED(__super::Initialize(pDesc))) {
return E_FAIL;
}
- m_pOwner = pDesc->pOwner;
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
m_pModel = m_pOwner->Get_Component();
m_pFSM = m_pOwner->Get_Component();
diff --git a/Jusin154_Team3D/Editor/Private/Terrain.cpp b/Jusin154_Team3D/Editor/Private/Terrain.cpp
index 43f688ae1..99efc5db7 100644
--- a/Jusin154_Team3D/Editor/Private/Terrain.cpp
+++ b/Jusin154_Team3D/Editor/Private/Terrain.cpp
@@ -2,7 +2,7 @@
#include "Terrain.h"
#include "GameInstance.h"
-#include "DebugCamera.h"
+#include "Camera_Debug.h"
#include "VIBuffer_Terrain.h"
#include "AlphaMap.h"
diff --git a/Jusin154_Team3D/Editor/Private/Wand.cpp b/Jusin154_Team3D/Editor/Private/Wand.cpp
index 5412960a8..1c904ec41 100644
--- a/Jusin154_Team3D/Editor/Private/Wand.cpp
+++ b/Jusin154_Team3D/Editor/Private/Wand.cpp
@@ -43,10 +43,6 @@ void CWand::Priority_Update(_float fTimeDelta)
socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]);
}
m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
-
-
- //_float3 Scale = _float3(10.f, 10.f, 10.f);
- //m_pTransformCom->Set_Scale(Scale);
}
void CWand::Update(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Editor/Public/Action_Panel.h b/Jusin154_Team3D/Editor/Public/Action_Panel.h
index 685415b08..bce4da7ce 100644
--- a/Jusin154_Team3D/Editor/Public/Action_Panel.h
+++ b/Jusin154_Team3D/Editor/Public/Action_Panel.h
@@ -3,10 +3,6 @@
#include "Editor_Define.h"
#include "PanelObject.h"
-NS_BEGIN(Engine)
-class CGameObject;
-NS_END
-
NS_BEGIN(Editor)
class CAction_Panel final : public CPanelObject
@@ -40,6 +36,7 @@ class CAction_Panel final : public CPanelObject
CGameObject* m_pSpell_Overlay = { nullptr };
CGameObject* m_pSlot_Number = { nullptr };
CGameObject* m_pHpBarBG= { nullptr };
+ CGameObject* m_pMagic_Meter = { nullptr };
public:
static CAction_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Editor/Public/Bombard.h b/Jusin154_Team3D/Editor/Public/Bombard.h
new file mode 100644
index 000000000..3f5f2e52a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Bombard.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Editor)
+
+class CBombard final : public CEffect_Container
+{
+private:
+ CBombard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CBombard(const CBombard& rhs);
+ virtual ~CBombard() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+ class CDummy_PhysXEffectHitBox* m_pPhysHitBox = {};
+ class CPartObject* m_pLight_Projectile = {};
+public:
+ static CBombard* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h b/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h
new file mode 100644
index 000000000..fbaff6adb
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h
@@ -0,0 +1,64 @@
+#pragma once
+#include "Editor_Define.h"
+#include "CamPosition.h"
+#include "CamPosition_Target.h"
+
+NS_BEGIN(Editor)
+
+class CCamPosition_Shoulder final : public CCamPosition
+{
+public:
+ typedef struct tagCameraShoulder_Desc : public CCamPosition::CAMERAPOSITION_DESC
+ {
+ _float fMouseSensor = { 0.5f };
+ _float fShoulderDistance = { 2.f };
+ _float fBackFrontRatio = { 0.9f };
+ _float fCameraFocalLength = { 10.f };
+ _float3 vInitialLook = { 1.f, 2.f, -1.f };
+ }CAMERA_SHOULDER_DESC;
+private:
+ CCamPosition_Shoulder(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CCamPosition_Shoulder(const CCamPosition_Shoulder& rhs);
+ virtual ~CCamPosition_Shoulder() = 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;
+ virtual _vector Get_WorldPostion() override;
+
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ HRESULT Ready_Components(void* pArg);
+ HRESULT Ready_SubParts();
+
+ _bool m_bMovable = { true };
+ _float m_fMouseSensor = { 0.5f };
+ _float m_fShoulderDistance = { 2.f };
+ _float m_fCameraFocalLength = { 10.f };
+ _float m_fBackFrontRatio = { 0.9f };
+ _float2 m_vAccDegreeXY = {};
+ _float3 m_vShoulderPosRatio = { 1.f, 2.f, -1.f };
+
+ _float3 m_vShoulderStartRatio = { 1.f, 2.f, -1.f };
+ _float3 m_vShoulderOtherRatio = { 1.f, 2.f, -1.f };
+
+ _bool m_bLerp = { false };
+ _float2 m_vLerpTimer = { 0.f, 1.f };
+
+
+ CCamPosition_Target* m_pTarget_LookPart = { nullptr };
+ CCamPosition_Target* m_pTarget_FollowPart = { nullptr };
+ class CCamera_Gaze* m_pBinded_Camera = { nullptr };
+
+public:
+ static CCamPosition_Shoulder* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CCamPosition_Shoulder* Clone(void* pArg, class CGameObject* pOWner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/CamPosition_Player.h b/Jusin154_Team3D/Editor/Public/CamPosition_Socket.h
similarity index 70%
rename from Jusin154_Team3D/Editor/Public/CamPosition_Player.h
rename to Jusin154_Team3D/Editor/Public/CamPosition_Socket.h
index 3b8f8ce59..8b826a0a0 100644
--- a/Jusin154_Team3D/Editor/Public/CamPosition_Player.h
+++ b/Jusin154_Team3D/Editor/Public/CamPosition_Socket.h
@@ -4,7 +4,7 @@
NS_BEGIN(Editor)
-class CCamPosition_Player final : public CCamPosition
+class CCamPosition_Socket final : public CCamPosition
{
public:
typedef struct tagCamPosition_Player : public CCamPosition::CAMERAPOSITION_DESC
@@ -12,9 +12,9 @@ class CCamPosition_Player final : public CCamPosition
const _float4x4* pSocketMatrices = { };
}CAMERAPOSITION_PLAYER_DESC;
private:
- CCamPosition_Player(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CCamPosition_Player(const CCamPosition_Player& rhs);
- virtual ~CCamPosition_Player() = default;
+ CCamPosition_Socket(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CCamPosition_Socket(const CCamPosition_Socket& rhs);
+ virtual ~CCamPosition_Socket() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
@@ -30,8 +30,8 @@ class CCamPosition_Player final : public CCamPosition
const _float4x4* m_pSocketMatrices = { };
public:
- static CCamPosition_Player* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CCamPosition_Player* Clone(void* pArg, class CGameObject* pOWner) override;
+ static CCamPosition_Socket* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CCamPosition_Socket* Clone(void* pArg, class CGameObject* pOWner) override;
virtual void Free() override;
void Describe_Entity() override;
};
diff --git a/Jusin154_Team3D/Editor/Public/CamPosition_Target.h b/Jusin154_Team3D/Editor/Public/CamPosition_Target.h
new file mode 100644
index 000000000..bef83e130
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/CamPosition_Target.h
@@ -0,0 +1,37 @@
+#pragma once
+#include "Editor_Define.h"
+#include "CamPosition.h"
+
+NS_BEGIN(Editor)
+
+class CCamPosition_Target final : public CCamPosition
+{
+public:
+ typedef struct tagCamPosition_Target : public CCamPosition::CAMERAPOSITION_DESC
+ {
+ }CAMERAPOSITION_TARGET_DESC;
+private:
+ CCamPosition_Target(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CCamPosition_Target(const CCamPosition_Target& rhs);
+ virtual ~CCamPosition_Target() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ HRESULT Ready_Components(void* pArg);
+ HRESULT Bind_ShaderResources() override;
+
+public:
+ static CCamPosition_Target* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CCamPosition_Target* Clone(void* pArg, class CGameObject* pOWner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/DebugCamera.h b/Jusin154_Team3D/Editor/Public/Camera_Debug.h
similarity index 76%
rename from Jusin154_Team3D/Editor/Public/DebugCamera.h
rename to Jusin154_Team3D/Editor/Public/Camera_Debug.h
index 56c07bc30..d10732bea 100644
--- a/Jusin154_Team3D/Editor/Public/DebugCamera.h
+++ b/Jusin154_Team3D/Editor/Public/Camera_Debug.h
@@ -5,7 +5,7 @@
NS_BEGIN(Editor)
-class CDebugCamera final : public CCamera
+class CCamera_Debug final : public CCamera
{
public:
typedef struct tagCamera_Debug : public CCamera::CAMERA_DESC
@@ -14,9 +14,9 @@ class CDebugCamera final : public CCamera
_float fMouseSensor{};
}CAMERA_DEBUG_DESC;
private:
- CDebugCamera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CDebugCamera(const CDebugCamera& rhs);
- virtual ~CDebugCamera() = default;
+ CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CCamera_Debug(const CCamera_Debug& rhs);
+ virtual ~CCamera_Debug() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
@@ -37,11 +37,11 @@ class CDebugCamera final : public CCamera
void Set_InitialPos();
public:
- static CDebugCamera* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ static CCamera_Debug* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
};
-NS_END
\ No newline at end of file
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Camera_Gaze.h b/Jusin154_Team3D/Editor/Public/Camera_Gaze.h
index 9836c8045..47c8cfcf8 100644
--- a/Jusin154_Team3D/Editor/Public/Camera_Gaze.h
+++ b/Jusin154_Team3D/Editor/Public/Camera_Gaze.h
@@ -19,6 +19,10 @@ class CCamera_Gaze final : public CCamera
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
+ void Update_LerpTimer(Engine::_float fTimeDelta);
+ void Enable_FollowLerp();
+ void Enable_LookLerp();
+ void Toggle_Priority();
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h
index 28a421c59..401086d15 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Define.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h
@@ -26,6 +26,7 @@ namespace Editor
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END };
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, END };
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, SPELLTYPE, HPBAR, END };
+ enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END };
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
}
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Macro.h b/Jusin154_Team3D/Editor/Public/Editor_Macro.h
index fc6d3bf5e..cba1695df 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Macro.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Macro.h
@@ -29,6 +29,8 @@ namespace Editor {
#pragma endregion
#pragma region OBJECT
+#define CAMERA_DEBUG TEXT("CAMERA_DEBUG")
+#define CAMERA_SHOULDER TEXT("CAMERA_SHOULDER")
#pragma endregion
#pragma region COMPONENT
diff --git a/Jusin154_Team3D/Editor/Public/EffectObject.h b/Jusin154_Team3D/Editor/Public/EffectObject.h
index d2f348617..7c6876a1d 100644
--- a/Jusin154_Team3D/Editor/Public/EffectObject.h
+++ b/Jusin154_Team3D/Editor/Public/EffectObject.h
@@ -78,10 +78,11 @@ class CEffectObject abstract : public CPartObject
_float fCoreBoost = {};
_float fRadius = {};
- _float fSoftMaskEdge;
- _float fSoftMask;
-
+ _float fSoftMaskEdge = {};
+ _float fSoftMask = {};
+ _bool isEmissiveDissolveReverse = { false };
+ _bool isOnlyBlur = { false };
}EFFECT_INFO;
typedef struct tagPreEffectInfo
@@ -141,6 +142,9 @@ class CEffectObject abstract : public CPartObject
_float fCoreBoost = {};
_float fRadius = {};
+ _float fSoftMaskEdge = {};
+ _float fSoftMask = {};
+
}PRE_EFFECT_INFO;
protected:
@@ -156,7 +160,7 @@ class CEffectObject abstract : public CPartObject
virtual HRESULT Render_Blur() override;
public:
HRESULT Load(const _char* pFilePath, LEVEL eLevel);
-
+ HRESULT Load();
public:
#ifdef _DEBUG
HRESULT LoadPre(const _char* pFilePath, LEVEL eLevel);
diff --git a/Jusin154_Team3D/Editor/Public/Effect_Container.h b/Jusin154_Team3D/Editor/Public/Effect_Container.h
index 2d635b102..0fe304473 100644
--- a/Jusin154_Team3D/Editor/Public/Effect_Container.h
+++ b/Jusin154_Team3D/Editor/Public/Effect_Container.h
@@ -25,6 +25,7 @@ class CEffect_Container abstract : public CContainerObject
HRESULT Save_Package(const _char* pPath);
#endif
HRESULT Load_Package(const _char* pPath);
+ HRESULT Load_Directory(const _char* pPath);
protected:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
diff --git a/Jusin154_Team3D/Editor/Public/Magic_Meter.h b/Jusin154_Team3D/Editor/Public/Magic_Meter.h
new file mode 100644
index 000000000..c6960a852
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Magic_Meter.h
@@ -0,0 +1,51 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CMagic_Meter final : public CElementObject
+{
+private:
+ CMagic_Meter(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CMagic_Meter(const CMagic_Meter& rhs);
+ virtual ~CMagic_Meter() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ void UV();
+ _float2 Compute_UVX(_uint Number);
+ _float2 Compute_UVY(_uint Numver);
+
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CTexture* m_pDiffuse_TextureCom1 = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
+ CVIBuffer_UI_Instance::UI_ATLAS_DESC pUVDesc[5];
+
+ _uint m_iCols{};
+ _float2 m_fIamge_Size{};
+ //_float2 Position[5];
+public:
+ static CMagic_Meter* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Player.h b/Jusin154_Team3D/Editor/Public/Player.h
index 078da8ab6..b7c733909 100644
--- a/Jusin154_Team3D/Editor/Public/Player.h
+++ b/Jusin154_Team3D/Editor/Public/Player.h
@@ -7,21 +7,12 @@ NS_BEGIN(Editor)
class CPlayer final : public CUnit
{
-public:
- struct InputCondition
- {
- FSMSTATE::ESTATE state;
- function<_bool()> checker;
- };
-
private:
CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CPlayer(const CPlayer& Prototype);
virtual ~CPlayer() = 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;
@@ -33,16 +24,25 @@ class CPlayer final : public CUnit
size_t m_iStateMask = { 0 };
_float m_fDirectionRadian = 0.f;
- vector m_InputConditions;
_bool m_bSprintToggle = { false };
_bool m_bWalkToggle = { false };
- class CCamPosition_Player* m_pCamPosition_TopDown_LookPart = { nullptr };
+
+ class CCamPosition_Socket* m_pCamPosition_TopDown_LookPart = { nullptr };
class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr };
+ class CCamPosition_Shoulder* m_pCamPosition_ShoulderPart = { nullptr };
+
+ CCharacter_Controller* m_pCharacter_Controller = { nullptr };
+ CRigidBody_Dynamic* m_pRigidBody = { nullptr };
+ class CCallBack_Playable_Behavior* m_pCallBack_Behavior = { nullptr };
+ class CCallBack_Playable_HitReport* m_pCallBack_HitReport = { nullptr };
private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
HRESULT Ready_Components();
HRESULT Ready_Parts();
HRESULT Bind_ShaderResources();
+
public:
static CPlayer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
@@ -50,15 +50,21 @@ class CPlayer final : public CUnit
virtual void Describe_Entity() override;
#pragma region STATE
+
+public:
+ virtual void Reset_Sprint() { m_bSprintToggle = false; }
+ virtual void Reset_Walk() { m_bWalkToggle = false; }
+
private:
+ void TestKeyInput(_float fTimeDelta);
virtual void Add_FSM();
virtual void Set_Anim();
- _bool IsSprint();
- _bool IsWalk();
- HRESULT InputSystem();
- HRESULT InputSkill();
+ HRESULT InputAction();
HRESULT InputMove();
+ HRESULT InputSpell();
+
+ STATEANIM::ESTATE m_eSpell = { STATEANIM::END };
void Behavior_IdleEnter();
HRESULT Behavior_IdleExitCheck();
@@ -80,17 +86,11 @@ class CPlayer final : public CUnit
HRESULT Behavior_DodgeExitCheck();
void Behavior_DodgeExit();
-
-public:
- virtual void Reset_Sprint() { m_bSprintToggle = false; }
- virtual void Reset_Walk() { m_bWalkToggle = false; }
-
+ void Behavior_CombatEnter();
+ HRESULT Behavior_CombatExitCheck();
+ void Behavior_CombatExit();
#pragma endregion
-
-
-
-
};
NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Potion.h b/Jusin154_Team3D/Editor/Public/Potion.h
new file mode 100644
index 000000000..604263141
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Potion.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CPotion final : public CElementObject
+{
+private:
+ CPotion(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CPotion(const CPotion& rhs);
+ virtual ~CPotion() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
+
+public:
+ static CPotion* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Spell_Slot_Preview.h b/Jusin154_Team3D/Editor/Public/Spell_Slot_Preview.h
new file mode 100644
index 000000000..5fa48e200
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Spell_Slot_Preview.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "ElementObject.h"
+
+NS_BEGIN(Editor)
+
+class CSpell_Slot_Preview final : public CElementObject
+{
+private:
+ CSpell_Slot_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CSpell_Slot_Preview(const CSpell_Slot_Preview& rhs);
+ virtual ~CSpell_Slot_Preview() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta);
+ virtual void Update(_float fTimeDelta);
+ virtual void Late_Update(_float fTimeDelta);
+ virtual HRESULT Render() override;
+ virtual _vector Get_WorldPostion() override;
+
+private:
+ virtual HRESULT Bind_ShaderResources() override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+
+private:
+ CTexture* m_pDiffuse_TextureCom = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
+
+public:
+ static CSpell_Slot_Preview* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+ void Describe_Entity() override;
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/State_Combat.h b/Jusin154_Team3D/Editor/Public/State_Combat.h
index 8c7685ea0..858dc260a 100644
--- a/Jusin154_Team3D/Editor/Public/State_Combat.h
+++ b/Jusin154_Team3D/Editor/Public/State_Combat.h
@@ -8,7 +8,8 @@ class CState_Combat final : public CState_Root
{
public:
typedef struct tagCombat : public CState_Root::STATE_ROOT_DESC {
-
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
}STATE_COMBAT_DESC;
private:
CState_Combat();
@@ -19,6 +20,10 @@ class CState_Combat final : public CState_Root
virtual HRESULT Update(_float fTimeDelta);
virtual void Exit();
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
private:
HRESULT Initialize(STATE_COMBAT_DESC* pDesc);
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
index c9e4f582d..ba1161adb 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
@@ -33,7 +33,9 @@ Texture2D g_ShadowTexture;
Texture2D g_PreShadowTexture;
Texture2D g_BlurTexture;
Texture2D g_BlurXTexture;
+
Texture2D g_BlurWeightTexture;
+Texture2D g_BlurWeightXTexture;
Texture2D g_SurfaceTexture;
@@ -313,12 +315,33 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
return Out;
}
-float g_fWeights[32] =
+//float g_fWeights[32] =
+//{
+// 0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
+// 0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
+// 0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
+// 0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
+//};
+
+float g_fWeights[128] =
{
- 0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
- 0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
- 0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
- 0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
+ 0.000209902, 0.000241594, 0.000277451, 0.000317919, 0.000363477, 0.000414637, 0.000471944, 0.000535974,
+ 0.000607333, 0.000686659, 0.000774615, 0.000871889, 0.00097919, 0.00109725, 0.00122679, 0.00136858,
+ 0.00152334, 0.00169183, 0.00187477, 0.00207285, 0.00228675, 0.0025171, 0.00276448, 0.0030294,
+ 0.00331231, 0.00361356, 0.00393342, 0.00427205, 0.00462949, 0.00500564, 0.0054003, 0.00581308,
+ 0.00624346, 0.00669075, 0.00715411, 0.0076325, 0.00812472, 0.0086294, 0.009145, 0.0096698,
+ 0.0102019, 0.0107393, 0.0112798, 0.0118211, 0.0123608, 0.0128962, 0.0134249, 0.0139441,
+ 0.0144511, 0.0149431, 0.0154174, 0.0158713, 0.0163021, 0.0167073, 0.0170844, 0.0174311,
+ 0.0177452, 0.0180246, 0.0182676, 0.0184726, 0.0186383, 0.0187635, 0.0188474, 0.0188895,
+
+ 0.0188895, 0.0188474, 0.0187635, 0.0186383, 0.0184726, 0.0182676, 0.0180246, 0.0177452,
+ 0.0174311, 0.0170844, 0.0167073, 0.0163021, 0.0158713, 0.0154174, 0.0149431, 0.0144511,
+ 0.0139441, 0.0134249, 0.0128962, 0.0123608, 0.0118211, 0.0112798, 0.0107393, 0.0102019,
+ 0.0096698, 0.009145, 0.0086294, 0.00812472, 0.0076325, 0.00715411, 0.00669076, 0.00624346,
+ 0.00581308, 0.0054003, 0.00500564, 0.00462948, 0.00427205, 0.00393342, 0.00361356, 0.00331231,
+ 0.0030294, 0.00276448, 0.0025171, 0.00228675, 0.00207285, 0.00187477, 0.00169183, 0.00152334,
+ 0.00136858, 0.00122679, 0.00109725, 0.000979191, 0.000871889, 0.000774615, 0.000686658, 0.000607333,
+ 0.000535973, 0.000471944, 0.000414637, 0.000363477, 0.000317919, 0.000277451, 0.000241594, 0.000209902
};
@@ -395,30 +418,25 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
//}
float4 vColor = 0.f;
- //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
- //int iBlurMin;
- //int iBlurMax;
- //if (iBlurWeight % 2 == 0)
- //{
- // iBlurMin = -1 * iBlurWeight / 2;
- // iBlurMax = iBlurWeight / 2;
- //}
- //else
- //{
- // iBlurMin = -iBlurWeight / 2;
- // iBlurMax = iBlurWeight / 2 + 1;
- //}
+ int iBlurWeight = (int)(round(g_BlurWeightXTexture.Sample(ClampSampler, In.vTexcoord).r) * 128.f);
- //[loop] // 변수로 루프돌리려면 반드시 필요함
+ int iBlurMin;
+ int iBlurMax;
- for (int i = -15; i < 16; ++i)
+ iBlurMin = -1 * (iBlurWeight / 2) + 1;
+ iBlurMax = iBlurWeight / 2;
+
+ // // 변수로 루프돌리려면 반드시 필요함
+
+
+ for (int i = -63; i < 64; ++i)
{
vTexcoord.x = In.vTexcoord.x;
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
- vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 63] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBackBuffer += vColor;
@@ -429,6 +447,7 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
struct PS_OUT_BLUR_X
{
float4 vBlurX : SV_TARGET0;
+ float4 vBlurWeight : SV_TARGET1;
};
@@ -439,35 +458,38 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
float2 vTexcoord;
float4 vColor = 0.f;
- //TODO 블러 조절 해보려햇는데 실패함..
+ float fBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r;
+ int iBlurWeight = (int) (round(fBlurWeight) * 128.f);
- //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
+
- //int iBlurMin;
- //int iBlurMax;
+ int iBlurMin;
+ int iBlurMax;
- //if (iBlurWeight % 2 == 0)
+ iBlurMin = -1 * (iBlurWeight / 2) + 1;
+ iBlurMax = iBlurWeight / 2;
+
+ //for (int i = -15; i < 16; ++i)
//{
- // iBlurMin = -1 * iBlurWeight / 2;
- // iBlurMax = iBlurWeight / 2;
- //}
- //else
- //{
- // iBlurMin = -iBlurWeight / 2;
- // iBlurMax = iBlurWeight / 2 + 1;
+ // vTexcoord.x = In.vTexcoord.x;
+ // vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
+
+ // vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
//}
- //[loop] // 변수로 루프돌리려면 반드시 필요함
+ //Out.vBackBuffer += vColor;
- for (int i = -15; i < 16; ++i)
+
+ for (int i = -63; i < 64; ++i)
{
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
vTexcoord.y = In.vTexcoord.y;
- vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 63] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBlurX = vColor;
+ Out.vBlurWeight = fBlurWeight;
return Out;
}
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
index 117084542..bc18364e1 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl
@@ -38,6 +38,7 @@ struct ParticleValue
float fSizeDrag;
float3 vDeltaSize;
+ float2 vDelay;
};
@@ -79,6 +80,17 @@ void CS_MAIN(
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
+ particleValue.vDelay.x += fTimeDelta;
+
+ if (particleValue.vDelay.x < particleValue.vDelay.y)
+ {
+
+ g_VBInstanceOutput[iIndex] = particle;
+ g_ParticleValueOutput[iIndex] = particleValue;
+
+ return;
+ }
+
// 라이프타임 움직임
particle.vLifeTime.x += fTimeDelta;
@@ -97,7 +109,7 @@ void CS_MAIN(
particle.vLifeTime.x = 0.f;
particleValue.vAniIndex.x = 0.f;
-
+ particleValue.vDelay.x = 0.f;
g_VBInstanceOutput[iIndex] = particle;
g_ParticleValueOutput[iIndex] = particleValue;
diff --git a/Jusin154_Team3D/Engine/Private/Animation.cpp b/Jusin154_Team3D/Engine/Private/Animation.cpp
index 27c4cac77..4ad2f858b 100644
--- a/Jusin154_Team3D/Engine/Private/Animation.cpp
+++ b/Jusin154_Team3D/Engine/Private/Animation.cpp
@@ -248,20 +248,6 @@ HRESULT CAnimation::Initialize(const vector& Bones, const aiAnimation* p
return S_OK;
}
-HRESULT CAnimation::SaveAsBinary(HANDLE hFile, DWORD& dwByte)
-{
- size_t iNameLength = m_strName.length();
- WriteFile(hFile, &iNameLength, sizeof(size_t), &dwByte, nullptr);
- WriteFile(hFile, m_strName.data(), (DWORD)m_strName.length(), &dwByte, nullptr);
- WriteFile(hFile, &m_fDuration, sizeof(_float), &dwByte, nullptr);
- WriteFile(hFile, &m_TickPerSeconds, sizeof(_float) * 2, &dwByte, nullptr);
- WriteFile(hFile, &m_iNumChannels, sizeof(_uint), &dwByte, nullptr);
-
- for (_uint i = 0; i < m_iNumChannels; ++i) {
- m_Channels[i]->SaveAsBinary(hFile, dwByte);
- }
- return S_OK;
-}
CAnimation* CAnimation::Create(const vector& Bones, const aiAnimation* pAnimation)
{
@@ -274,36 +260,6 @@ CAnimation* CAnimation::Create(const vector& Bones, const aiAnimation* p
#endif
-HRESULT CAnimation::Initialize(HANDLE hFile, DWORD& dwByte)
-{
- size_t iNameLength = {};
- if (!ReadFile(hFile, &iNameLength, sizeof(size_t), &dwByte, nullptr)) {
- return E_FAIL;
- }
- m_strName.resize(iNameLength);
- if (!ReadFile(hFile, (void*)m_strName.data(), (DWORD)iNameLength, &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_fDuration, sizeof(_float), &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_TickPerSeconds, sizeof(_float) * 2, &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_iNumChannels, sizeof(_uint), &dwByte, nullptr)) {
- return E_FAIL;
- }
- m_CurrentKeyFrameIndices.resize(m_iNumChannels);
- m_Channels.reserve(m_iNumChannels);
- for (_uint i = 0; i < m_iNumChannels; ++i) {
- m_Channels.push_back(CChannel::Create(hFile, dwByte));
- }
- if (FAILED(Combined_Initialize())) {
- return E_FAIL;
- }
- return S_OK;
-}
-
HRESULT CAnimation::Initialize(const vector& Bones, const CModel* pModel, SaveAnimation* pSaveAnimation)
{
m_pSaveAnim = pSaveAnimation;
@@ -403,19 +359,6 @@ HRESULT CAnimation::CreateChannelBuffer(ID3D11Device* pDevice, vectorInitialize(hFile, dwByte)))
- {
- MSG_BOX("Failed to Created : CAnimation");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
CAnimation* CAnimation::Create(const vector& Bones, const CModel* pModel, SaveAnimation* pSaveAnimation)
{
CAnimation* pInstance = new CAnimation();
diff --git a/Jusin154_Team3D/Engine/Private/Camera.cpp b/Jusin154_Team3D/Engine/Private/Camera.cpp
index e809ad4ec..d320b6f3f 100644
--- a/Jusin154_Team3D/Engine/Private/Camera.cpp
+++ b/Jusin154_Team3D/Engine/Private/Camera.cpp
@@ -33,10 +33,20 @@ HRESULT CCamera::Initialize(void* pArg)
m_bActive = false;
m_iPriority = pDesc->iPriority;
m_pCameraKey = pDesc->pCameraKey;
+
+
m_pFollowTarget = pDesc->pFollowTarget;
SAFE_ADDREF(m_pFollowTarget);
m_pLookTarget = pDesc->pLookTarget;
SAFE_ADDREF(m_pLookTarget);
+ m_bEnable_TransitionLerp = pDesc->bEnableTransitionLerp;
+ m_vTransitionTime = pDesc->vTransitionTime;
+ m_bEnable_FollowLerp = pDesc->bEnableFollowLerp;
+ m_vLookLerpTime = pDesc->vLookLerpTime;
+ m_bEnable_LookLerp = pDesc->bEnableLookLerp;
+ m_vFollowLerpTime = pDesc->vFollowLerpTime;
+
+
return S_OK;
}
@@ -56,43 +66,41 @@ void CCamera::Transition(_float fTimeDelta)
if (false == m_bIsCurrentTransition) {
return;
}
- m_fTransitionCurrentTime += fTimeDelta;
- _float fRatio = m_fTransitionCurrentTime / m_fTransitionMaxTime;
+ m_vTransitionTime.x += fTimeDelta;
+ _float fRatio = m_vTransitionTime.x / m_vTransitionTime.y;
if (fRatio > 1.f) {
fRatio = 1.f;
m_bIsCurrentTransition = false;
}
- CTransform* pLookTransform = m_pLookTarget->Get_Component();
_vector vFollowTarget = m_pFollowTarget->Get_Component()->Get_State(STATE::POSITION);
- _vector vLookTarget = pLookTransform->Get_State(STATE::POSITION);
- _matrix matTarget = XMMatrixInverse(nullptr, XMMatrixLookAtLH(vFollowTarget, vLookTarget, XMVectorSet(0.f, 1.f, 0.f, 0.f)));
+ _vector vLookTarget = m_pLookTarget->Get_Component()->Get_State(STATE::POSITION);
- _vector vTargetScale{}, vTargetRotq{}, vTargetTrans{}, vOriginScale{}, vOriginRotq{}, vOriginTrans{};
- XMMatrixDecompose(&vTargetScale, &vTargetRotq, &vTargetTrans, matTarget);
- XMMatrixDecompose(&vOriginScale, &vOriginRotq, &vOriginTrans, m_pTransformCom->Get_XMWorldMatrix());
+ _matrix xmMatTarget = XMMatrixInverse(nullptr, XMMatrixLookAtLH(vFollowTarget, vLookTarget, XMVectorSet(0.f, 1.f, 0.f, 0.f)));
- vTargetScale = XMVectorLerp(vOriginScale, vTargetScale, fRatio);
- vTargetRotq = XMQuaternionSlerp(vOriginRotq, vTargetRotq, fRatio);
- vTargetTrans = XMVectorLerp(vOriginTrans, vTargetTrans, fRatio);
+ _float4x4 matOrigin = *m_pTransformCom->Get_WorldMatrixPtr();
+ _float4x4 matTarget = {}; XMStoreFloat4x4(&matTarget, xmMatTarget);
+ _float4x4 matResult = {};
- m_pTransformCom->Set_WorldMatrix(XMMatrixAffineTransformation(vTargetScale, XMVectorZero(), vTargetRotq, vTargetTrans));
+ CMyTools::MatrixLerp(&matOrigin, &matTarget, matResult, fRatio);
+
+ m_pTransformCom->Set_WorldMatrix(matResult);
}
void CCamera::Active_Camera(pair<_float4, _float3>& pairTransitionInfo)
{
- //if (true == m_bTransitionLerp) {
- // m_pTransformCom->Set_WorldMatrix(XMMatrixAffineTransformation(XMVectorSplatOne(), XMVectorZero(),
- // XMLoadFloat4(&pairTransitionInfo.first), XMLoadFloat3(&pairTransitionInfo.second)));
- // m_fTransitionCurrentTime = 0.f;
- // m_bIsCurrentTransition = true;
- //}
+ if (true == m_bEnable_TransitionLerp) {
+ m_pTransformCom->Set_WorldMatrix(XMMatrixAffineTransformation(XMVectorSplatOne(), XMVectorZero(),
+ XMLoadFloat4(&pairTransitionInfo.first), XMLoadFloat3(&pairTransitionInfo.second)));
+ m_vTransitionTime.x = 0.f;
+ m_bIsCurrentTransition = true;
+ }
m_bActive = true;
}
void CCamera::DeActive_Camera(pair<_float4, _float3>& pairTransition)
{
- m_bActive = false;
+ m_bActive = false;
m_bIsCurrentTransition = false;
_vector vScale{}, vRotq{}, vTrans{};
XMMatrixDecompose(&vScale, &vRotq, &vTrans, m_pTransformCom->Get_XMWorldMatrix());
diff --git a/Jusin154_Team3D/Engine/Private/Channel.cpp b/Jusin154_Team3D/Engine/Private/Channel.cpp
index 4b3a29790..07aa53faf 100644
--- a/Jusin154_Team3D/Engine/Private/Channel.cpp
+++ b/Jusin154_Team3D/Engine/Private/Channel.cpp
@@ -87,22 +87,6 @@ CHANNEL_DESC CChannel::Fill_GPU_ChannelDesc()
}
-
-HRESULT CChannel::SaveAsBinary(HANDLE hFile, DWORD& dwByte)
-{
- string strName = m_szName;
- strName.shrink_to_fit();
- DWORD iLength = (DWORD)strName.length();
- WriteFile(hFile, &iLength, sizeof(_uint), &dwByte, nullptr);
- WriteFile(hFile, strName.data(), iLength, &dwByte, nullptr);
- WriteFile(hFile, &m_iBoneIndex, sizeof(_int), &dwByte, nullptr);
- WriteFile(hFile, &m_iNumKeyFrames, sizeof(_uint), &dwByte, nullptr);
- for (auto& keyFrame : m_KeyFrames) {
- WriteFile(hFile, &keyFrame, sizeof(KEYFRAME), &dwByte, nullptr);
- }
- return S_OK;
-}
-
CChannel* CChannel::Create(const vector& Bones, const aiNodeAnim* pAIChannel)
{
CChannel* pInstance = new CChannel();
@@ -190,14 +174,14 @@ void CChannel::Update_TransformationMatirx(const vector& Bones, const LO
XMStoreFloat3(&vCurRootPos, vTranslation);
XMMATRIX pre = XMLoadFloat4x4(&m_PreTransformMatrix);
-
+ /*
if (!m_bInitialRootPos)
{
m_bInitialRootPos = true;
vTranslation = XMVectorZero();
}
else
- {
+ {*/
_vector vDeltaLocal = XMLoadFloat3(&vCurRootPos) - XMLoadFloat3(&m_vPrevRootPos);
_vector vDeltaAdjusted = {};
@@ -219,12 +203,11 @@ void CChannel::Update_TransformationMatirx(const vector& Bones, const LO
_vector vCurrentPos = pTransform->Get_State(STATE::POSITION);
_vector vTargetPos = vCurrentPos + vDeltaWorld;
- pTransform->Set_State(STATE::POSITION, vTargetPos);
- //pTransform->AccumulateMomentum(vDeltaWorld);
+ pTransform->AccumulateMomentum(vDeltaWorld);
m_vPrevRootPos = vCurRootPos;
vTranslation = XMVectorZero();
- }
+ //}
///////////////////////////////////
_float4 curRotF4;
@@ -356,32 +339,6 @@ HRESULT CChannel::Initialize(const CModel* pModel, SaveChannel* pSaveChannel)
return S_OK;
}
-CChannel* CChannel::Create(const vector& Bones, _uint iIndex)
-{
- CChannel* pInstance = new CChannel();
-
- if (FAILED(pInstance->Initialize(Bones, iIndex)))
- {
- MSG_BOX("Failed to Created : CChannel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
-CChannel* CChannel::Create(HANDLE hFile, DWORD& dwByte)
-{
- CChannel* pInstance = new CChannel();
-
- if (FAILED(pInstance->Initialize(hFile, dwByte)))
- {
- MSG_BOX("Failed to Created : CChannel");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
CChannel* CChannel::Create(const CModel* pModel, SaveChannel* pSaveChannel)
{
CChannel* pInstance = new CChannel();
diff --git a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp
index eebd01e99..d4e668c26 100644
--- a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp
+++ b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp
@@ -110,14 +110,9 @@ void CComputeShader::Bind_UAV(_uint iIndex)
void CComputeShader::Bind_OutPut_SRV(_uint iIndex, _uint iBufferIndex)
{
- //m_pContext->PSSetShaderResources(iIndex, // 시작슬롯 번호
- // 1, // 버퍼 개수
- // &m_pOutputSRV[iBufferIndex]); // 버퍼 시작 주소
-
- ID3D11ShaderResourceView* pSRV = m_pOutputSRV[iBufferIndex];
-
- // VS에 바인딩
- m_pContext->VSSetShaderResources(iIndex, 1, &pSRV);
+ m_pContext->PSSetShaderResources(iIndex, // 시작슬롯 번호
+ 1, // 버퍼 개수
+ &m_pOutputSRV[iBufferIndex]); // 버퍼 시작 주
}
diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
index 3d44b170e..c276489f8 100644
--- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
+++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
@@ -451,8 +451,8 @@ void CInstance_Model::Instane_Buffer_ReStruct()
pParticleValues[i].fGravity = m_pGameInstance->Random_Float(m_InstanceDesc.vGravity.x, m_InstanceDesc.vGravity.y);
pParticleValues[i].fDrag = m_pGameInstance->Random_Float(m_InstanceDesc.vDrag.x, m_InstanceDesc.vDrag.y);
pParticleValues[i].fSizeDrag = m_pGameInstance->Random_Float(m_InstanceDesc.vSizeDrag.x, m_InstanceDesc.vSizeDrag.y);
-
-
+ pParticleValues[i].vDelay = _float2(0.0f, m_pGameInstance->Random_Float(m_InstanceDesc.vDelay.x, m_InstanceDesc.vDelay.y));
+
memcpy(&pParticleValues[i].vOriginRight, SRMatrix.m[0], sizeof(_float4));
memcpy(&pParticleValues[i].vOriginUp, SRMatrix.m[1], sizeof(_float4));
memcpy(&pParticleValues[i].vOriginLook, SRMatrix.m[2], sizeof(_float4));
@@ -628,6 +628,11 @@ void CInstance_Model::Describe_Entity()
Instane_Buffer_ReStruct();
}
+ if (ImGui::DragFloat2("Delay", reinterpret_cast<_float*>(&m_InstanceDesc.vDelay)))
+ {
+ Instane_Buffer_ReStruct();
+ }
+
if (ImGui::DragFloat2("DiffuseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDiffuseUVMoveTime)))
{
Instane_Buffer_ReStruct();
diff --git a/Jusin154_Team3D/Engine/Private/LerpAnim.cpp b/Jusin154_Team3D/Engine/Private/LerpAnim.cpp
index ed36a6c1d..1bbfe912f 100644
--- a/Jusin154_Team3D/Engine/Private/LerpAnim.cpp
+++ b/Jusin154_Team3D/Engine/Private/LerpAnim.cpp
@@ -36,16 +36,6 @@ HRESULT CLerpAnim::Initialize(_uint iNumBone, _float fTickPerSecond, const vecto
m_InitialFrames.resize(m_iNumChannels);
m_Channels.reserve(m_iNumChannels);
- for (_uint i = 0; i < m_iNumChannels; ++i) {
- CChannel* pChannel = CChannel::Create(Bones, i);
- if (nullptr == pChannel) {
- return E_FAIL;
- }
- m_Channels.push_back(pChannel);
- Bones[i]->Get_KeyFrame(m_InitialFrames[i], false);
- m_InitialFrames[i].fTrackPosition = m_fDuration;
- pChannel->Set_Frame(1, m_InitialFrames[i]);
- }
return S_OK;
}
void CLerpAnim::Begin(const vector& Bones, vector& StartFrames, vector& EndFrames, _float fDuration, _uint iRootBoneIndex)
diff --git a/Jusin154_Team3D/Engine/Private/Mesh.cpp b/Jusin154_Team3D/Engine/Private/Mesh.cpp
index 4b950894a..1b30573ca 100644
--- a/Jusin154_Team3D/Engine/Private/Mesh.cpp
+++ b/Jusin154_Team3D/Engine/Private/Mesh.cpp
@@ -149,87 +149,6 @@ HRESULT CMesh::Render_Instance(_uint iNumInstance)
return S_OK;
}
-
-HRESULT CMesh::Initialize_Prototype(HANDLE hFile, DWORD& dwByte)
-{
- { // 멤버변수
- if (!ReadFile(hFile, &m_iMaterialIndex, sizeof(_uint), &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_iNumVertexBuffers, sizeof(_uint), &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_iNumVertices, sizeof(_uint), &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_iVertexStride, sizeof(_uint), &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_iNumIndices, sizeof(_uint), &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_iIndexStride, sizeof(_uint), &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_iNumBones, sizeof(_uint), &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_eIndexFormat, sizeof(DXGI_FORMAT), &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &m_ePrimitive, sizeof(D3D_PRIMITIVE_TOPOLOGY), &dwByte, nullptr)) {
- return E_FAIL;
- }
- DWORD iSize = {};
- if (!ReadFile(hFile, &iSize, sizeof(DWORD), &dwByte, nullptr)) {
- return E_FAIL;
- }
- m_BoneIndices.resize(iSize / sizeof(_int));
- if (!ReadFile(hFile, m_BoneIndices.data(), iSize, &dwByte, nullptr)) {
- return E_FAIL;
- }
- if (!ReadFile(hFile, &iSize, sizeof(DWORD), &dwByte, nullptr)) {
- return E_FAIL;
- }
- m_offsetMatrices.resize(iSize / sizeof(_float4x4));
- if (!ReadFile(hFile, m_offsetMatrices.data(), iSize, &dwByte, nullptr)) {
- DWORD err = GetLastError();
- return E_FAIL;
- }
-
- m_pBoneMatrices = new _float4x4[0 == m_iNumBones ? 1 : m_iNumBones];
- ZeroMemory(m_pBoneMatrices, sizeof(_float4x4) * m_iNumBones);
- }
- { // Vertex Buffer
- HRESULT hr = (m_iVertexStride == sizeof(VTXMESH)) ?
- Ready_VertexBuffer_For_NonAnim(hFile, dwByte) :
- Ready_VertexBuffer_For_Anim(hFile, dwByte);
- }
- { // Index Buffer
- D3D11_BUFFER_DESC IBDesc{};
- if (!ReadFile(hFile, &IBDesc, sizeof(D3D11_BUFFER_DESC), &dwByte, nullptr)) {
- return E_FAIL;
- }
-
- _uint* pIndices = new _uint[m_iNumIndices];
- ZeroMemory(pIndices, sizeof(_uint) * m_iNumIndices);
-
- if (!ReadFile(hFile, pIndices, IBDesc.ByteWidth, &dwByte, nullptr)) {
- return E_FAIL;
- }
-
- D3D11_SUBRESOURCE_DATA InitialIBData{};
- InitialIBData.pSysMem = pIndices;
-
- if (FAILED(m_pDevice->CreateBuffer(&IBDesc, &InitialIBData, &m_pIB))) {
- return E_FAIL;
- }
-
- Safe_Delete_Array(pIndices);
- }
- return S_OK;
-}
-
HRESULT CMesh::Initialize_Prototype(MODEL eType, const CModel* pModel, SaveMesh* _SaveMesh, _fmatrix PreTransformMatrix)
{
strcpy_s(m_szName, _SaveMesh->MeshName.c_str());
@@ -294,64 +213,6 @@ HRESULT CMesh::Initialize_Prototype(MODEL eType, const CModel* pModel, SaveMesh*
return S_OK;
}
-HRESULT CMesh::Ready_VertexBuffer_For_NonAnim(HANDLE hFile, DWORD& dwByte)
-{
- D3D11_BUFFER_DESC VBDesc{};
- if (!ReadFile(hFile, &VBDesc, sizeof(D3D11_BUFFER_DESC), &dwByte, nullptr)) {
- return E_FAIL;
- }
- VTXMESH* pVertices = new VTXMESH[m_iNumVertices]{};
- ZeroMemory(pVertices, sizeof(VTXMESH) * m_iNumVertices);
-
- m_pVertexPositions = new _float3[m_iNumVertices];
- ZeroMemory(m_pVertexPositions, sizeof(_float3) * m_iNumVertices);
- if (!ReadFile(hFile, pVertices, VBDesc.ByteWidth, &dwByte, nullptr)) {
- return E_FAIL;
- }
- for (_uint i = 0; i < m_iNumVertices; ++i) {
- m_pVertexPositions[i] = pVertices[i].vPosition;
- }
- D3D11_SUBRESOURCE_DATA InitialVBData{};
- InitialVBData.pSysMem = pVertices;
-
- if (FAILED(m_pDevice->CreateBuffer(&VBDesc, &InitialVBData, &m_pVB))) {
- return E_FAIL;
- }
-
- Safe_Delete_Array(pVertices);
-
- return S_OK;
-}
-
-HRESULT CMesh::Ready_VertexBuffer_For_Anim(HANDLE hFile, DWORD& dwByte)
-{
- D3D11_BUFFER_DESC VBDesc{};
- if (!ReadFile(hFile, &VBDesc, sizeof(D3D11_BUFFER_DESC), &dwByte, nullptr)) {
- return E_FAIL;
- }
- VTXANIMMESH* pVertices = new VTXANIMMESH[m_iNumVertices]{};
- ZeroMemory(pVertices, sizeof(VTXANIMMESH) * m_iNumVertices);
-
- m_pVertexPositions = new _float3[m_iNumVertices];
- ZeroMemory(m_pVertexPositions, sizeof(_float3) * m_iNumVertices);
- if (!ReadFile(hFile, pVertices, VBDesc.ByteWidth, &dwByte, nullptr)) {
- return E_FAIL;
- }
- for (_uint i = 0; i < m_iNumVertices; ++i) {
- m_pVertexPositions[i] = pVertices[i].vPosition;
- }
- D3D11_SUBRESOURCE_DATA InitialVBData{};
- InitialVBData.pSysMem = pVertices;
-
- if (FAILED(m_pDevice->CreateBuffer(&VBDesc, &InitialVBData, &m_pVB))) {
- return E_FAIL;
- }
-
- Safe_Delete_Array(pVertices);
-
- return S_OK;
-}
-
HRESULT CMesh::Ready_VertexBuffer_For_NonAnim(SaveMesh* SaveMesh, _fmatrix PreTransformMatrix)
{
m_iVertexStride = sizeof(VTXMESH);
@@ -533,80 +394,6 @@ CMesh* CMesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL
return pInstance;
}
-HRESULT CMesh::SaveAsBinary(HANDLE hFile, DWORD& dwByte)
-{
- { // 멤버변수
- WriteFile(hFile, &m_iMaterialIndex, sizeof(_uint), &dwByte, nullptr);
- WriteFile(hFile, &m_iNumVertexBuffers, sizeof(_uint), &dwByte, nullptr);
- WriteFile(hFile, &m_iNumVertices, sizeof(_uint), &dwByte, nullptr);
- WriteFile(hFile, &m_iVertexStride, sizeof(_uint), &dwByte, nullptr);
- WriteFile(hFile, &m_iNumIndices, sizeof(_uint), &dwByte, nullptr);
- WriteFile(hFile, &m_iIndexStride, sizeof(_uint), &dwByte, nullptr);
- WriteFile(hFile, &m_iNumBones, sizeof(_uint), &dwByte, nullptr);
- WriteFile(hFile, &m_eIndexFormat, sizeof(DXGI_FORMAT), &dwByte, nullptr);
- WriteFile(hFile, &m_ePrimitive, sizeof(D3D_PRIMITIVE_TOPOLOGY), &dwByte, nullptr);
-
- DWORD iSize = (DWORD)(sizeof(_int) * m_BoneIndices.size());
- WriteFile(hFile, &iSize, sizeof(DWORD), &dwByte, nullptr);
- WriteFile(hFile, m_BoneIndices.data(), iSize, &dwByte, nullptr);
-
- iSize = (DWORD)(sizeof(_float4x4) * m_offsetMatrices.size());
- WriteFile(hFile, &iSize, sizeof(DWORD), &dwByte, nullptr);
- WriteFile(hFile, m_offsetMatrices.data(), iSize, &dwByte, nullptr);
- }
- { // Vertex Buffer
- D3D11_BUFFER_DESC VBDesc{};
- m_pVB->GetDesc(&VBDesc); // 버퍼 디스크립션 저장
- WriteFile(hFile, &VBDesc, sizeof(D3D11_BUFFER_DESC), &dwByte, nullptr);
-
- D3D11_BUFFER_DESC StagingDesc{};
- StagingDesc.Usage = D3D11_USAGE_STAGING;
- StagingDesc.ByteWidth = VBDesc.ByteWidth;
- StagingDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
- StagingDesc.BindFlags = 0;
- StagingDesc.MiscFlags = 0;
-
- ID3D11Buffer* pStaging = nullptr;
- if (FAILED(m_pDevice->CreateBuffer(&StagingDesc, nullptr, &pStaging)) || nullptr == pStaging) {
- return E_FAIL;
- }
- m_pContext->CopyResource(pStaging, m_pVB); // 버퍼 복사
-
- D3D11_MAPPED_SUBRESOURCE mapped{};
- m_pContext->Map(pStaging, 0, D3D11_MAP_READ, 0, &mapped);
- WriteFile(hFile, mapped.pData, VBDesc.ByteWidth, &dwByte, nullptr);
-
- m_pContext->Unmap(pStaging, 0);
- pStaging->Release();
- }
- { // Index Buffer
- D3D11_BUFFER_DESC IBDesc{};
- m_pIB->GetDesc(&IBDesc);
- WriteFile(hFile, &IBDesc, sizeof(D3D11_BUFFER_DESC), &dwByte, nullptr);
-
- D3D11_BUFFER_DESC StagingDesc{};
- StagingDesc.Usage = D3D11_USAGE_STAGING;
- StagingDesc.ByteWidth = IBDesc.ByteWidth;
- StagingDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
- StagingDesc.BindFlags = 0;
- StagingDesc.MiscFlags = 0;
-
- ID3D11Buffer* pStaging = nullptr;
- if (FAILED(m_pDevice->CreateBuffer(&StagingDesc, nullptr, &pStaging)) || nullptr == pStaging) {
- return E_FAIL;
- }
- m_pContext->CopyResource(pStaging, m_pIB);
-
- D3D11_MAPPED_SUBRESOURCE mapped{};
- m_pContext->Map(pStaging, 0, D3D11_MAP_READ, 0, &mapped);
- WriteFile(hFile, mapped.pData, IBDesc.ByteWidth, &dwByte, nullptr);
-
- m_pContext->Unmap(pStaging, 0);
- pStaging->Release();
- }
- return S_OK;
-}
-
PSX::PxTriangleMesh* CMesh::ConvertToPxMesh(const PSX::PxCookingParams* pParam, PSX::PxPhysics* pPhysX, _matrix WorldMatrix)
{
PSX::PxTriangleMeshDesc tMeshDesc = {};
@@ -779,19 +566,6 @@ HRESULT CMesh::Ready_VertexBuffer_For_Anim(vector& Bones, const ai
}
#endif
-CMesh* CMesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, HANDLE hFile, DWORD& dwByte)
-{
- CMesh* pInstance = new CMesh(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype(hFile, dwByte)))
- {
- MSG_BOX("Failed to Created : CMesh");
- SAFE_RELEASE(pInstance);
- }
-
- return pInstance;
-}
-
CMesh* CMesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, const CModel* pModel, SaveMesh* _SaveMesh, _fmatrix PreTransformMatrix)
{
CMesh* pInstance = new CMesh(pDevice, pContext);
diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp
index 5ae671060..6bd49333b 100644
--- a/Jusin154_Team3D/Engine/Private/Model.cpp
+++ b/Jusin154_Team3D/Engine/Private/Model.cpp
@@ -83,45 +83,6 @@ _int CModel::Get_BoneIndex(const _char* pBoneName) const
return iBoneIndex;
}
-void CModel::Change_AnimationIndex(_int iAnimationIndex, _bool bIsLoop, _float fLerpDuration, _bool bIgnoreCurrentIndex)
-{
- if (false == bIgnoreCurrentIndex && m_iCurrentAnimIndex == iAnimationIndex) { return; }
- m_iCurrentAnimIndex = iAnimationIndex;
- m_bIsLoop = bIsLoop;
- RefreshAnim();
-
- m_PrevAnimationMatrix = Get_BoneMatrix(m_iRootBoneIndex);
-
-
- m_Animations[m_iCurrentAnimIndex]->Depart_Animation(); // 애니메이션 종료 이벤트 ( 럴프애님은 자체적으로 불림 )
- vector<_int>* BeforeAnimIndex = m_Animations[m_iCurrentAnimIndex]->Capture_Bones(); // 영향을 받는 본 인덱스 추출 1
- vector<_int>* AfterAnimIndex = m_Animations[iAnimationIndex]->Capture_Bones(); // 영향을 받는 본 인덱스 추출 2
- unordered_set<_int> UnionAnimIndex = {};
-
- vector LerpStartFrames;
- for (_int i : *BeforeAnimIndex) {
- UnionAnimIndex.insert(i);
- }
- for (_int i : *AfterAnimIndex) {
- UnionAnimIndex.insert(i);
- }
- LerpStartFrames.reserve(UnionAnimIndex.size()); // 영향을 받는 모든 현재 본을 가져옴
-
- // 스타팅 키프레임 채우기 pair < 본 인덱스, 키프레임 >
- for (auto iter = UnionAnimIndex.begin(); iter != UnionAnimIndex.end(); ++iter) {
- LERPDESC desc = {};
- desc.iSlot = *iter;
- m_Bones[desc.iSlot]->Get_KeyFrame(desc.tagKeyFrame, true); // 스타팅 키프레임 채우기
- LerpStartFrames.emplace_back(desc);
- }
-
- // 엔딩 키프레임 채우기 pair < 본인덱스, 키프레임 >
- vector LerpEndFrames = m_Animations[iAnimationIndex]->Get_StartFrameInformations();
-
- // 럴프 애니메이션 시작
- m_pLerpAnim->Begin(m_Bones, LerpStartFrames, LerpEndFrames, fLerpDuration, m_iRootBoneIndex);
-
-}
HRESULT CModel::Bind_Material(_uint iMeshIndex, CShader* pShader)
{
if (iMeshIndex >= m_iNumMeshes) {
@@ -154,6 +115,8 @@ _bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform)
return false; // 잘못된 초기화
}
+ ComputeAnimation();
+
if (m_iPreAnimIndex != m_iCurrentAnimIndex && m_iPreAnimIndex != 0)
{
m_fBlendTime += fTimeDelta;
@@ -204,55 +167,6 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop)
m_iCurrentAnimIndex = -1;
}
-void CModel::Stop_Animation()
-{
- if (-1 == m_iCurrentAnimIndex // 정지 혹은 시작을 안시켜준 애님
- || m_iCurrentAnimIndex >= (_int)m_iNumAnimations) // 애님 인덱스 초과됨
- {
- return; // 잘못된 초기화
- }
-
- m_Animations[m_iCurrentAnimIndex]->Depart_Animation(); // 애님이 퇴근할 때 불리는 함수를 부르면서 초기상태로 되돌림
-}
-
-void CModel::RefreshAnim()
-{
- m_bIsFinishedAnim = false;
- m_bIsFinishedLerp = false;
-}
-_float CModel::Get_AnimProgressRatio()
-{
- return m_Animations[m_iCurrentAnimIndex]->Get_AnimProgressRatio();
-}
-_int CModel::Get_AnimProgressPostion(const _char* pAnimChannelName)
-{
- return m_Animations[m_iCurrentAnimIndex]->Get_AnimProgressPostion(pAnimChannelName);
-}
-_float CModel::Get_AnimEstimatedDuration()
-{
- if (MODEL::ANIM == m_eType) {
- return m_Animations[m_iCurrentAnimIndex]->Get_AnimEstimatedDuration();
- }
- else {
- return 0.f;
- }
-
-}
-void CModel::Set_AnimProgressPostion(const _char* pChannelName, _uint iPosition)
-{
- return m_Animations[m_iCurrentAnimIndex]->Set_AnimProgressPostion(pChannelName, iPosition);
-}
-void CModel::Set_AnimPauseState(_bool bValue) {
- m_Animations[m_iCurrentAnimIndex]->Set_AnimPause(bValue);
-}
-
-void CModel::ReallocateResources(CTransform* pTransform)
-{
- SAFE_RELEASE(m_pTransform);
- m_pTransform = pTransform;
- SAFE_ADDREF(m_pTransform);
-}
-
const _float4x4* CModel::Get_BoneMatrixPtr(const _char* pBoneName) const
{
vector::const_iterator iter = find_if(m_Bones.begin(), m_Bones.end(), [&](CBone* pBone)->_bool
@@ -278,15 +192,6 @@ _matrix CModel::Get_BoneMatrix(_uint iBoneIndex)
return m_Bones[iBoneIndex]->Get_CombinedTransformationMatrix();
}
-void CModel::Get_BoneMatrices(_float4x4* pOut)
-{
- if (0 == m_Bones.size()) {
- return;
- }
- for (_uint i = 0; i < m_Bones.size(); ++i) {
- pOut[i] = *m_Bones[i]->Get_CombinedTransformationMatrixPtr();
- }
-}
void CModel::Set_CurrentTrackPosition(_float TrackPosition)
{
@@ -303,6 +208,11 @@ _float CModel::Get_CurrentTrackPosition()
return m_Animations[m_iCurrentAnimIndex]->Get_CurrentTrackPosition();
}
+_float CModel::Get_CurrentTrackProgressRatio()
+{
+ return m_Animations[m_iCurrentAnimIndex]->Get_CurrentTrackProgressRatio();
+}
+
_float CModel::Get_AnimSpeed()
{
return m_Animations[m_iCurrentAnimIndex]->Get_AnimSpeed();
@@ -313,16 +223,6 @@ void CModel::Set_AnimSpeed(_float fSpeed)
m_Animations[m_iCurrentAnimIndex]->Set_AnimSpeed(fSpeed);
}
-void CModel::Set_Anim(CModel* Source)
-{
- for (auto& Animations : Source->m_Animations)
- {
- m_Animations.push_back(Animations);
- }
-
- m_iNumAnimations += (_uint)Source->m_Animations.size();
-}
-
HRESULT CModel::Render(_uint iMeshIndex)
{
@@ -1005,16 +905,6 @@ HRESULT CModel::Create_ParentVB()
return S_OK;
}
-
-void CModel::Get_BoneMatrix()
-{
- m_BoneMatrix.resize(m_Bones.size());
- for (size_t i =0; i < m_Bones.size(); i++)
- {
- m_BoneMatrix[i] = (*m_Bones[i]->Get_CombinedTransformationMatrixPtr());
- }
-}
-
HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix)
{
m_eType = eType;
diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp
index 07f23ed5d..b6893b462 100644
--- a/Jusin154_Team3D/Engine/Private/Renderer.cpp
+++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp
@@ -264,6 +264,9 @@ void CRenderer::Render_Combined()
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X"), m_pShader, "g_BlurXTexture"))) {
return;
}
+ if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X_Weight"), m_pShader, "g_BlurWeightXTexture"))) {
+ return;
+ }
}
@@ -368,13 +371,18 @@ void CRenderer::Render_Blur()
return;
}
+ if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_Weight"), m_pShader, "g_BlurWeightTexture"))) {
+ return;
+ }
+
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::BLUR));
m_pVIBuffer->Bind_Resources();
m_pVIBuffer->Render();
- if (FAILED(m_pGameInstance->End_MRT())) {
+ if (FAILED(m_pGameInstance->End_MRT()))
+ {
return;
}
@@ -566,23 +574,30 @@ HRESULT CRenderer::Initialize()
}
/* Target_Blur */
-
- if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height,
- DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) {
- return E_FAIL;
- }
-
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur"), (_uint)Viewport.Width, (_uint)Viewport.Height,
DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height,
+ DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) {
+ return E_FAIL;
+ }
+
+
/* Target_Blur_X */
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_X"), (_uint)Viewport.Width, (_uint)Viewport.Height,
DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_X_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height,
+ DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) {
+ return E_FAIL;
+ }
+
+
+
/* Target_Color*/
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Color"), (_uint)Viewport.Width, (_uint)Viewport.Height,
DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
@@ -649,11 +664,20 @@ HRESULT CRenderer::Initialize()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur"), TEXT("Target_Blur_Weight")))) {
+ return E_FAIL;
+ }
+
/* MRT_Blur_X */
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X")))) {
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X_Weight")))) {
+ return E_FAIL;
+ }
+
+
/* MRT_Color */
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Color"), TEXT("Target_Color")))) {
return E_FAIL;
diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp
index 452e704f4..627bd6bf4 100644
--- a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp
+++ b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp
@@ -131,6 +131,32 @@ HRESULT CVIBuffer_UI_Instance::Initialize(void* pArg)
return S_OK;
}
+void CVIBuffer_UI_Instance::Set_Index_Position(_uint iIndex, _float fX, _float fY)
+{
+ D3D11_MAPPED_SUBRESOURCE SubResource{};
+ m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource);
+
+ VTX_INSTANCE_UI* pVertices = static_cast(SubResource.pData);
+
+ pVertices[iIndex].fPos.x = fX;
+ pVertices[iIndex].fPos.y = fY;
+
+ m_pContext->Unmap(m_pVBInstance, 0);
+}
+
+void CVIBuffer_UI_Instance::Set_Index_Size(_uint iIndex, _float fSizeX, _float fSizeY)
+{
+ D3D11_MAPPED_SUBRESOURCE SubResource{};
+ m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource);
+
+ VTX_INSTANCE_UI* pVertices = static_cast(SubResource.pData);
+
+ pVertices[iIndex].fSize.x = fSizeX;
+ pVertices[iIndex].fSize.y = fSizeY;
+
+ m_pContext->Unmap(m_pVBInstance, 0);
+}
+
void CVIBuffer_UI_Instance::Set_Pos(_float fX, _float fY, _float OffSetX, _float OffSetY, _uint iCols)
{
@@ -213,7 +239,7 @@ void CVIBuffer_UI_Instance::Set_ImageUV(UI_ATLAS_DESC* AtlasUV)
if (AtlasUV == nullptr)
{
pVertices[i].fUVStart = _float2(0.f, 0.f);
- pVertices[i].fUVStart = _float2(1.f,1.f);
+ pVertices[i].fUVStart = _float2(1.f, 1.f);
}
else
{
@@ -225,6 +251,25 @@ void CVIBuffer_UI_Instance::Set_ImageUV(UI_ATLAS_DESC* AtlasUV)
m_pContext->Unmap(m_pVBInstance, 0);
}
+void CVIBuffer_UI_Instance::Add_InstanceOvject(vector<_uint> VisileIndices)
+{
+ m_VisibleIndices = VisileIndices;
+ D3D11_MAPPED_SUBRESOURCE SubResource{};
+
+ m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource);
+
+ VTX_INSTANCE_UI* pVertices = static_cast(SubResource.pData);
+
+ for (_uint i = 0; i < m_VisibleIndices.size(); ++i)
+ {
+ pVertices[i] = m_pInstanceVertices[m_VisibleIndices[i]];
+ }
+
+
+ m_pContext->Unmap(m_pVBInstance, 0);
+
+}
+
CVIBuffer_UI_Instance* CVIBuffer_UI_Instance::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const INSTANCE_DESC* pInstanceDesc)
{
CVIBuffer_UI_Instance* pInstance = new CVIBuffer_UI_Instance(pDevice, pContext);
diff --git a/Jusin154_Team3D/Engine/Public/Animation.h b/Jusin154_Team3D/Engine/Public/Animation.h
index 3140d3dd6..d96ba3570 100644
--- a/Jusin154_Team3D/Engine/Public/Animation.h
+++ b/Jusin154_Team3D/Engine/Public/Animation.h
@@ -26,8 +26,9 @@ class ENGINE_DLL CAnimation : public CBase
const _string& Get_Name() const { return m_strName; }
const _char* Get_SZName() const { return m_szName; }
- void Set_CurrentTrackPosition(_float TrackPosition) { m_fCurrentTrackPosition =TrackPosition; }
+ void Set_CurrentTrackPosition(_float TrackPosition) { m_fCurrentTrackPosition = TrackPosition; }
_float Get_CurrentTrackPosition() { return m_fCurrentTrackPosition; }
+ _float Get_CurrentTrackProgressRatio() { return m_fCurrentTrackPosition / m_fDuration; }
void Set_AnimSpeed(_float fSpeed) { m_fAnimSpeed = fSpeed; }
_float Get_AnimSpeed() { return m_fAnimSpeed; }
@@ -42,12 +43,10 @@ class ENGINE_DLL CAnimation : public CBase
private:
HRESULT Initialize(const vector& Bones, const aiAnimation* pAIAnimation);
public:
- HRESULT SaveAsBinary(HANDLE hFile, DWORD& dwByte);
static CAnimation* Create(const vector& Bones, const aiAnimation* pAnimation);
#endif // EDITOR_PROJECT
private:
- HRESULT Initialize(HANDLE hFile, DWORD& dwByte);
// 바이너리
HRESULT Initialize(const vector& Bones, const class CModel* pModel,SaveAnimation* pSaveAnimation);
//
@@ -90,7 +89,6 @@ class ENGINE_DLL CAnimation : public CBase
ID3D11ShaderResourceView* m_pKeyFrameSrv = {};
ID3D11ShaderResourceView* m_pChannelSrv = {};
public:
- static CAnimation* Create(HANDLE hFile, DWORD& dwByte);
// 바이너리
static CAnimation* Create(const vector& Bones, const class CModel* pModel, SaveAnimation* pSaveAnimation);
//
diff --git a/Jusin154_Team3D/Engine/Public/Camera.h b/Jusin154_Team3D/Engine/Public/Camera.h
index 595ab25f9..a055af9ce 100644
--- a/Jusin154_Team3D/Engine/Public/Camera.h
+++ b/Jusin154_Team3D/Engine/Public/Camera.h
@@ -12,8 +12,19 @@ class ENGINE_DLL CCamera abstract : public CGameObject
_float fFovy{}, fNear{}, fFar{};
_uint iPriority = { UINT_MAX };
const _wchar* pCameraKey = { };
- CGameObject* pFollowTarget = { nullptr };
- CGameObject* pLookTarget = { nullptr };
+
+ // Lerping
+ CGameObject* pFollowTarget = { nullptr };
+ CGameObject* pLookTarget = { nullptr };
+
+ _bool bEnableTransitionLerp = { false };
+ _float2 vTransitionTime = { 0.f, 1.f };
+
+ _bool bEnableLookLerp = { false };
+ _float2 vLookLerpTime = { 0.f, 0.16f };
+
+ _bool bEnableFollowLerp = { false };
+ _float2 vFollowLerpTime = { 0.f, 0.16f };
}CAMERA_DESC;
protected:
@@ -40,12 +51,21 @@ class ENGINE_DLL CCamera abstract : public CGameObject
_float m_fNear = {};
_float m_fFar = {};
- _float m_fTransitionMaxTime = { 1.f };
- _float m_fTransitionCurrentTime = { 0.f };
-
+ _float2 m_vTransitionTime = { 0.f, 1.f };
+ _float2 m_vLookLerpTime = { 0.f, 0.16f };
+ _float3 m_vLookPos_Src = { 0.f, 0.f, 1.f };
+ _float3 m_vLookPos_Dest = { 0.f, 0.f, 1.f };
+ _float2 m_vFollowLerpTime = { 0.f, 0.16f };
+ _float3 m_vFollowPos_Src = { 0.f, 0.f, 0.f };
+ _float3 m_vFollowPos_Dest = { 0.f, 0.f, 0.f };
_uint m_iPriority = { UINT_MAX };
_bool m_bIsCurrentTransition = { false };
+ _bool m_bEnable_TransitionLerp = { false };
+ _bool m_bEnable_LookLerp = { false };
+ _bool m_bEnable_FollowLerp = { false };
+
+
_bool m_bActive = { false };
diff --git a/Jusin154_Team3D/Engine/Public/Channel.h b/Jusin154_Team3D/Engine/Public/Channel.h
index 759f3718c..02626af9f 100644
--- a/Jusin154_Team3D/Engine/Public/Channel.h
+++ b/Jusin154_Team3D/Engine/Public/Channel.h
@@ -15,7 +15,6 @@ class ENGINE_DLL CChannel : public CBase
HRESULT Initialize(const vector& Bones, const aiNodeAnim* pAIChannel);
public:
- HRESULT SaveAsBinary(HANDLE hFile, DWORD& dwByte);
static CChannel* Create(const vector& Bones, const aiNodeAnim* pAIChannel);
void Fill_GPU_Keyframes(vector& outKeyframes);
CHANNEL_DESC Fill_GPU_ChannelDesc();
@@ -29,7 +28,6 @@ class ENGINE_DLL CChannel : public CBase
m_vPrevRootPos = { 0.f, 0.f, 0.f };
m_vPrevRootRot = { 0.f,0.f,0.f,0.f };
m_bInitialRootRotSaved = false;
- m_bInitialRootPos = false;
}
_matrix Get_BoneTransformationMatrix() { return m_BoneTransformationMatrix; }
@@ -55,15 +53,11 @@ class ENGINE_DLL CChannel : public CBase
_float3 m_vPrevRootPos = { 0.f, 0.f, 0.f };
_float4 m_vPrevRootRot = { 0.f, 0.f, 0.f,0.f };
_matrix m_BoneTransformationMatrix = {};
- _float m_fPrevYaw = 0.f;
- _bool m_bInitialRootRotSaved = {false};
- _bool m_bInitialRootPos = { false };
- _float4 m_vInitialRootRot = {};
+ _bool m_bInitialRootRotSaved = {false};
+ _float4 m_vInitialRootRot = {};
- vector m_KeyFrameDesc;
+ vector m_KeyFrameDesc;
public:
- static CChannel* Create(const vector& Bones, _uint iIndex); // 럴프전용
- static CChannel* Create(HANDLE hFile, DWORD& dwByte);
// 바이너리
static CChannel* Create(const class CModel* pModel, SaveChannel* pSaveChannel);
//
diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h
index 4096e43a0..50854f91e 100644
--- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h
+++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h
@@ -99,7 +99,7 @@ constexpr unsigned int g_iMaxShadowHeight = 9216;
#define KR_CSTR(str) reinterpret_cast(u8##str)
#ifndef MSG_BOX
-#define MSG_BOX(_message) MessageBox(NULL, TEXT(_message), L"System Message", MB_OK)
+#define MSG_BOX(_message) MessageBox(NULL, TEXT(_message), L"System Message", MB_OK); assert(false)
#endif
#define NS_BEGIN(NAMESPACE) namespace NAMESPACE {
diff --git a/Jusin154_Team3D/Engine/Public/FSM.h b/Jusin154_Team3D/Engine/Public/FSM.h
index f3efbf945..52ae58118 100644
--- a/Jusin154_Team3D/Engine/Public/FSM.h
+++ b/Jusin154_Team3D/Engine/Public/FSM.h
@@ -12,7 +12,12 @@ enum ESTATE : _u64Flag
JUMP = 1ULL << 5,
LAND = 1ULL << 6,
DODGE = 1ULL << 7,
- COMBAT, LIGHT_ATTACK, CAST, SKILL,SKILL2,
+ COMBAT = 1ULL << 8,
+ LIGHT_ATTACK = 1ULL << 9,
+ SPELL = 1ULL << 10,
+ SKILL = 1ULL << 11,
+ SKILL2 = 1ULL << 12,
+ MAPHELP = 1ULL << 13,
END
};
NS_END
diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h
index 8a9f222d9..cba913440 100644
--- a/Jusin154_Team3D/Engine/Public/Instance_Model.h
+++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h
@@ -33,56 +33,6 @@ class ENGINE_DLL CInstance_Model final : public CComponent
_bool isMoveForward = {};
_float2 vGravity = { 0.f , 9.8f };
- _bool isSinWave = {};
- _float3 vSinMinAmount = { 0.f , 0.f , 0.f};
- _float3 vSinMaxAmount = { 0.f , 0.f , 0.f };
-
- _bool isTurn;
- _float3 vDeltaAngleMin = {};
- _float3 vDeltaAngleMax = {};
-
- _bool isAxisTurn;
- _float3 vDeltaAxisAngleMin = {};
- _float3 vDeltaAxisAngleMax = {};
-
- _bool isPivotMove = {};
- _float2 vDrag = {};
- _float3 vPivotMin = {};
- _float3 vPivotMax = {};
-
- _bool isSizeLerp = {};
- _float3 vDeltaSize = {};
- _float2 vSizeDrag = {};
-
- }INSTANCE_DESC;
-
- typedef struct tagPreInstanceDesc
- {
- _int iNumInstance = { 1 }; // 인스턴스 개수
-
- _bool isLoop = { true };
- _bool isDrop = { false };
-
- _float2 vLifeTime = { 1.f , 1.f }; // 라이프 타임 min , max
- _float3 vSizeMin = { 1.f, 1.f ,1.f }; // 사이즈 min xyz
- _float3 vSizeMax = { 1.f ,1.f ,1.f }; // 사이즈 max xyz
- _float3 vRotationAngleMin = {}; // 로테이션 min x y z for angle
- _float3 vRotationAngleMax = {};// 로테이션 max x y z for angle
- _float2 vRotationSpeed = {}; // 로테이션 스피드 min , max
- _float2 vSpeed = {}; // 스피드 min , max
- _float3 vCenter = {}; // 센터 위치
- _float3 vRange = {}; // 위치 범위
-
- _float2 vMaskingUVMoveTime = { 1.f, 1.f };
- _float2 vDiffuseUVMoveTime = { 1.f, 1.f };
- _float2 vDistortionUVMoveTime = { 1.f , 1.f };
- _float2 vNoiseUVMoveTime = { 1.f ,1.f };
- _float2 vAniTime = { 1.f , 1.f };
- _float2 vAniIndex = {};
-
- _bool isMoveForward = {};
- _float2 vGravity = { 0.f , 9.8f };
-
_bool isSinWave = {};
_float3 vSinMinAmount = { 0.f , 0.f , 0.f };
_float3 vSinMaxAmount = { 0.f , 0.f , 0.f };
@@ -100,6 +50,64 @@ class ENGINE_DLL CInstance_Model final : public CComponent
_float3 vPivotMin = {};
_float3 vPivotMax = {};
+ _bool isSizeLerp = {};
+ _float3 vDeltaSize = {};
+ _float2 vSizeDrag = {};
+
+ _float2 vDelay = {};
+
+ }INSTANCE_DESC;
+
+ typedef struct tagPreInstanceDesc
+ {
+ _int iNumInstance = { 1 }; // 인스턴스 개수
+
+ _bool isLoop = { true };
+ _bool isDrop = { false };
+
+ _float2 vLifeTime = { 1.f , 1.f }; // 라이프 타임 min , max
+ _float3 vSizeMin = { 1.f, 1.f ,1.f }; // 사이즈 min xyz
+ _float3 vSizeMax = { 1.f ,1.f ,1.f }; // 사이즈 max xyz
+ _float3 vRotationAngleMin = {}; // 로테이션 min x y z for angle
+ _float3 vRotationAngleMax = {};// 로테이션 max x y z for angle
+ _float2 vRotationSpeed = {}; // 로테이션 스피드 min , max
+ _float2 vSpeed = {}; // 스피드 min , max
+ _float3 vCenter = {}; // 센터 위치
+ _float3 vRange = {}; // 위치 범위
+
+ _float2 vMaskingUVMoveTime = { 1.f, 1.f };
+ _float2 vDiffuseUVMoveTime = { 1.f, 1.f };
+ _float2 vDistortionUVMoveTime = { 1.f , 1.f };
+ _float2 vNoiseUVMoveTime = { 1.f ,1.f };
+ _float2 vAniTime = { 1.f , 1.f };
+ _float2 vAniIndex = {};
+
+ _bool isMoveForward = {};
+ _float2 vGravity = { 0.f , 9.8f };
+
+ _bool isSinWave = {};
+ _float3 vSinMinAmount = { 0.f , 0.f , 0.f };
+ _float3 vSinMaxAmount = { 0.f , 0.f , 0.f };
+
+ _bool isTurn = {};
+ _float3 vDeltaAngleMin = {};
+ _float3 vDeltaAngleMax = {};
+
+ _bool isAxisTurn = {};
+ _float3 vDeltaAxisAngleMin = {};
+ _float3 vDeltaAxisAngleMax = {};
+
+ _bool isPivotMove = {};
+ _float2 vDrag = {};
+ _float3 vPivotMin = {};
+ _float3 vPivotMax = {};
+
+ _bool isSizeLerp = {};
+ _float3 vDeltaSize = {};
+ _float2 vSizeDrag = {};
+
+ _float2 vDelay = {};
+
}PRE_INSTANCE_DESC;
typedef struct tagCSParticleDesc
@@ -147,12 +155,13 @@ class ENGINE_DLL CInstance_Model final : public CComponent
_float3 vDeltaAngle = {};
_float3 vDeltaAxisAngle = {};
- _float fDrag;
+ _float fDrag = {};
_float3 vPivot = {};
_float fSizeDrag = {};
_float3 vDeltaSize = {};
+ _float2 vDelay = {};
}CS_PARTICLE_VALUE_DESC;
@@ -213,9 +222,9 @@ class ENGINE_DLL CInstance_Model final : public CComponent
ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; // 컴퓨트 쉐이드 두번째 버퍼 (스피드, 로테이션)
public:
-#ifdef EDITOR_PROJECT
+ //인스턴싱으로 바꾸기
static CInstance_Model* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pModelFilePath, MODEL eType, _fmatrix& PreTransformMatrix, _uint iRootBoneIndex);
-#endif
+
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr);
virtual void Free() override;
void Describe_Entity() override;
diff --git a/Jusin154_Team3D/Engine/Public/Mesh.h b/Jusin154_Team3D/Engine/Public/Mesh.h
index 5fadd3e78..a1c0a5b89 100644
--- a/Jusin154_Team3D/Engine/Public/Mesh.h
+++ b/Jusin154_Team3D/Engine/Public/Mesh.h
@@ -20,6 +20,7 @@ class ENGINE_DLL CMesh final : public CVIBuffer
HRESULT Bind_BoneMatrices(const vector& Bones, class CShader* pShader, const _char* pConstantName);
HRESULT Bind_BoneMatrices(_float4x4* pCombinedMatrices, class CShader* pShader, const _char* pConstantName);
HRESULT Render_Indexed(_uint IndexCount, _uint StartIndexLocation, _uint BaseVertexLocation);
+
#ifdef EDITOR_PROJECT
private:
virtual HRESULT Initialize_Prototype(MODEL eType, vector& Bones, const aiMesh* pAIMesh, _fmatrix& PreTransformMatrix);
@@ -27,7 +28,6 @@ class ENGINE_DLL CMesh final : public CVIBuffer
HRESULT Ready_VertexBuffer_For_Anim(vector& Bones, const aiMesh* pAIMesh);
public:
static CMesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, vector& Bones, const aiMesh* pAIMesh, _fmatrix& PreTransformMatrix);
- HRESULT SaveAsBinary(HANDLE hFile, DWORD& dwByte);
PSX::PxTriangleMesh* ConvertToPxMesh(const PSX::PxCookingParams* pParam, PSX::PxPhysics* pPhysX, _matrix WorldMatrix);
#endif // EDITOR_PROJECT
@@ -38,10 +38,7 @@ class ENGINE_DLL CMesh final : public CVIBuffer
_uint Get_Vertex() { return m_iNumVertices; }
private:
- virtual HRESULT Initialize_Prototype(HANDLE hFile, DWORD& dwByte);
virtual HRESULT Initialize(void* pArg) override;
- HRESULT Ready_VertexBuffer_For_NonAnim(HANDLE hFile, DWORD& dwByte);
- HRESULT Ready_VertexBuffer_For_Anim(HANDLE hFile, DWORD& dwByte);
// 바이너리
virtual HRESULT Initialize_Prototype(MODEL eType, const class CModel* pModel, SaveMesh* _SaveMesh, _fmatrix PreTransformMatrix);
HRESULT Ready_VertexBuffer_For_NonAnim(SaveMesh* _SaveMesh, _fmatrix PreTransformMatrix);
@@ -59,6 +56,7 @@ class ENGINE_DLL CMesh final : public CVIBuffer
vector<_int> m_BoneIndices;
_float4x4* m_pBoneMatrices = { nullptr };
vector<_float4x4> m_offsetMatrices;
+
// 바이너리
std::vector<_uint> m_Indices;
std::vector<_float3> m_Vertices;
@@ -70,7 +68,6 @@ class ENGINE_DLL CMesh final : public CVIBuffer
_int m_iRootBoneIndex = { -1 };
public:
- static CMesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, HANDLE hFile, DWORD& dwByte);
// 바이너리
static CMesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, const class CModel* pModel, SaveMesh* _SaveMesh, _fmatrix PreTransformMatrix);
//
diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h
index 4f070c18e..11b773bc0 100644
--- a/Jusin154_Team3D/Engine/Public/Model.h
+++ b/Jusin154_Team3D/Engine/Public/Model.h
@@ -24,7 +24,6 @@ class ENGINE_DLL CModel final : public CComponent
public:
#pragma region Model
- MODEL Get_Type() const { return m_eType; }
_float Get_Radius() const { return m_fRadius; }
_float3& Get_RadiusOffset() { return m_vRadiusOffset; }
_float4x4* Get_PreTransformMatrixPtr() { return &m_PreTransformMatrix; }
@@ -33,24 +32,15 @@ class ENGINE_DLL CModel final : public CComponent
virtual HRESULT Render_Indexed(_uint iMeshIndex, _uint IndexCount, _uint StartIndexLocation, _uint BaseVertexLocation);
#pragma endregion
#pragma region Animation
- void Change_AnimationIndex(_int iAnimationIndex, _bool bIsLoop, _float fLerpDuration, _bool bIgnoreCurrentIndex = false); // 애니메이션을 다른 인덱스로 변경함
_bool Play_Animation(_float fTimeDelta, class CTransform* pTransform = nullptr); // 애니메이션에 델타타임을 넣어줌
- void RefreshAnim(); // 애님을 현재 애님의 초기상태로 되돌림
void Set_AnimationIndex(_uint iIndex, _bool isLoop = true);
- void Stop_Animation(); // 애니메이션을 정지 (초기상태로)
- void Set_Anim(CModel* Source);
_bool IsFinishedAnim() const { return m_bIsFinishedAnim; }
- _bool IsFinishedLerp() const { return m_bIsFinishedLerp; }
- _float Get_AnimProgressRatio();
- _int Get_AnimProgressPostion(const _char* pAnimChannelName);
- _float Get_AnimEstimatedDuration();
- void Set_AnimProgressPostion(const _char* pChannelName, _uint iPosition);
- void Set_AnimPauseState(_bool bValue);// 애님을 현재상태로 정지
- void ReallocateResources(class CTransform* pTransform = nullptr); // 애님 이동의 대상 트랜스폼(이동시켜야할 트랜스폼)을 재지정함
- void Set_CurrentTrackPosition(_float TrackPosition);
+ void Set_CurrentTrackPosition(_float TrackPosition);
const _char* Get_AnimList(_uint iIndex);
- size_t Get_AnimSize() { return m_Animations.size(); }
_float Get_CurrentTrackPosition();
+ _float Get_CurrentTrackProgressRatio();
+
+ size_t Get_AnimSize() { return m_Animations.size(); }
void Set_PlayAnim(_bool bPlayAnim) { m_bPlayAnim = bPlayAnim; }
_bool Get_PlayAnim() const { return m_bPlayAnim; }
_int Get_AnimIndex() const { return m_iCurrentAnimIndex; }
@@ -63,11 +53,7 @@ class ENGINE_DLL CModel final : public CComponent
#pragma endregion
#pragma region Bone
HRESULT Bind_BoneMatrices(_uint iMeshIndex, class CShader* pShader, const _char* pConstantName);
- void Get_BoneMatrices(_float4x4* pOut);
- _uint Get_BonesNum() const { return (_uint)m_Bones.size(); }
const _float4x4* Get_BoneMatrixPtr(const _char* pBoneName) const;
- _int Get_RootBoneIndex() const { return m_iRootBoneIndex; }
- void Set_RootBoneIndex(_int iIndex) { m_iRootBoneIndex = iIndex; }
static _int Get_BoneIndex(const _char* pBoneName, vector Bones); // 본의 벡터와 이름을 넘겨주면 인덱스를 넘겨줌 ( n 순회 )
_int Get_BoneIndex(const _char* pBoneName) const;
_matrix Get_BoneMatrix(_uint iBoneIndex);
@@ -78,11 +64,7 @@ static _int Get_BoneIndex(const _char* pBoneName, vector Bones); /
#pragma endregion
- void Create_Con();
- void UpdateAnimationCS();
- void ComputeAnimation();
- HRESULT Create_ParentVB();
- void Get_BoneMatrix();
+ void ComputeAnimation();
public:
#ifdef EDITOR_PROJECT
@@ -151,26 +133,31 @@ static _int Get_BoneIndex(const _char* pBoneName, vector Bones); /
vector<_float4x4> m_BoneMatrix;
+
+#pragma region Compute
+
private:
- HRESULT Create_CS();
+ HRESULT Create_ParentVB();
+ HRESULT Create_CS();
+ void Create_Temp();
+ void Create_LocalPosVB();
+ void Create_Con();
+ void UpdateAnimationCS();
+ _uint m_iNumBuffer = {};
- void Create_Temp();
+ vector m_Parent = {};
+ vector m_AnimRanges;
- void Create_LocalPosVB();
+ LOCALPOS_DESC* m_pLocalPos = { nullptr };
- _uint m_iNumBuffer = {};
+ class CComputeShader* m_pComputeShader = nullptr;
- vector m_Parent = {};
- vector m_AnimRanges;
+ ID3D11Buffer* m_pConstantBuffer = { nullptr };
- LOCALPOS_DESC* m_pLocalPos = { nullptr };
+ ID3D11Buffer* m_pParentBuffer = { nullptr };
+ ID3D11Buffer* m_pLocalPosBuffer = { nullptr };
+#pragma endregion
- class CComputeShader* m_pComputeShader = nullptr;
-
- ID3D11Buffer* m_pConstantBuffer = { nullptr };
-
- ID3D11Buffer* m_pParentBuffer = { nullptr };
- ID3D11Buffer* m_pLocalPosBuffer = { nullptr };
private:
// 바이너리
virtual HRESULT Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix);
diff --git a/Jusin154_Team3D/Engine/Public/MyTools.h b/Jusin154_Team3D/Engine/Public/MyTools.h
index d54c145d8..250c0ada6 100644
--- a/Jusin154_Team3D/Engine/Public/MyTools.h
+++ b/Jusin154_Team3D/Engine/Public/MyTools.h
@@ -37,7 +37,7 @@ class CMyTools {
return XMVectorSet(r, g, b, a);
}
#pragma endregion
-
+#pragma region String
// wstring --> string 변환
static _string ToString(const _wstring& var)
{
@@ -64,6 +64,16 @@ class CMyTools {
return wstrTo;
}
+ // source에 keyword가 있는지 검사
+ static _bool ContainsString(const char* source, const char* keyword) {
+ if (!source || !keyword || *keyword == '\0') {
+ return false;
+ }
+ return (strstr(source, keyword) != nullptr);
+ }
+
+#pragma endregion
+#pragma region Mathematics
// ratio로 현재 value 가져오기
static _float Lerp_f1D(_float fA, _float fB, _float fRatio)
{
@@ -76,7 +86,6 @@ class CMyTools {
if (fA == fB) return 0.0f;
return (fValue - fA) / (fB - fA);
}
-
// A -> B, A- >C의 외적이 업벡터 방향으로 외적되도록 B C를 교정
static void CorrectTriangleToUpHead(_float3& dotA, _float3& dotB, _float3& dotC) {
@@ -89,7 +98,7 @@ class CMyTools {
}
}
- // dx9에 있던 그거
+ // dx9에 있던 IntersectTri
static _bool IntersectTri(
const _fvector& vPos, const _fvector& vDir,
const _fvector& vertexA, const _gvector& vertexB, const _hvector& vertexC,
@@ -116,14 +125,6 @@ class CMyTools {
return t >= 0.f;
}
- // source에 keyword가 있는지 검사
- static _bool ContainsString(const char* source, const char* keyword) {
- if (!source || !keyword || *keyword == '\0') {
- return false;
- }
- return (strstr(source, keyword) != nullptr);
- }
-
// 매트릭스 럴프
static void MatrixLerp( _In_ _float4x4* pMatOrigin, // Origin -> 0
_In_ _float4x4* pMatTarget, // Target -> 1
@@ -150,7 +151,7 @@ class CMyTools {
return XMVectorGetX(XMVector3Dot(vNormalA, vNormalB));
}
- // hlsl에 있는 Saturate 그거임
+ // hlsl에 있는 Saturate
static _float Saturate(_float fValue) {
if (fValue > 1.f) {
fValue = 1.f;
@@ -174,6 +175,7 @@ class CMyTools {
return fRadian;
}
+ // 입력라디안에서 출력라디안까지 로테이션 스피드만큼 돌려주고 보정해서 SrcRadian에 넣어줌
inline static void RotateRadianTowards(_float& fSrcRadian, const _float& fDstRadian, _float fRotateSpeed) {
_float fDiffRadian = fmodf(fSrcRadian - fDstRadian, XM_2PI);
if (fDiffRadian < 0) fDiffRadian += XM_2PI;
@@ -199,7 +201,7 @@ class CMyTools {
return fDiffAngle * (fCross < 0 ? -1.f : 1.f);
}
-
+#pragma endregion
#pragma region FileSystem
//static void Folder_Func(/* 재귀적으로 탐색할지 */ _In_ _bool bRecursive,
// /* 탐색할 폴더 경로 */ _In_ const _wstring& TargetPath,
diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h
index ebb95553b..60a160fe5 100644
--- a/Jusin154_Team3D/Engine/Public/State.h
+++ b/Jusin154_Team3D/Engine/Public/State.h
@@ -12,7 +12,9 @@ enum ESTATE
JUMP,JUMP_JOG,JUMP_SPRINT,
LAND,
DODGE,
- COMBAT, LIGHT_ATTACK, CAST, SKILL, SKILL2,
+ COMBAT, LIGHT_ATTACK, SPELL, SKILL, SKILL2,
+ ACCIO,DESCENDO,DIFFINDO,DEPULSO,LUMOS,DISILLUSION_ENTER,DISILLUSION_EXIT,
+ MAPHELP,
END
};
NS_END
diff --git a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h
index 44c73d40f..a484d3a2e 100644
--- a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h
+++ b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h
@@ -25,12 +25,15 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
virtual HRESULT Initialize(void* pArg) override;
public:
- virtual void Set_Pos(_float fX, _float fY, _float OffSetX, _float OffSetY, _uint iCols);
- virtual void Set_Size(_float fSizeX, _float fSizeY);
- virtual void Set_SizeX(_float fSizeX);
- virtual void Set_SizeY(_float fSizeY);
- virtual void Set_Cloned(_bool isCloned) { m_isCloned = isCloned; }
- virtual void Set_ImageUV(UI_ATLAS_DESC* AtlasUV = nullptr);
+ void Set_Index_Position(_uint iIndex, _float fX, _float fY);
+ void Set_Index_Size(_uint iIndex, _float fSizeX, _float fSizeY);
+ void Set_Pos(_float fX, _float fY, _float OffSetX, _float OffSetY, _uint iCols);
+ void Set_Size(_float fSizeX, _float fSizeY);
+ void Set_SizeX(_float fSizeX);
+ void Set_SizeY(_float fSizeY);
+ void Set_Cloned(_bool isCloned) { m_isCloned = isCloned; }
+ void Set_ImageUV(UI_ATLAS_DESC* AtlasUV = nullptr);
+ void Add_InstanceOvject(vector<_uint> VisileIndices);
private:
VTX_INSTANCE_UI* m_pInstanceVertices = { nullptr };
@@ -39,6 +42,8 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
_float2* m_fPosition{ nullptr };
_float m_fAddPosition{};
+ vector<_uint> m_VisibleIndices;
+
public:
static CVIBuffer_UI_Instance* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const INSTANCE_DESC* pInstanceDesc);
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;