Merge branch 'Develope' into Shader
This commit is contained in:
@@ -29,6 +29,7 @@ float g_fMapAngle;
|
||||
float g_fCoolTime;
|
||||
float g_fHp;
|
||||
|
||||
float2 g_fViewport;
|
||||
float2 g_fOrigin_Size;
|
||||
float2 g_fCurrent_Size;
|
||||
float2 g_fHpBG;
|
||||
@@ -1726,7 +1727,7 @@ PS_OUT PS_Broomstick(PS_IN In)
|
||||
float2 texsize1 = g_fItemImageSizes1 / g_fCurrent_Size;
|
||||
float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1;
|
||||
bool inside = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f);
|
||||
if(inside)
|
||||
if (inside)
|
||||
{
|
||||
float4 tex3 = g_Texture2.Sample(ClampSampler, texlocal1);
|
||||
color = lerp(color, tex3, tex3.a);
|
||||
@@ -1788,7 +1789,6 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
PS_OUT PS_Enemy_Detection(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
@@ -1897,6 +1897,64 @@ PS_OUT PS_Enemy_Detection(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_OUT3D VS_NONESIZE3D(VS_IN3D In)
|
||||
{
|
||||
VS_OUT3D Out;
|
||||
|
||||
float3 worldCenter = float3(
|
||||
g_WorldMatrix._41,
|
||||
g_WorldMatrix._42,
|
||||
g_WorldMatrix._43
|
||||
);
|
||||
|
||||
float4 clipPos = mul(
|
||||
float4(worldCenter, 1.f),
|
||||
mul(g_ViewMatrix, g_ProjMatrix)
|
||||
);
|
||||
|
||||
float w = clipPos.w;
|
||||
|
||||
clipPos.xy /= w;
|
||||
|
||||
float2 offset = In.vTexcoord - 0.5f;
|
||||
float2 pixelOffset = offset * g_fCurrent_Size.xy;
|
||||
|
||||
float2 ndcOffset;
|
||||
ndcOffset.x = pixelOffset.x / g_fViewport.x * 2.f;
|
||||
ndcOffset.y = pixelOffset.y / g_fViewport.y * 2.f;
|
||||
|
||||
clipPos.xy += ndcOffset;
|
||||
|
||||
clipPos.xy *= w;
|
||||
clipPos.w = w;
|
||||
|
||||
Out.vPosition = clipPos;
|
||||
|
||||
float2 TexCoord = In.vTexcoord;
|
||||
TexCoord.y = 1.f - TexCoord.y;
|
||||
Out.vTexcoord = TexCoord;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Interaction_Object(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
|
||||
|
||||
float2 atlasUV = g_fImageUV.xy + In.vTexcoord * (g_fImageUV.zw - g_fImageUV.xy);
|
||||
float2 safeUV = saturate(atlasUV);
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, safeUV);
|
||||
|
||||
Color = tex1;
|
||||
|
||||
Color.a *= g_fAlpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -2256,4 +2314,14 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Enemy_Detection();
|
||||
}
|
||||
|
||||
pass Interaction_Object
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_NONESIZE3D();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Interaction_Object();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,6 +184,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h" />
|
||||
<ClInclude Include="..\Public\HpBarBG.h" />
|
||||
<ClInclude Include="..\Public\InProgress_Panel.h" />
|
||||
<ClInclude Include="..\public\Interaction_Key.h" />
|
||||
<ClInclude Include="..\Public\InteractiveInfo.h" />
|
||||
<ClInclude Include="..\Public\Intro_BG.h" />
|
||||
<ClInclude Include="..\Public\Intro_Image.h" />
|
||||
@@ -388,6 +389,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Goblin_Spector.cpp" />
|
||||
<ClCompile Include="..\Private\HpBarBG.cpp" />
|
||||
<ClCompile Include="..\Private\InProgress_Panel.cpp" />
|
||||
<ClCompile Include="..\private\Interaction_Key.cpp" />
|
||||
<ClCompile Include="..\Private\InteractiveInfo.cpp" />
|
||||
<ClCompile Include="..\Private\Intro_BG.cpp" />
|
||||
<ClCompile Include="..\Private\Intro_Image.cpp" />
|
||||
|
||||
@@ -602,10 +602,9 @@
|
||||
<ClInclude Include="..\Public\RaceRing.h">
|
||||
<Filter>02.GameObjects\Item\RaceRing</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Screen_Wind.h">
|
||||
<Filter>02.GameObjects\Effect\ScreenFX</Filter>
|
||||
<ClInclude Include="..\Public\Screen_Wind.h">
|
||||
<Filter>02.GameObjects\Effect\ScreenFX</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\BroomRaceManager.h" />
|
||||
<ClInclude Include="..\Public\Quest_Status_Panel.h">
|
||||
<Filter>02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel</Filter>
|
||||
</ClInclude>
|
||||
@@ -621,6 +620,12 @@
|
||||
<ClInclude Include="..\Public\Quest_Data.h">
|
||||
<Filter>04.Mechanic\Quest</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\BroomRaceManager.h">
|
||||
<Filter>02.GameObjects\BroomRaceManager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Interaction_Key.h">
|
||||
<Filter>02.GameObjects\UI\Interaction_Key</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1303,6 +1308,9 @@
|
||||
<Filter Include="04.Mechanic\Quest">
|
||||
<UniqueIdentifier>{fe64513c-fbb3-4577-b424-82d99c9075a3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Interaction_Key">
|
||||
<UniqueIdentifier>{08163c4a-63c9-4cc2-97b4-97bb2f9467ff}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -1852,7 +1860,6 @@
|
||||
<ClCompile Include="..\Private\Screen_Wind.cpp">
|
||||
<Filter>02.GameObjects\Effect\ScreenFX</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\BroomRaceManager.cpp" />
|
||||
<ClCompile Include="..\Private\Quest_Status_Panel.cpp">
|
||||
<Filter>02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel</Filter>
|
||||
</ClCompile>
|
||||
@@ -1868,6 +1875,12 @@
|
||||
<ClCompile Include="..\Private\Quest_Data.cpp">
|
||||
<Filter>04.Mechanic\Quest</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\BroomRaceManager.cpp">
|
||||
<Filter>02.GameObjects\BroomRaceManager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Interaction_Key.cpp">
|
||||
<Filter>02.GameObjects\UI\Interaction_Key</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
|
||||
@@ -48,12 +48,14 @@ HRESULT CAccio::Initialize(void* pArg)
|
||||
|
||||
m_pRope_Trail = Get_PartObject<CTrailObject>("Accio_Trail");
|
||||
m_pWandLight = Get_PartObject<CEffectParts>("Wand_Light");
|
||||
m_pRotate0 = Get_PartObject<CEffectParts>("Rotate0");
|
||||
|
||||
if (m_pRope_Trail == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
SAFE_ADDREF(m_pRope_Trail);
|
||||
SAFE_ADDREF(m_pWandLight);
|
||||
SAFE_ADDREF(m_pRotate0);
|
||||
|
||||
XMStoreFloat4x4(&m_TrailWorld, XMMatrixIdentity());
|
||||
|
||||
@@ -101,6 +103,8 @@ void CAccio::Update(_float fTimeDelta)
|
||||
{
|
||||
/* 특정 대상과 충돌 했다면*/
|
||||
TrailPos.r[3] = m_pEnemyCCT->Get_Position();
|
||||
|
||||
m_pRotate0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pEnemyCCT->Get_FootPosition());
|
||||
}
|
||||
|
||||
XMStoreFloat4x4(&m_TrailWorld, TrailPos);
|
||||
@@ -111,12 +115,16 @@ void CAccio::Update(_float fTimeDelta)
|
||||
_matrix rotMat = XMMatrixRotationAxis(XMLoadFloat3(&m_vCameraLook), m_fAccRotateTime);
|
||||
|
||||
_float fRange = m_fRange - m_fAccRotateTime / m_fAttenuation;
|
||||
|
||||
|
||||
if (fRange > 0)
|
||||
TrailPos.r[3] += rotMat.r[1] * fRange;
|
||||
}
|
||||
|
||||
m_pRope_Trail->Rope_Trail_Update(TrailPos, pPlayer->Get_WandPos(), fTimeDelta);
|
||||
if(m_isReverse == false)
|
||||
m_pRope_Trail->Rope_Trail_Update(TrailPos, pPlayer->Get_WandPos(), fTimeDelta);
|
||||
else
|
||||
m_pRope_Trail->Rope_Trail_Update(pPlayer->Get_WandPos(), TrailPos, fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -176,7 +184,9 @@ HRESULT CAccio::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
_vector vStartPos = WandPos;
|
||||
XMStoreFloat4(&m_vStartPos, vStartPos);
|
||||
|
||||
_matrix WandWorld = pPlayer->Get_WandPos();
|
||||
_matrix WandWorld = XMMatrixIdentity();
|
||||
|
||||
WandWorld.r[3] = pPlayer->Get_WandPos().r[3];
|
||||
|
||||
XMStoreFloat4x4(&m_TrailWorld , WandWorld);
|
||||
|
||||
@@ -266,14 +276,23 @@ void CAccio::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
CEffectParts* pCircle = Get_PartObject<CEffectParts>("Accio_Circle");
|
||||
CEffectParts* pWandLight = Get_PartObject<CEffectParts>("Wand_Light");
|
||||
CEffectParts* pSpread_Circle = Get_PartObject<CEffectParts>("Spread_Circle");
|
||||
CEffectParts* pAccio_PT = Get_PartObject<CEffectParts>("Accio_PT");
|
||||
|
||||
|
||||
pCircle->Set_Visible(false);
|
||||
pWandLight->Set_Visible(false);
|
||||
pSpread_Circle->Set_Visible(false);
|
||||
|
||||
|
||||
m_pRotate0->Set_Visible(true);
|
||||
pAccio_PT->Set_Visible(true);
|
||||
|
||||
pAccio_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
|
||||
m_pRope_Trail->Get_Component<CTrail>()->Rope_Fix(true);
|
||||
m_pRope_Trail->SetDissolve(true);
|
||||
|
||||
if(m_isDissolve)
|
||||
m_pRope_Trail->SetDissolve(true);
|
||||
|
||||
}
|
||||
|
||||
@@ -283,7 +302,7 @@ void CAccio::Free()
|
||||
|
||||
SAFE_RELEASE(m_pRope_Trail);
|
||||
SAFE_RELEASE(m_pWandLight);
|
||||
|
||||
SAFE_RELEASE(m_pRotate0);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -295,8 +314,10 @@ void CAccio::Describe_Entity()
|
||||
GUI::DragFloat("Speed", &m_fLinearSpeed);
|
||||
GUI::DragFloat("Range", &m_fRange);
|
||||
GUI::DragFloat("Attenuation", &m_fAttenuation);
|
||||
GUI::Checkbox("Dissolve", &m_isDissolve);
|
||||
GUI::Checkbox("Reverse", &m_isReverse);
|
||||
GUI::InputInt("LoopTime", &m_iLoopTime);
|
||||
|
||||
|
||||
m_pRope_Trail->Describe_Entity();
|
||||
m_pRope_Trail->Get_Component<CTrail>()->Describe_Entity();
|
||||
|
||||
|
||||
@@ -60,9 +60,12 @@ HRESULT CBroom::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pWindEffect->Get_Effect_Info()->isBillboard = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -115,7 +118,7 @@ void CBroom::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_fSpeed <= 5.f)
|
||||
{
|
||||
m_pWindEffect->Set_Visible(false);
|
||||
//m_pWindEffect->Set_Visible(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -137,16 +140,24 @@ void CBroom::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
CTransform* WindTransform = m_pWindEffect->Get_Component<CTransform>();
|
||||
|
||||
_matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix() * XMMatrixRotationAxis(WindTransform->Get_State(STATE::UP) , XMConvertToRadians(180.f));
|
||||
_matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix()/* * XMMatrixRotationAxis(XMVectorSet(0.f , 1.f, 0.f ,0.f), XMConvertToRadians(180.f))*/;
|
||||
WindTransform->Set_WorldMatrix(WorldMat);
|
||||
WindTransform->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition());
|
||||
|
||||
_vector vCameraLook = XMVector3Normalize(m_pGameInstance->Get_CameraLook());
|
||||
WindTransform->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition() + vCameraLook * m_fCameraOffset + XMVectorSet(0.f ,m_fYOffset , 0.f ,0.f));
|
||||
|
||||
#if _DEBUG
|
||||
#if 진우
|
||||
GUI::Begin("Wind");
|
||||
|
||||
m_pWindEffect->Get_Component<CInstance_Model>()->Describe_Entity();
|
||||
|
||||
GUI::Checkbox("BillBoard", &m_pWindEffect->Get_Effect_Info()->isBillboard);
|
||||
GUI::DragFloat("Offset", &m_fCameraOffset);
|
||||
GUI::DragFloat("Offset Y", &m_fYOffset);
|
||||
GUI::End();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
|
||||
(*m_EffectList[ENUM_CLASS(SKILL_TYPE::ACCIO)].begin())->Describe_Entity();
|
||||
|
||||
|
||||
Describe_Entity();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -517,6 +517,34 @@ HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner, void* pArg
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
HRESULT CEffectPool::Reset_Pool()
|
||||
{
|
||||
for (size_t i = 0; i < ENUM_CLASS(SKILL_TYPE::END); i++)
|
||||
{
|
||||
for (auto& pEffect : m_EffectList[i])
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
}
|
||||
|
||||
m_EffectList[i].clear();
|
||||
}
|
||||
|
||||
for (auto& pEffect : m_ActiveEffectList)
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
}
|
||||
|
||||
|
||||
m_ActiveEffectList.clear();
|
||||
|
||||
|
||||
if (FAILED(Ready_Effect()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
CEffectPool* CEffectPool::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
@@ -567,6 +595,14 @@ void CEffectPool::Free()
|
||||
|
||||
void CEffectPool::Describe_Entity()
|
||||
{
|
||||
|
||||
GUI::Begin("Effect Pool");
|
||||
if (GUI::Button("Reset Pool"))
|
||||
{
|
||||
Reset_Pool();
|
||||
}
|
||||
GUI::End();
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -267,6 +267,11 @@ QUESTINFO CInfoInstance::Get_Quest_Info(_int QuestID)
|
||||
return m_pQuestInfo->Get_Quest(QuestID);
|
||||
}
|
||||
|
||||
_int CInfoInstance::Get_Quest_Count()
|
||||
{
|
||||
return m_pQuestInfo->Get_Count();
|
||||
}
|
||||
|
||||
HRESULT CInfoInstance::Regist_ActiveInteractive(CMapElement_Interactable* pInteractive)
|
||||
{
|
||||
if (nullptr == s_pInstance || nullptr == m_pInteractiveInfo) {
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
#include "pch.h"
|
||||
#include "Interaction_Key.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
|
||||
CInteraction_Key::CInteraction_Key(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CInteraction_Key::CInteraction_Key(const CInteraction_Key& Prototype)
|
||||
: CGameObject(Prototype),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Key::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Key::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fSize = _float3(1.f, 1.f, 1.f);
|
||||
m_fAlpha = 1.f;
|
||||
m_vUV = ComputeUV('Z');
|
||||
m_fViewPort = _float2(_float(g_iWinSizeX), _float(g_iWinSizeY));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CInteraction_Key::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CInteraction_Key::Update(_float fTimeDelta)
|
||||
{
|
||||
ReLockOnTarget();
|
||||
}
|
||||
|
||||
void CInteraction_Key::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bActive == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Key::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::INTERACTION_OBJECT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CInteraction_Key::Set_Active(_bool bAtcive)
|
||||
{
|
||||
m_bActive = bAtcive;
|
||||
}
|
||||
|
||||
_float4 CInteraction_Key::ComputeUV(_tchar Alphabet)
|
||||
{
|
||||
_uint Number = CMyTools::AlphabetToInt(Alphabet);
|
||||
|
||||
_float2 fIamge_Size = { 320.f, 384.f };
|
||||
|
||||
_uint iXCount = 5;
|
||||
_uint iYCount = 6;
|
||||
|
||||
_float frameWidth = 64.f;
|
||||
_float frameHeight = 64.f;
|
||||
|
||||
_uint frameX = Number % iXCount;
|
||||
_uint frameY = Number / iXCount;
|
||||
|
||||
_float2 UVStart;
|
||||
UVStart.x = frameX * frameWidth / fIamge_Size.x;
|
||||
UVStart.y = frameY * frameHeight / fIamge_Size.y;
|
||||
|
||||
_float2 UVEnd;
|
||||
UVEnd.x = UVStart.x + (frameWidth / fIamge_Size.x);
|
||||
UVEnd.y = UVStart.y + (frameHeight / fIamge_Size.y);
|
||||
|
||||
_float4 UV{};
|
||||
|
||||
return UV = _float4(UVStart.x, UVStart.y, UVEnd.x, UVEnd.y);
|
||||
}
|
||||
|
||||
void CInteraction_Key::ReLockOnTarget()
|
||||
{
|
||||
m_pInfoInstance->Get_LockOnInfo(m_LockOnInteractionObject);
|
||||
if (m_LockOnInteractionObject.pUnit != nullptr)
|
||||
return;
|
||||
|
||||
if (nullptr != m_LockOnInteractionObject.pInteractive)
|
||||
{
|
||||
if (true == m_LockOnInteractionObject.pInteractive->isDead()) {
|
||||
m_bActive = false;
|
||||
m_LockOnInteractionObject.pInteractive = nullptr;
|
||||
}
|
||||
m_bActive = true;
|
||||
m_fSize = _float3(40.f, 40.f, 1.f);
|
||||
_vector Position = XMVectorSet(m_LockOnInteractionObject.pInteractive->Get_WorldPostion().m128_f32[0],
|
||||
m_LockOnInteractionObject.pInteractive->Get_WorldPostion().m128_f32[1] + 0.5f,
|
||||
m_LockOnInteractionObject.pInteractive->Get_WorldPostion().m128_f32[2],
|
||||
m_LockOnInteractionObject.pInteractive->Get_WorldPostion().m128_f32[3]);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, Position);
|
||||
}
|
||||
else
|
||||
m_bActive = false;
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Key::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Atlas_Keyboard"), reinterpret_cast<CComponent**>(&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;
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Key::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_CamaraPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float3))))
|
||||
{
|
||||
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_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_fImageUV", &m_vUV, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_fSize, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fViewport", &m_fViewPort, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CInteraction_Key* CInteraction_Key::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CInteraction_Key* pInstance = new CInteraction_Key(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CInteraction_Key");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CInteraction_Key::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CInteraction_Key* pInstance = new CInteraction_Key(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CInteraction_Key");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CInteraction_Key::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
}
|
||||
|
||||
void CInteraction_Key::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -85,7 +85,7 @@ HRESULT CInteractiveInfo::Refresh_LockOnTarget()
|
||||
|
||||
vInteractablePos = pInteractive->Get_LockOnPos();
|
||||
vToMonsterDir = vInteractablePos - vCameraPos;
|
||||
if (150.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) {
|
||||
if (40.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) {
|
||||
continue;
|
||||
}
|
||||
_float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir);
|
||||
|
||||
@@ -118,6 +118,8 @@
|
||||
#include "Completed_Panel.h"
|
||||
#include "InProgress_Panel.h"
|
||||
|
||||
#include "Interaction_Key.h"
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region PHYSX
|
||||
@@ -2058,6 +2060,12 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_GameObject_Interaction_Key*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CInteraction_Key>(g_iStaticLevel, CInteraction_Key::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_GameObject_Damage_Font*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDamage_Font>(g_iStaticLevel, CDamage_Font::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
|
||||
@@ -149,7 +149,7 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
|
||||
}
|
||||
vMonsterPos = pMonster->Get_LockOnPos();
|
||||
vToMonsterDir = vMonsterPos - vCameraPos;
|
||||
if (150.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) {
|
||||
if (40.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) {
|
||||
continue;
|
||||
}
|
||||
_float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir);
|
||||
|
||||
@@ -532,6 +532,7 @@ void CPlayer::ReLockOnTarget()
|
||||
m_LockOnInfo.pUnit = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
//m_pLockOnMonster->Get_State
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ HRESULT CPlayer::InputAction()
|
||||
if (m_pGameInstance->Key_Down(DIK_TAB)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_TAB));
|
||||
if (m_pGameInstance->Key_Down(DIK_X)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_X));
|
||||
if (m_pGameInstance->Key_Down(DIK_G)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_G));
|
||||
if (m_pGameInstance->Key_Down(DIK_Z)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_Z));
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
#include "pch.h"
|
||||
#include "Quest_Border.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
#include "InfoInstance.h"
|
||||
CQuest_Border::CQuest_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CQuest_Border::CQuest_Border(const CQuest_Border& rhs)
|
||||
:CElementObject(rhs)
|
||||
:CElementObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -41,10 +42,11 @@ HRESULT CQuest_Border::Initialize(void* pArg)
|
||||
m_fAlphaTime = 5.f;
|
||||
m_vNine_Slice = _float4(48.f, 148.f, 48.f, 148.f);
|
||||
m_fSortZ = 0.02f;
|
||||
m_fFontX = -31.5f;
|
||||
m_fFontX = -10.f;
|
||||
m_fFontY = -50.f;
|
||||
SizeUpX(500.f);
|
||||
SizeUpY(500.f);
|
||||
m_iQuest_Count = m_pInfoInstance->Get_Quest_Count();
|
||||
Visible(true);
|
||||
return S_OK;
|
||||
}
|
||||
@@ -127,6 +129,11 @@ HRESULT CQuest_Border::Render()
|
||||
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("전 체")) - 22) * 0.5f;
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("전 체"), _float2((m_fFontX - m_fX) - OffSet, m_fFontY + m_fY));
|
||||
|
||||
for (_int i = 0; i < m_iQuest_Count; ++i)
|
||||
{
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest_Info(i).pQuestName.c_str(), _float2((-210 - m_fX), 100 + m_fY));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,13 +11,13 @@ CQuest_Data::CQuest_Data()
|
||||
|
||||
HRESULT CQuest_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||
{
|
||||
|
||||
Load_QuestInfo("../Bin/Resources/Data/Quest/QuestData.xml");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CQuest_Data::Update(_float fTimeDelta)
|
||||
{
|
||||
Load_QuestInfo("../Bin/Resources/Data/Quest/QuestData.xml");
|
||||
|
||||
}
|
||||
|
||||
HRESULT CQuest_Data::Load_QuestInfo(const _char* pFilePath)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "Mouse_Cursor.h"
|
||||
#include "CameraLockOn.h"
|
||||
#include "Damage_Font.h"
|
||||
#include "Interaction_Key.h"
|
||||
|
||||
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CUIObject(pDevice, pContext)
|
||||
@@ -166,6 +167,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
}
|
||||
Add_Canvas(TEXT("Camera_LockOn"), m_pDamage_Font);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInteraction_Key>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CInteraction_Key**>(&m_pInteraction_Key)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Canvas(TEXT("Interaction_Key"), m_pInteraction_Key);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,19 +39,24 @@ class CAccio final : public CEffect_Container
|
||||
|
||||
class CTrailObject* m_pRope_Trail = { nullptr };
|
||||
class CEffectParts* m_pWandLight = { nullptr };
|
||||
class CEffectParts* m_pRotate0 = { nullptr };
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 타게팅 된 위치
|
||||
_float m_fLinearSpeed = 1.5f;
|
||||
_float m_fLinearSpeed = 0.5f;
|
||||
_float3 m_vCameraLook = {};
|
||||
|
||||
_float4x4 m_TrailWorld = {};
|
||||
CCharacter_Controller* m_pEnemyCCT = { nullptr };
|
||||
CCharacter_Controller* m_pEnemyCCT = { nullptr };
|
||||
|
||||
_float m_fAccRotateTime = {};
|
||||
_float m_fTurnSpeed = { 65.f };
|
||||
_float m_fRange = { 1.3f };
|
||||
_float m_fAttenuation = { 35.f };
|
||||
_float m_fRange = { 1.f };
|
||||
_float m_fAttenuation = { 65.f };
|
||||
_bool m_isDissolve = { true };
|
||||
_bool m_isReverse = { false };
|
||||
_int m_iLoopTime = { 5 };
|
||||
|
||||
|
||||
public:
|
||||
static CAccio* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -74,6 +74,8 @@ class CBroom final : public CUnit
|
||||
|
||||
BroomInput m_Input;
|
||||
class CEffectParts* m_pWindEffect = { nullptr };
|
||||
_float m_fCameraOffset = { -10.f };
|
||||
_float m_fYOffset= { -5.f };
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
@@ -97,7 +99,7 @@ class CBroom final : public CUnit
|
||||
_float m_fAmount = { 1.f };
|
||||
_float m_fInputTime = {};
|
||||
_bool m_bRatio = { false };
|
||||
|
||||
|
||||
HRESULT InputAction();
|
||||
HRESULT InputMove();
|
||||
HRESULT InputKeyUpMove();
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Client
|
||||
REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER,
|
||||
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
|
||||
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
|
||||
ENEMY_DETECTION, END };
|
||||
ENEMY_DETECTION, INTERACTION_OBJECT, END};
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, END };
|
||||
|
||||
enum class SHADER_PASS_NPC_PBR_ANIM {
|
||||
@@ -73,7 +73,7 @@ namespace Client
|
||||
enum class KEYINPUT
|
||||
{
|
||||
INPUT_1 = 1, INPUT_2, INPUT_3, INPUT_4,
|
||||
INPUT_T, INPUT_G, INPUT_X,
|
||||
INPUT_T, INPUT_G, INPUT_X, INPUT_Z,
|
||||
INPUT_TAB,
|
||||
DIM_RBUTTON_UP, DIM_RBUTTON_DOWN,
|
||||
END
|
||||
|
||||
@@ -27,6 +27,9 @@ class CEffectPool final : public CGameObject
|
||||
public:
|
||||
HRESULT Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel , function<class CEffect_Container*(_uint , _uint)> AddPrototypeEvent);
|
||||
HRESULT Use_Skill(SKILL_TYPE eType , CGameObject* pOwner, void* pArg = nullptr);
|
||||
#ifdef _DEBUG
|
||||
HRESULT Reset_Pool();
|
||||
#endif
|
||||
private:
|
||||
list<class CEffect_Container*> m_EffectList[ENUM_CLASS(SKILL_TYPE::END)] = {};
|
||||
list<class CEffect_Container*> m_ActiveEffectList = {};
|
||||
|
||||
@@ -69,6 +69,7 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
#pragma region Spell_INFO
|
||||
#pragma endregion
|
||||
QUESTINFO Get_Quest_Info(_int QuestID);
|
||||
_int Get_Quest_Count();
|
||||
#pragma region Interactive_INFO
|
||||
HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
|
||||
HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CInteraction_Key final : public CGameObject
|
||||
{
|
||||
private:
|
||||
CInteraction_Key(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CInteraction_Key(const CInteraction_Key& Prototype);
|
||||
virtual ~CInteraction_Key() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
public:
|
||||
void Set_Active(_bool bAtcive);
|
||||
|
||||
private:
|
||||
_float4 ComputeUV(_tchar Alphabet);
|
||||
void ReLockOnTarget();
|
||||
|
||||
private:
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
LOCKON_INFO m_LockOnInteractionObject = { nullptr };
|
||||
|
||||
_bool m_bActive = { false };
|
||||
_bool m_bAtteckTrigger = { false };
|
||||
|
||||
_float3 m_fSize{};
|
||||
_float m_fAlpha{};
|
||||
_float m_fTime{};
|
||||
_float4 m_vUV{};
|
||||
_float2 m_fViewPort{};
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CInteraction_Key* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override;
|
||||
virtual void Free() override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
NS_END
|
||||
@@ -35,9 +35,10 @@ class CQuest_Border final : public CElementObject
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
_int m_iColor = { false };
|
||||
|
||||
_int m_iColor{};
|
||||
_int m_iQuest_Count{};
|
||||
|
||||
public:
|
||||
static CQuest_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -56,6 +56,7 @@ class CUI_Manager final : public CUIObject
|
||||
CGameObject* m_pQuest_Canvas = { nullptr };
|
||||
CGameObject* m_pCamera_LockOn = { nullptr };
|
||||
CGameObject* m_pDamage_Font = { nullptr };
|
||||
CGameObject* m_pInteraction_Key = { nullptr };
|
||||
_bool m_bCanvas_Change = { false };
|
||||
|
||||
UI_STATE m_eType{};
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,6 +29,7 @@ float g_fMapAngle;
|
||||
float g_fCoolTime;
|
||||
float g_fHp;
|
||||
|
||||
float2 g_fViewport;
|
||||
float2 g_fOrigin_Size;
|
||||
float2 g_fCurrent_Size;
|
||||
float2 g_fHpBG;
|
||||
@@ -1726,7 +1727,7 @@ PS_OUT PS_Broomstick(PS_IN In)
|
||||
float2 texsize1 = g_fItemImageSizes1 / g_fCurrent_Size;
|
||||
float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1;
|
||||
bool inside = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f);
|
||||
if(inside)
|
||||
if (inside)
|
||||
{
|
||||
float4 tex3 = g_Texture2.Sample(ClampSampler, texlocal1);
|
||||
color = lerp(color, tex3, tex3.a);
|
||||
@@ -1788,7 +1789,6 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
PS_OUT PS_Enemy_Detection(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
@@ -1897,6 +1897,64 @@ PS_OUT PS_Enemy_Detection(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_OUT3D VS_NONESIZE3D(VS_IN3D In)
|
||||
{
|
||||
VS_OUT3D Out;
|
||||
|
||||
float3 worldCenter = float3(
|
||||
g_WorldMatrix._41,
|
||||
g_WorldMatrix._42,
|
||||
g_WorldMatrix._43
|
||||
);
|
||||
|
||||
float4 clipPos = mul(
|
||||
float4(worldCenter, 1.f),
|
||||
mul(g_ViewMatrix, g_ProjMatrix)
|
||||
);
|
||||
|
||||
float w = clipPos.w;
|
||||
|
||||
clipPos.xy /= w;
|
||||
|
||||
float2 offset = In.vTexcoord - 0.5f;
|
||||
float2 pixelOffset = offset * g_fCurrent_Size.xy;
|
||||
|
||||
float2 ndcOffset;
|
||||
ndcOffset.x = pixelOffset.x / g_fViewport.x * 2.f;
|
||||
ndcOffset.y = pixelOffset.y / g_fViewport.y * 2.f;
|
||||
|
||||
clipPos.xy += ndcOffset;
|
||||
|
||||
clipPos.xy *= w;
|
||||
clipPos.w = w;
|
||||
|
||||
Out.vPosition = clipPos;
|
||||
|
||||
float2 TexCoord = In.vTexcoord;
|
||||
TexCoord.y = 1.f - TexCoord.y;
|
||||
Out.vTexcoord = TexCoord;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Interaction_Object(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
|
||||
|
||||
float2 atlasUV = g_fImageUV.xy + In.vTexcoord * (g_fImageUV.zw - g_fImageUV.xy);
|
||||
float2 safeUV = saturate(atlasUV);
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, safeUV);
|
||||
|
||||
Color = tex1;
|
||||
|
||||
Color.a *= g_fAlpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -2256,4 +2314,14 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Enemy_Detection();
|
||||
}
|
||||
|
||||
pass Interaction_Object
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_NONESIZE3D();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Interaction_Object();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,21 +557,7 @@ float4 DrawEffect(PS_IN In)
|
||||
discard;
|
||||
}
|
||||
|
||||
/* 소프트 이펙트 */
|
||||
|
||||
float2 vTexcoord;
|
||||
|
||||
vTexcoord.x = In.vProjPos.x / In.vProjPos.w * 0.5f + 0.5f;
|
||||
vTexcoord.y = In.vProjPos.y / In.vProjPos.w * -0.5f + 0.5f;
|
||||
|
||||
float4 vDepthDesc = g_DepthTexture.Sample(DefaultSampler, vTexcoord);
|
||||
|
||||
float fOldViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
float fDistance = fOldViewZ - In.vProjPos.w;
|
||||
|
||||
vMtrlDiffuse.a = vMtrlDiffuse.a * saturate(fDistance);
|
||||
|
||||
|
||||
return vMtrlDiffuse;
|
||||
}
|
||||
|
||||
@@ -681,6 +667,28 @@ float4 RimLight(PS_IN In)
|
||||
return vRimLight;
|
||||
}
|
||||
|
||||
float4 SoftEffect(PS_IN In, float4 vMtrlDiffuse)
|
||||
{
|
||||
/* 소프트 이펙트 */
|
||||
|
||||
float4 vDiffuse = vMtrlDiffuse;
|
||||
|
||||
float2 vTexcoord;
|
||||
|
||||
vTexcoord.x = In.vProjPos.x / In.vProjPos.w * 0.5f + 0.5f;
|
||||
vTexcoord.y = In.vProjPos.y / In.vProjPos.w * -0.5f + 0.5f;
|
||||
|
||||
float4 vDepthDesc = g_DepthTexture.Sample(DefaultSampler, vTexcoord);
|
||||
|
||||
float fOldViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
float fDistance = fOldViewZ - In.vProjPos.w;
|
||||
|
||||
vDiffuse.a = vDiffuse.a * saturate(fDistance);
|
||||
|
||||
return vDiffuse;
|
||||
|
||||
}
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
|
||||
@@ -689,10 +697,12 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
|
||||
|
||||
vMtrlDiffuse.rgb += RimLight(In).rgb;
|
||||
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
return Out;
|
||||
@@ -706,6 +716,8 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
|
||||
int2 iTexel = int2(In.vPosition.xy);
|
||||
|
||||
float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r;
|
||||
@@ -790,7 +802,8 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
|
||||
vMtrlDiffuse.a *= 5.f;
|
||||
|
||||
@@ -811,6 +824,8 @@ PS_BLUR_OUT PS_BLUR(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
|
||||
vMtrlDiffuse.a *= 5.f;
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a);
|
||||
@@ -834,6 +849,7 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
@@ -869,6 +885,8 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
|
||||
|
||||
vMtrlDiffuse += RimLight(In);
|
||||
@@ -886,6 +904,8 @@ PS_BLOOM_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
|
||||
|
||||
vMtrlDiffuse += RimLight(In);
|
||||
@@ -915,6 +935,7 @@ PS_OUT PS_NO_DEPTH_COMPARE(PS_IN In)
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
//0
|
||||
pass Model
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
@@ -924,7 +945,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
//1
|
||||
pass NON_NOMALMAP
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -934,7 +955,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_NON_NORMALMAP();
|
||||
}
|
||||
|
||||
//2
|
||||
pass Blur
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -944,7 +965,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLUR();
|
||||
}
|
||||
|
||||
//3
|
||||
pass WEIGHTBLEND
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -954,7 +975,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_NON_NORMALMAP();
|
||||
}
|
||||
|
||||
//4
|
||||
pass NO_WORLD
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -964,7 +985,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_NON_NORMALMAP();
|
||||
}
|
||||
|
||||
//5
|
||||
pass BLUR_NO_WORLD
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -975,7 +996,7 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_BLUR();
|
||||
}
|
||||
|
||||
|
||||
//6
|
||||
pass BLEND
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -985,7 +1006,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLEND();
|
||||
}
|
||||
|
||||
//7
|
||||
pass BLEND_NOWORLD
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -995,7 +1016,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLEND();
|
||||
}
|
||||
|
||||
//8
|
||||
pass BLOOM
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -1005,7 +1026,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLOOM();
|
||||
}
|
||||
|
||||
//9
|
||||
pass BLOOM_NOWORLD
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -1016,7 +1037,7 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_BLOOM();
|
||||
}
|
||||
|
||||
|
||||
//10
|
||||
pass BLUR_NO_EMMISVE
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -1027,6 +1048,8 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_BLUR_NOEMISSIVE();
|
||||
}
|
||||
|
||||
//11
|
||||
|
||||
pass BLUR_NO_WORLD_NO_EMISSIVE
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -1037,6 +1060,7 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_BLUR_NOEMISSIVE();
|
||||
}
|
||||
|
||||
//12
|
||||
pass WEIGHTBLEND_FOR_BLEND
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -1048,7 +1072,7 @@ technique11 DefaultTechnique
|
||||
}
|
||||
|
||||
|
||||
|
||||
//13
|
||||
pass PARTICLE_DEPTH_STOP
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -1059,7 +1083,7 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
|
||||
//14
|
||||
pass WB_CULLING
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
@@ -1070,6 +1094,7 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_NON_NORMALMAP();
|
||||
}
|
||||
|
||||
//15
|
||||
pass SCREEN_FX
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
|
||||
@@ -262,7 +262,7 @@ vector Draw_Trail(PS_IN In)
|
||||
|
||||
if (g_isDissolve)
|
||||
{
|
||||
vMtrlDiffuse.a *= g_vDissolveTime.x / g_vDissolveTime.y;
|
||||
vMtrlDiffuse.a *= saturate((0.96f - g_vDissolveTime.x / g_vDissolveTime.y));
|
||||
}
|
||||
|
||||
return vMtrlDiffuse;
|
||||
|
||||
@@ -184,6 +184,7 @@ call Update_Shaders.bat
|
||||
<ClInclude Include="..\Public\Goblin_Protego.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h" />
|
||||
<ClInclude Include="..\public\InProgress_Panel.h" />
|
||||
<ClInclude Include="..\public\Interaction_Panel.h" />
|
||||
<ClInclude Include="..\public\MapElement_Chest.h" />
|
||||
<ClInclude Include="..\public\MapElement_Door.h" />
|
||||
<ClInclude Include="..\public\MapElement_Chest_Lid.h" />
|
||||
@@ -406,6 +407,7 @@ call Update_Shaders.bat
|
||||
<ClCompile Include="..\Private\Goblin_Protego.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Spector.cpp" />
|
||||
<ClCompile Include="..\private\InProgress_Panel.cpp" />
|
||||
<ClCompile Include="..\private\Interaction_Panel.cpp" />
|
||||
<ClCompile Include="..\private\MapElement_Chest.cpp" />
|
||||
<ClCompile Include="..\private\MapElement_Door.cpp" />
|
||||
<ClCompile Include="..\private\MapElement_Chest_Lid.cpp" />
|
||||
|
||||
@@ -622,6 +622,9 @@
|
||||
<Filter Include="50.UI\Quest_Canvas\Quest_Status_Panel\Quest_Status">
|
||||
<UniqueIdentifier>{18181fd1-eb00-4d29-a2aa-071428fe4ba6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Interaction_Panel">
|
||||
<UniqueIdentifier>{daeac33b-8465-457b-ba3f-18738f7a0d32}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -1242,6 +1245,9 @@
|
||||
<ClInclude Include="..\public\Quest_Status.h">
|
||||
<Filter>50.UI\Quest_Canvas\Quest_Status_Panel\Quest_Status</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Interaction_Panel.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Interaction_Panel</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1864,6 +1870,9 @@
|
||||
<ClCompile Include="..\private\Quest_Status.cpp">
|
||||
<Filter>50.UI\Quest_Canvas\Quest_Status_Panel\Quest_Status</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Interaction_Panel.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Interaction_Panel</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
#include "pch.h"
|
||||
#include "Interaction_Panel.h"
|
||||
|
||||
CInteraction_Panel::CInteraction_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CInteraction_Panel::CInteraction_Panel(const CInteraction_Panel& rhs)
|
||||
:CPanelObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CInteraction_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CInteraction_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CInteraction_Panel::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Panel::Render()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
_vector CInteraction_Panel::Get_WorldPostion()
|
||||
{
|
||||
return _vector();
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Panel::Bind_ShaderResources()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Panel::Initialize_Prototype()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT CInteraction_Panel::Initialize(void* pArg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
CInteraction_Panel* CInteraction_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CGameObject* CInteraction_Panel::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CInteraction_Panel::Free()
|
||||
{
|
||||
}
|
||||
|
||||
void CInteraction_Panel::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -42,7 +42,7 @@ HRESULT CQuest_Border::Initialize(void* pArg)
|
||||
m_fAlphaTime = 5.f;
|
||||
m_vNine_Slice = _float4(48.f, 148.f, 48.f, 148.f);
|
||||
m_fSortZ = 0.02f;
|
||||
m_fFontX = -31.5f;
|
||||
m_fFontX = -10.f;
|
||||
m_fFontY = -50.f;
|
||||
SizeUpX(500.f);
|
||||
SizeUpY(500.f);
|
||||
@@ -133,7 +133,7 @@ HRESULT CQuest_Border::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_float OffSet = m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("전 체") - 22) * 0.5f;
|
||||
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("전 체")) - 22) * 0.5f;
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("전 체"), _float2((m_fFontX - m_fX) - OffSet, m_fFontY + m_fY));
|
||||
|
||||
for (_int i = 0; i < m_iCount; ++i)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Editor
|
||||
REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER,
|
||||
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
|
||||
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
|
||||
ENEMY_DETECTION, END };
|
||||
ENEMY_DETECTION, INTERACTION_OBJECT, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX ,END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK,END };
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "PanelObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameObject;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CInteraction_Panel final : public CPanelObject
|
||||
{
|
||||
private:
|
||||
CInteraction_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CInteraction_Panel(const CInteraction_Panel& rhs);
|
||||
virtual ~CInteraction_Panel() = 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 Ready_Element(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pMissionBanner_Border = { nullptr };
|
||||
CGameObject* m_pMissionBanner_Key = { nullptr };
|
||||
|
||||
public:
|
||||
static CInteraction_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -221,16 +221,19 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix)
|
||||
|
||||
void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float fDamping, _float fLength , _float fMass , _fmatrix EndWorldMatrix)
|
||||
{
|
||||
|
||||
if (m_isFix == false)
|
||||
{
|
||||
if (m_iNumCount > 2)
|
||||
{
|
||||
memmove(m_pVertices + 2, m_pVertices, sizeof(VTXPOSTEX) * (m_iNumCount - 2));
|
||||
memmove(m_pOldPosition + 2, m_pOldPosition, sizeof(_float3) * (m_iNumCount - 2));
|
||||
}
|
||||
|
||||
if (m_iNumCount >= m_iNumVertices)
|
||||
m_iNumCount -= 2;
|
||||
}
|
||||
|
||||
|
||||
m_pOldPosition[0] = m_pVertices[0].vPosition;
|
||||
m_pOldPosition[1] = m_pVertices[1].vPosition;
|
||||
|
||||
@@ -265,6 +268,9 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
XMStoreFloat3(&m_pVertices[m_iNumCount - 2].vPosition, vEndLow);
|
||||
XMStoreFloat3(&m_pVertices[m_iNumCount - 1].vPosition, vEndHigh);
|
||||
|
||||
m_pOldPosition[m_iNumCount - 2] = m_pVertices[m_iNumCount - 2].vPosition;
|
||||
m_pOldPosition[m_iNumCount - 1] = m_pVertices[m_iNumCount - 1].vPosition;
|
||||
|
||||
for (_uint i = 2; i < m_iNumCount; i++) /* 고정점은 연산에서 제외 0 , 1*/
|
||||
{
|
||||
|
||||
@@ -293,7 +299,7 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
|
||||
}
|
||||
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
for (_uint k = 0; k < m_iNumCount - 2; k += 2) {
|
||||
|
||||
/* Low , High */
|
||||
@@ -316,14 +322,14 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
_float fLowDiff = (fLength - fLowDist) / fLowDist;
|
||||
_float fHighDiff = (fLength - fHighDist) / fHighDist;
|
||||
|
||||
// 각 점을 절반씩 밀거나 당겨서 거리 맞춤
|
||||
// 각 점을 절반씩 밀거나 당겨서 거리 맞춤
|
||||
// 손잡이(Pinned)는 움직이지 않도록 질량 비율 조절 가능 (여기선 0.5씩)
|
||||
|
||||
_vector vLowOffset = vDeltaLow * (fMass * fLowDiff);
|
||||
_vector vHighOffset = vDeltaHigh * (fMass * fHighDiff);
|
||||
|
||||
// k!=0 (즉, 움직이는 마디)일 때만 vFirst를 움직임
|
||||
if (k != 0)
|
||||
if (k != 0)
|
||||
{
|
||||
vFirst[0] -= vLowOffset;
|
||||
vFirst[1] -= vHighOffset;
|
||||
@@ -344,10 +350,18 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
vNext[1] += vHighOffset;
|
||||
}
|
||||
|
||||
if (k == m_iNumCount - 4)
|
||||
{
|
||||
|
||||
vFirst[0] -= vLowOffset;
|
||||
vFirst[1] -= vHighOffset;
|
||||
}
|
||||
|
||||
// --- 3. 결과 저장 ---
|
||||
|
||||
// vFirst 저장 (k=0 일 때는 vFirst가 vLow/vHigh의 값을 가지지만,
|
||||
// 움직이지 않았으므로 저장해도 무방. 하지만 명확성을 위해 조건부 저장 가능)
|
||||
|
||||
if (k != 0)
|
||||
{
|
||||
XMStoreFloat3(&m_pVertices[k].vPosition, vFirst[0]);
|
||||
@@ -360,6 +374,9 @@ void CTrail::Rope_Trail_Update(_fmatrix WorldMatrix, _float fTimeDelta, _float f
|
||||
}
|
||||
}
|
||||
|
||||
XMStoreFloat3(&m_pVertices[m_iNumCount - 2].vPosition, vEndLow);
|
||||
XMStoreFloat3(&m_pVertices[m_iNumCount - 1].vPosition, vEndHigh);
|
||||
|
||||
for (_uint i = 0; i < m_iNumCount; i += 2)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user