[Add] 던질 수 있는 오브젝트 Z키 띄움
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">
|
||||
|
||||
@@ -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
|
||||
@@ -2057,6 +2059,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{};
|
||||
|
||||
@@ -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_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
|
||||
Reference in New Issue
Block a user