Merge branch 'Develope' into Shader
This commit is contained in:
@@ -64,13 +64,21 @@ Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
|
||||
int g_iHover;
|
||||
int g_iBoosterOn;
|
||||
int g_iBoosterOff;
|
||||
int g_iClick;
|
||||
int g_iColor;
|
||||
int g_Count;
|
||||
int g_ChaseCount;
|
||||
|
||||
int g_iStep1 = 0;
|
||||
int g_iStep2 = 0;
|
||||
int g_iStep3 = 0;
|
||||
|
||||
float2 g_Trail[200];
|
||||
float2 g_ChaseTrail[200];
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -1795,32 +1803,105 @@ PS_OUT PS_SpellLearnColor(PS_IN In)
|
||||
Color = tex;
|
||||
|
||||
Color.rgb *= tex1.rgb;
|
||||
|
||||
float2 rectPos = g_fPosition;
|
||||
|
||||
float2 rectPos = g_fPosition - float2(256.f, 259.f);
|
||||
float2 rectSize = g_fCurrent_Size;
|
||||
|
||||
float2 itemPos = g_fItemPosition1;
|
||||
float2 itemSize = g_fItemImageSizes1;
|
||||
|
||||
float x0 = max(rectPos.x, itemPos.x);
|
||||
float x1 = min(rectPos.x + rectSize.x, itemPos.x + itemSize.x);
|
||||
float y0 = max(rectPos.y, itemPos.y);
|
||||
float y1 = min(rectPos.y + rectSize.y, itemPos.y + itemSize.y);
|
||||
float2 pixelPos;
|
||||
pixelPos.x = rectPos.x + In.vTexcoord.x * rectSize.x;
|
||||
pixelPos.y = rectPos.y + (1.0f - In.vTexcoord.y) * rectSize.y;
|
||||
|
||||
float uMin = (x0 - rectPos.x) / rectSize.x;
|
||||
float uMax = (x1 - rectPos.x) / rectSize.x;
|
||||
float vMin = (y0 - rectPos.y) / rectSize.y;
|
||||
float vMax = (y1 - rectPos.y) / rectSize.y;
|
||||
|
||||
vMin = 1.0f - vMin;
|
||||
vMax = 1.0f - vMax;
|
||||
|
||||
if (In.vTexcoord.x >= min(uMin, uMax) && In.vTexcoord.x <= max(uMin, uMax) &&
|
||||
In.vTexcoord.y >= min(vMin, vMax) && In.vTexcoord.y <= max(vMin, vMax))
|
||||
if (pixelPos.x >= itemPos.x &&
|
||||
pixelPos.x <= itemPos.x + itemSize.x &&
|
||||
pixelPos.y >= itemPos.y &&
|
||||
pixelPos.y <= itemPos.y + itemSize.y)
|
||||
{
|
||||
Color.rgb = float3(0.f, 0.f, 1.f);
|
||||
}
|
||||
|
||||
for (int i = 0; i < g_Count; ++i)
|
||||
{
|
||||
float2 trailTopLeft = g_Trail[i];
|
||||
float2 trailCenter = trailTopLeft + itemSize / 2.0f;
|
||||
|
||||
float halfWidth = itemSize.x / 2.0f + 6.f;
|
||||
float halfHeight = itemSize.y / 2.0f + 6.f;
|
||||
|
||||
if (pixelPos.x >= trailCenter.x - halfWidth &&
|
||||
pixelPos.x <= trailCenter.x + halfWidth &&
|
||||
pixelPos.y >= trailCenter.y - halfHeight &&
|
||||
pixelPos.y <= trailCenter.y + halfHeight)
|
||||
{
|
||||
Color.rgb = float3(20.f, 100.f, 180.f) / 255.f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < g_ChaseCount; ++j)
|
||||
{
|
||||
float2 ChaseTopLeft = g_ChaseTrail[j];
|
||||
float2 ChaseCenter = ChaseTopLeft + itemSize / 2.0f;
|
||||
|
||||
float halfWidth = itemSize.x * 0.7f;
|
||||
float halfHeight = itemSize.y * 0.7f;
|
||||
|
||||
if (pixelPos.x >= ChaseCenter.x - halfWidth &&
|
||||
pixelPos.x <= ChaseCenter.x + halfWidth &&
|
||||
pixelPos.y >= ChaseCenter.y - halfHeight &&
|
||||
pixelPos.y <= ChaseCenter.y + halfHeight)
|
||||
{
|
||||
Color.rgb = float3(110.f, 5.f, 5.f) / 255.f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_SpellLearnBooster(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Color = tex;
|
||||
|
||||
float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
|
||||
float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
|
||||
float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
|
||||
bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
|
||||
|
||||
if (g_iBoosterOn == 0 && g_iBoosterOff == 0)
|
||||
{
|
||||
if (inside1)
|
||||
{
|
||||
float4 tex1 = g_Texture1.Sample(DefaultSampler, Imagelocal);
|
||||
Color = lerp(Color, tex1, tex1.a);
|
||||
}
|
||||
}
|
||||
else if (g_iBoosterOn != 0 && g_iBoosterOff == 0)
|
||||
{
|
||||
|
||||
float4 tex3 = g_Texture3.Sample(DefaultSampler, In.vTexcoord);
|
||||
Color = lerp(Color, tex3, tex3.a);
|
||||
}
|
||||
else if (g_iBoosterOn == 0 && g_iBoosterOff != 0)
|
||||
{
|
||||
float4 tex2 = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
tex2.rgb *= float3(1.f, 0.f, 0.f);
|
||||
Color = tex;
|
||||
|
||||
Color = lerp(Color, tex2, tex2.a);
|
||||
}
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
@@ -2416,6 +2497,16 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_SpellLearnColor();
|
||||
}
|
||||
|
||||
pass SpellLearnBooster
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
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_SpellLearnBooster();
|
||||
}
|
||||
|
||||
pass Enemy_Detection
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
|
||||
@@ -168,12 +168,17 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Blink.h" />
|
||||
<ClInclude Include="..\Public\NPC_EleazarFig.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_Booster.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_Canvas.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_ChaserPointer.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_Data.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_LookPointer.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_MovePointer.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_Name.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_Overlay.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_Panel.h" />
|
||||
<ClInclude Include="..\Public\State_Skill2.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn_Slot.h" />
|
||||
<ClInclude Include="..\Public\Stupefy.h" />
|
||||
<ClInclude Include="..\Public\BroomRaceManager.h" />
|
||||
<ClInclude Include="..\Public\BroomRacerAI.h" />
|
||||
@@ -391,12 +396,17 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Blink.cpp" />
|
||||
<ClCompile Include="..\Private\NPC_EleazarFig.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_Booster.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_Canvas.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_ChaserPointer.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_Data.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_LookPointer.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_MovePointer.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_Name.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_Overlay.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\State_Skill2.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\Stupefy.cpp" />
|
||||
<ClCompile Include="..\Private\Boss_HpBar.cpp" />
|
||||
<ClCompile Include="..\Private\Barral_Splesh.cpp" />
|
||||
|
||||
@@ -688,6 +688,21 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\TransformationSide.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Transformation\TransformationSide</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\SpellLearn_Slot.h">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\SpellLearn_Overlay.h">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\SpellLearn_LookPointer.h">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\SpellLearn_ChaserPointer.h">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\SpellLearn_Booster.h">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -1436,6 +1451,21 @@
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Transformation\TransformationSide">
|
||||
<UniqueIdentifier>{064b5e2f-dcde-47fd-a43d-43e25800393d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer">
|
||||
<UniqueIdentifier>{d9c0bcb6-64f6-4b58-a68d-ff04c91b9861}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer">
|
||||
<UniqueIdentifier>{61024044-17a9-45ed-a6f9-73385290846d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster">
|
||||
<UniqueIdentifier>{b512f128-fcec-4db4-8cd2-08abfc56e000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay">
|
||||
<UniqueIdentifier>{2af08f38-aff0-4632-acb8-492111ff88f2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot">
|
||||
<UniqueIdentifier>{dd7d2910-1d3d-42c4-9390-ac60685357ee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -2072,6 +2102,21 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\NPC_EleazarFig.cpp">
|
||||
<Filter>02.GameObjects\NPC\Ally\GateKeeper</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\SpellLearn_Slot.cpp">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\SpellLearn_Overlay.cpp">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\SpellLearn_LookPointer.cpp">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\SpellLearn_ChaserPointer.cpp">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\SpellLearn_Booster.cpp">
|
||||
<Filter>02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -118,6 +118,11 @@
|
||||
#include "SpellLearn_Name.h"
|
||||
#include "SpellLearn.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "SpellLearn_ChaserPointer.h"
|
||||
#include "SpellLearn_LookPointer.h"
|
||||
#include "SpellLearn_Booster.h"
|
||||
#include "SpellLearn_Slot.h"
|
||||
#include "SpellLearn_Overlay.h"
|
||||
|
||||
#include "Interaction_Key.h"
|
||||
|
||||
@@ -2414,6 +2419,31 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_ChaserPointer*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_ChaserPointer>(g_iStaticLevel, CSpellLearn_ChaserPointer::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_SpellLearn_LookPointer*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_LookPointer>(g_iStaticLevel, CSpellLearn_LookPointer::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_SpellLearn_Booster*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Booster>(g_iStaticLevel, CSpellLearn_Booster::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_SpellLearn_Slot*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Slot>(g_iStaticLevel, CSpellLearn_Slot::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_SpellLearn_Overlay*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Overlay>(g_iStaticLevel, CSpellLearn_Overlay::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
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))))
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn.h"
|
||||
#include "GameInstance.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "SpellLearn_ChaserPointer.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -39,8 +41,12 @@ HRESULT CSpellLearn::Initialize(void* pArg)
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_iTrailIndex = 0;
|
||||
m_fSortZ = 0.02f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("OverrlayClear"), [this](void* p) {this->Set_FadeOut(); });
|
||||
Change_Image(0);
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
@@ -87,7 +93,44 @@ void CSpellLearn::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
if (m_bReset == true)
|
||||
{
|
||||
m_Trail.clear();
|
||||
m_ChaseTrail.clear();
|
||||
m_bReset = false;
|
||||
}
|
||||
|
||||
if (m_bHover == false)
|
||||
{
|
||||
fill(m_Trail.begin(), m_Trail.end(), _float2(-9999.f, -9999.f));
|
||||
fill(m_ChaseTrail.begin(), m_ChaseTrail.end(), _float2(-9999.f, -9999.f));
|
||||
m_bReset = true;
|
||||
}
|
||||
|
||||
if (m_pPointer != nullptr)
|
||||
{
|
||||
if (m_pPointer->Get_MoveStart() == true)
|
||||
{
|
||||
m_bHover = true;
|
||||
m_vPointerPosition = m_pPointer->Get_Position();
|
||||
m_vPointerScale = m_pPointer->Get_Current_Size();
|
||||
|
||||
m_vChasePosition = m_pChasePointer->Get_Position();
|
||||
m_vChaseScale = m_pChasePointer->Get_Current_Size();
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
if (m_fTime >= 0.3f)
|
||||
{
|
||||
m_fTime = 0.f;
|
||||
m_Trail.push_back(m_vPointerPosition);
|
||||
m_iTrailIndex++;
|
||||
m_ChaseTrail.push_back(m_vChasePosition);
|
||||
m_iChaseiTrailIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -108,7 +151,7 @@ HRESULT CSpellLearn::Render()
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::COLOR)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELLLEARNCOLOR)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
@@ -168,6 +211,34 @@ HRESULT CSpellLearn::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemImageSizes1", &m_vPointerScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fPosition", &m_fCurrent_Position, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_Trail", m_Trail.data(), sizeof(_float2) * _uint(m_Trail.size()))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_Count", &m_iTrailIndex, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_ChaseTrail", m_ChaseTrail.data(), sizeof(_float2) * _uint(m_Trail.size()))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_ChaseCount", &m_iChaseiTrailIndex, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -195,9 +266,14 @@ HRESULT CSpellLearn::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CSpellLearn::Change_Image(_int SpellID)
|
||||
{
|
||||
m_bHover = false;
|
||||
m_ChaseTrail.push_back(_float2(-9999.f, -9999.f));
|
||||
m_Trail.push_back(_float2(-9999.f, -9999.f));
|
||||
m_iTrailIndex = 0;
|
||||
m_iChaseiTrailIndex = 0;
|
||||
_wstring pName = TEXT("Prototype_Texture_");
|
||||
_wstring pImageName = pName + m_pInfoInstance->Get_SpellLearn(SpellID).pImageName;
|
||||
|
||||
m_MoveLine = m_pInfoInstance->Get_SpellLearn(SpellID).Lines;
|
||||
if (m_pDiffuse_TextureCom)
|
||||
{
|
||||
Remove_Component<CTexture>();
|
||||
@@ -206,9 +282,21 @@ HRESULT CSpellLearn::Change_Image(_int SpellID)
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, pImageName, reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
Set_FadeIn();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn::Set_Pointer(CSpellLearn_MovePointer* Pointer, CSpellLearn_ChaserPointer* Chase)
|
||||
{
|
||||
m_pPointer = Pointer;
|
||||
m_pChasePointer = Chase;
|
||||
}
|
||||
|
||||
void CSpellLearn::Clear()
|
||||
{
|
||||
fill(m_ChaseTrail.begin(), m_ChaseTrail.end(), _float2(-9999.f, -9999.f));
|
||||
}
|
||||
|
||||
CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn* pInstance = new CSpellLearn(pDevice, pContext);
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_Booster.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSpellLearn_Booster::CSpellLearn_Booster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Booster::CSpellLearn_Booster(const CSpellLearn_Booster& rhs)
|
||||
:CElementObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 476.f;
|
||||
Desc.fY = -253.f;
|
||||
Desc.fSizeX = 64.f;
|
||||
Desc.fSizeY = 64.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 = 5.f;
|
||||
m_fAngle = XMConvertToRadians(0);
|
||||
m_bHover = true;
|
||||
m_fImagePosi = _float4(16.f, 16.f, 32.f, 32.f);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("BoosterOn"), [this](void* p) {this->BoosterOn(p); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("BoosterOff"), [this](void* p) {this->BoosterOff(p); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
Visible(true);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::BoosterOn(void* pArg)
|
||||
{
|
||||
Booster* State = static_cast<Booster*>(pArg);
|
||||
if (State->iBoosterIndex != m_iIndex)
|
||||
return;
|
||||
|
||||
m_bBoosterOn = true;
|
||||
m_bBoosterOff = false;
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::BoosterOff(void* pArg)
|
||||
{
|
||||
Booster* State = static_cast<Booster*>(pArg);
|
||||
|
||||
if (m_bBoosterOn == true)
|
||||
return;
|
||||
|
||||
if (State->iBoosterIndex != m_iIndex)
|
||||
return;
|
||||
|
||||
m_bBoosterOff = true;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("ChaseBooster"));
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Set_Index(_int iIndex)
|
||||
{
|
||||
m_iIndex = iIndex;
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Reset()
|
||||
{
|
||||
m_bBoosterOn = false;
|
||||
m_bBoosterOff = false;
|
||||
Set_FadeIn();
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Clear()
|
||||
{
|
||||
Set_FadeOut();
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::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 * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELLLEARNBOOSTER)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_Booster::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::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_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 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;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bHover, sizeof(_bool))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBoosterOn", &m_bBoosterOn, sizeof(_bool))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBoosterOff", &m_bBoosterOff, sizeof(_bool))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SU_ButtonCalloutRing"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Mouse_LeftClick"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SpellMinigame_SpeedBurstFail"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_VFX_T_Speck_HighCoverage_D"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom3), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpellLearn_Booster* CSpellLearn_Booster::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_Booster* pInstance = new CSpellLearn_Booster(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_Booster");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_Booster::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_Booster* pInstance = new CSpellLearn_Booster(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_Booster");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom3);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpellLearn_Booster::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,294 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_ChaserPointer.h"
|
||||
#include "GameInstance.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSpellLearn_ChaserPointer::CSpellLearn_ChaserPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_ChaserPointer::CSpellLearn_ChaserPointer(const CSpellLearn_ChaserPointer& rhs)
|
||||
:CElementObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_ChaserPointer::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_ChaserPointer::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 476.f;
|
||||
Desc.fY = -253.f;
|
||||
Desc.fSizeX = 32.f;
|
||||
Desc.fSizeY = 32.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 = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_fMoveSpeed = 165.f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("ChaseBooster"), [this](void* p) {this->SpeedUp(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
Set_SpellLearn(0);
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::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 * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bMoveStart == true)
|
||||
{
|
||||
Line(fTimeDelta);
|
||||
}
|
||||
|
||||
if (m_fMoveSpeed >= 165.f)
|
||||
{
|
||||
m_fMoveSpeed -= fTimeDelta;
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_ChaserPointer::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 CSpellLearn_ChaserPointer::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Set_SpellLearn(_int Index)
|
||||
{
|
||||
m_fAlpha = 0.f;
|
||||
m_bHover = false;
|
||||
m_bMoveStart = false;
|
||||
m_fTime = 0.f;
|
||||
m_iLineIndex = _int(m_pInfoInstance->Get_SpellLearn(Index).Lines.size());
|
||||
m_MoveLine = m_pInfoInstance->Get_SpellLearn(Index).Lines;
|
||||
m_iCurrentLine = 0;
|
||||
m_fX = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.x;
|
||||
m_fY = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.y;
|
||||
m_fMoveSpeed = 165.f;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Set_Move()
|
||||
{
|
||||
m_bHover = true;
|
||||
m_bMoveStart = true;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Line(_float fTime)
|
||||
{
|
||||
m_vLerp_Position = m_MoveLine[m_iCurrentLine];
|
||||
|
||||
if (Start_Lerp(fTime) == true)
|
||||
{
|
||||
if (m_iCurrentLine < m_iLineIndex - 1)
|
||||
{
|
||||
++m_iCurrentLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bMoveStart = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::SpeedUp()
|
||||
{
|
||||
m_fMoveSpeed = 190.f;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Clear()
|
||||
{
|
||||
m_fMoveSpeed = 0.f;
|
||||
Set_FadeOut();
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_ChaserPointer::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 CSpellLearn_ChaserPointer::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SpellMinigame_SpeedBurstDropBack"), 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;
|
||||
}
|
||||
|
||||
CSpellLearn_ChaserPointer* CSpellLearn_ChaserPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_ChaserPointer* pInstance = new CSpellLearn_ChaserPointer(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_ChaserPointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_ChaserPointer::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_ChaserPointer* pInstance = new CSpellLearn_ChaserPointer(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_ChaserPointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpellLearn_ChaserPointer::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -50,12 +50,34 @@ HRESULT CSpellLearn_Data::Load_SpellInfo(const _char* pFilePath)
|
||||
// 속성 읽기
|
||||
Info.pSpellName = CMyTools::ToWstring(pName->Attribute("SpellName"));
|
||||
Info.pImageName = CMyTools::ToWstring(pName->Attribute("ImageName"));
|
||||
pName->QueryIntAttribute("SpellID", &Info.iSpellID);
|
||||
pName->QueryIntAttribute("SpellType", &Info.iSpellType);
|
||||
pName->QueryFloatAttribute("Size", &Info.fSpellSize);
|
||||
|
||||
_float fX{}, fY{};
|
||||
pName->QueryFloatAttribute("x", &fX);
|
||||
pName->QueryFloatAttribute("y", &fY);
|
||||
Info.fStartPosition = _float2(fX, fY);
|
||||
_float endx{}, endy{};
|
||||
pName->QueryFloatAttribute("endx", &endx);
|
||||
pName->QueryFloatAttribute("endy", &endy);
|
||||
Info.fEndPosition = _float2(endx, endy);
|
||||
|
||||
tinyxml2::XMLElement* pBooster = pName->FirstChildElement("Booster");
|
||||
while (pBooster)
|
||||
{
|
||||
tinyxml2::XMLElement* pPos = pBooster->FirstChildElement("Pos");
|
||||
if (pPos)
|
||||
{
|
||||
_float px{}, py{};
|
||||
pPos->QueryFloatAttribute("x", &px);
|
||||
pPos->QueryFloatAttribute("y", &py);
|
||||
Info.Booster.push_back(XMVectorSet(px, py, 0.f, 1.f));
|
||||
}
|
||||
|
||||
// 다음 Position으로 이동
|
||||
pBooster = pBooster->NextSiblingElement("Booster");
|
||||
}
|
||||
|
||||
// Position 요소 반복
|
||||
tinyxml2::XMLElement* pPosition = pName->FirstChildElement("Position");
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_LookPointer.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpellLearn_LookPointer::CSpellLearn_LookPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_LookPointer::CSpellLearn_LookPointer(const CSpellLearn_LookPointer& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 100.f;
|
||||
Desc.fY = 100.f;
|
||||
Desc.fSizeX = 80.f;
|
||||
Desc.fSizeY = 80.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 = 5.f;
|
||||
m_fMoveSpeed = 130.f;
|
||||
Set_SpellLearn(0);
|
||||
m_fAngle = XMConvertToRadians(0);
|
||||
Visible(true);
|
||||
m_localX = 0.f;
|
||||
m_localY = 20.f;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::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 * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fAngle = XMConvertToRadians(static_cast<CUIObject*>(m_pOwner)->Get_Angle());
|
||||
|
||||
float cosA = cos(m_fAngle);
|
||||
float sinA = sin(m_fAngle);
|
||||
|
||||
float rotatedX = m_localX * cosA - m_localY * sinA;
|
||||
float rotatedY = m_localX * sinA + m_localY * cosA;
|
||||
|
||||
MoveX(rotatedX);
|
||||
MoveY(rotatedY);
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ROTATION)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_LookPointer::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::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;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fMapAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SU_CursorArrow"), 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;
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::Set_SpellLearn(_int Index)
|
||||
{
|
||||
m_bMoveStart = false;
|
||||
m_iLineIndex = _int(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Lines.size());
|
||||
m_MoveLine = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Lines;
|
||||
m_iCurrentLine = 0;
|
||||
m_fX = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fStartPosition.x;
|
||||
m_fY = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fStartPosition.y;
|
||||
}
|
||||
|
||||
CSpellLearn_LookPointer* CSpellLearn_LookPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_LookPointer* pInstance = new CSpellLearn_LookPointer(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_LookPointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_LookPointer::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_LookPointer* pInstance = new CSpellLearn_LookPointer(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_LookPointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpellLearn_LookPointer::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "GameInstance.h"
|
||||
#include "SpellLearn_LookPointer.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSpellLearn_MovePointer::CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -38,41 +39,69 @@ HRESULT CSpellLearn_MovePointer::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 10.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_fMoveSpeed = 15.f;
|
||||
m_fMoveSpeed = 105.f;
|
||||
Set_SpellLearn(0);
|
||||
m_fAngle = XMConvertToRadians(0);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Booster"), [this](void* p) {this->Set_Booster(p); });
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Set_SpellLearn(_int Index)
|
||||
{
|
||||
m_bMoveStart = false;
|
||||
m_bHover = true;
|
||||
m_iLineIndex = _int(m_pInfoInstance->Get_SpellLearn(Index).Lines.size());
|
||||
m_Boosters = m_pInfoInstance->Get_SpellLearn(Index).Booster;
|
||||
m_MoveLine = m_pInfoInstance->Get_SpellLearn(Index).Lines;
|
||||
m_iCurrentLine = 0;
|
||||
m_fX = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.x;
|
||||
m_fY = m_pInfoInstance->Get_SpellLearn(Index).fStartPosition.y;
|
||||
m_iCurrentLine = 0;
|
||||
m_Booster.iBoosterIndex = -1;
|
||||
m_Booster.bBoosterOn = false;
|
||||
Set_FadeIn();
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Line(_float fTime)
|
||||
_int CSpellLearn_MovePointer::Get_SpellTrail()
|
||||
{
|
||||
return m_iCurrentLine;
|
||||
}
|
||||
|
||||
_bool CSpellLearn_MovePointer::Get_MoveStart()
|
||||
{
|
||||
return m_bMoveStart;
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Line(_float fTime, _float2 fMouse)
|
||||
{
|
||||
m_vLerp_Position = m_MoveLine[m_iCurrentLine];
|
||||
|
||||
if (Start_Lerp(m_fMoveSpeed * fTime) == true)
|
||||
if (Start_Lerp_Speed(fTime, fMouse) == true)
|
||||
{
|
||||
if (m_iCurrentLine < m_iLineIndex - 1)
|
||||
{
|
||||
++m_iCurrentLine;
|
||||
m_fPerPosition = _float2(m_MoveLine[m_iCurrentLine - 1].m128_f32[0], m_MoveLine[m_iCurrentLine - 1].m128_f32[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bMoveStart = false;
|
||||
Set_FadeOut();
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("LearnClear"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Set_Booster(void* pArg)
|
||||
{
|
||||
Booster* Info = static_cast<Booster*>(pArg);
|
||||
m_Booster.iBoosterIndex = Info->iBoosterIndex;
|
||||
m_Booster.bBoosterOn = Info->bBoosterOn;
|
||||
m_bBooster = true;
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Priority_Update(_float fTimeDelta)
|
||||
@@ -116,28 +145,45 @@ void CSpellLearn_MovePointer::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
POINT ptMouse{};
|
||||
GetCursorPos(&ptMouse);
|
||||
ScreenToClient(g_hWnd, &ptMouse);
|
||||
_float2 fMouse{};
|
||||
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
|
||||
fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f);
|
||||
|
||||
_float2 fFinalMouse{};
|
||||
fFinalMouse.x = fMouse.x - m_fX;
|
||||
fFinalMouse.y = fMouse.y - m_fY;
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_L))
|
||||
{
|
||||
m_bMoveStart = true;
|
||||
m_bBooster = false;
|
||||
m_fMoveSpeed = 105.f;
|
||||
}
|
||||
|
||||
if (m_bMoveStart == true)
|
||||
{
|
||||
Line(fTimeDelta);
|
||||
Line(fTimeDelta, fMouse);
|
||||
}
|
||||
|
||||
POINT ptMouse{};
|
||||
GetCursorPos(&ptMouse);
|
||||
ScreenToClient(g_hWnd, &ptMouse);
|
||||
_float2 fMouse;
|
||||
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
|
||||
fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f);
|
||||
m_fAngle = atan2(-fFinalMouse.x, fFinalMouse.y);
|
||||
|
||||
fMouse.x = fMouse.x - m_fX;
|
||||
fMouse.y = fMouse.y - m_fY;
|
||||
if (m_bBooster == true)
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON))
|
||||
{
|
||||
m_bBooster = false;
|
||||
m_fMoveSpeed = 160.f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("BoosterOn"), &m_Booster);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
m_fAngle = atan2(-fMouse.x, fMouse.y);
|
||||
if (m_fMoveSpeed >= 105.f)
|
||||
{
|
||||
m_fMoveSpeed -= fTimeDelta * m_fTimeMult;
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
@@ -150,7 +196,8 @@ void CSpellLearn_MovePointer::Late_Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
if (m_bHover == true)
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
@@ -239,6 +286,10 @@ HRESULT CSpellLearn_MovePointer::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_LookPointer>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_LookPointer**>(&m_pSpellLeam_LookPointer))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,391 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_Overlay.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSpellLearn_Overlay::CSpellLearn_Overlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Overlay::CSpellLearn_Overlay(const CSpellLearn_Overlay& rhs)
|
||||
:CElementObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 380.f;
|
||||
Desc.fY = -30.f;
|
||||
Desc.fSizeX = 105.f;
|
||||
Desc.fSizeY = 105.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_iImageFrameX = 8;
|
||||
m_iImageFrameY = 8;
|
||||
m_fFrame = 0.2f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAngle = XMConvertToRadians(-135.f);
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_vUVScale.x = 1.f;
|
||||
m_vUVScale.y = 1.f;
|
||||
m_fCoolTime = 5.f;
|
||||
m_fSortZ = 0.01f;
|
||||
m_fMoveSpeed = 10.f;
|
||||
m_fLerpX = 600.f;
|
||||
m_fLerpY = 100.f;
|
||||
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
Compute_UI(5);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Set_SpellLearn(_int Index)
|
||||
{
|
||||
Compute_UI(m_pInfoInstance->Get_SpellLearn(Index).iSpellID);
|
||||
m_vUVScale.y = 0.f;
|
||||
m_fTrail = 0.f;
|
||||
m_iSpellType = m_pInfoInstance->Get_SpellLearn(Index).iSpellType;
|
||||
m_fSpellLearn = _float(m_pInfoInstance->Get_SpellLearn(Index).Lines.size());
|
||||
MoveX(m_pInfoInstance->Get_SpellLearn(Index).fEndPosition.x);
|
||||
MoveY(m_pInfoInstance->Get_SpellLearn(Index).fEndPosition.y);
|
||||
SizeUpdate(m_fOrigin_Size.x, m_fOrigin_Size.y);
|
||||
m_fSizeUp = false;
|
||||
m_bClear = false;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Set_Count(_int Index)
|
||||
{
|
||||
m_fTrail = _float(Index);
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::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;
|
||||
}
|
||||
}
|
||||
|
||||
Update_Trail(fTimeDelta);
|
||||
|
||||
if (m_bClear == true)
|
||||
{
|
||||
SizeUp(fTimeDelta * m_fTimeMult * m_fMoveSpeed);
|
||||
}
|
||||
|
||||
if (m_fSizeUp == true)
|
||||
{
|
||||
if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true)
|
||||
{
|
||||
m_fSizeUp = false;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::TYPE))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_Overlay::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::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_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 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_fFrame", &m_fFrame, 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_iSpellType", &m_iSpellType, sizeof(_int))))
|
||||
{
|
||||
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;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountX", &m_iImageFrameX, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountY", &m_iImageFrameY, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaU", &m_vUVScale.x, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaV", &m_vUVScale.y, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCoolTime", &m_fCoolTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_spellmeter_Generic"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Atlas_Spell"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_tillingSmokes"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom3), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Clear()
|
||||
{
|
||||
m_vUVScale.y = 1.2f;
|
||||
m_bClear = true;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Compute_UI(_uint SpellID)
|
||||
{
|
||||
_float2 fImage_Size = { 1024.f, 1792.f };
|
||||
|
||||
_uint iCountX = 4;
|
||||
_uint iCountY = 6;
|
||||
|
||||
_float iImageX = 256.f;
|
||||
_float iImageY = 256.f;
|
||||
|
||||
_uint iframeX = SpellID % iCountX;
|
||||
_uint iframeY = SpellID / iCountX;
|
||||
|
||||
_float2 UVStart;
|
||||
UVStart.x = iframeX * iImageX / fImage_Size.x;
|
||||
UVStart.y = iframeY * iImageY / fImage_Size.y;
|
||||
|
||||
_float2 UVEnd;
|
||||
UVEnd.x = UVStart.x + (iImageX / fImage_Size.x);
|
||||
UVEnd.y = UVStart.y + (iImageY / fImage_Size.y);
|
||||
|
||||
_float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y };
|
||||
m_vUV = UV;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Update_Trail(_float fTimeaDalta)
|
||||
{
|
||||
m_vUVScale.y = CMyTools::Lerp_f1D(m_vUVScale.y, m_fTrail / m_fSpellLearn * 1.05f, fTimeaDalta * m_fMoveSpeed);
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::SizeUp(_float fSizeX)
|
||||
{
|
||||
m_fSizeX += fSizeX;
|
||||
m_fSizeY += fSizeX;
|
||||
|
||||
if (160.f <= m_fSizeX + fSizeX)
|
||||
{
|
||||
m_fSizeX = 160.f;
|
||||
m_fSizeY = 160.f;
|
||||
m_bClear = false;
|
||||
m_fSizeUp = true;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("OverrlayClear"));
|
||||
}
|
||||
}
|
||||
|
||||
CSpellLearn_Overlay* CSpellLearn_Overlay::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_Overlay* pInstance = new CSpellLearn_Overlay(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_Overlay");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_Overlay::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_Overlay* pInstance = new CSpellLearn_Overlay(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Overlay");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom3);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpellLearn_Overlay::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -4,7 +4,11 @@
|
||||
#include "SpellLearn_Name.h"
|
||||
#include "SpellLearn.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "SPellLearn_ChaserPointer.h"
|
||||
#include "SpellLearn_Data.h"
|
||||
#include "SpellLearn_Booster.h"
|
||||
#include "SpellLearn_Slot.h"
|
||||
#include "SpellLearn_Overlay.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -47,11 +51,45 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg)
|
||||
m_fCanvasAlpha = 1.f;
|
||||
m_fSortZ = 0.05f;
|
||||
m_fDelayTime = 1.f;
|
||||
static_cast<CSpellLearn*>(m_pSpellLearn)->Set_Pointer(
|
||||
static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer),
|
||||
static_cast<CSpellLearn_ChaserPointer*>(m_pSpellLearn_ChaserPointer));
|
||||
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
static_cast<CSpellLearn_Booster*>(m_pBooster[i])->Move(m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[0],
|
||||
m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[1]);
|
||||
}
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
m_PointerStates.push_back(m_State);
|
||||
m_ChaseStates.push_back(m_State);
|
||||
}
|
||||
static_cast<CSpellLearn_Overlay*>(m_pSpellLearn_Overlay)->Set_SpellLearn(0);
|
||||
static_cast<CSpellLearn_Slot*>(m_pSpellLearn_Slot)->Set_SpellLearn(0);
|
||||
Visible(true);
|
||||
ElementAllVisible(true);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Panel::Set_Learn(_int Index)
|
||||
{
|
||||
m_fTime = 0.f;
|
||||
static_cast<CSpellLearn*>(m_pSpellLearn)->Change_Image(Index);
|
||||
static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
|
||||
static_cast<CSpellLearn_ChaserPointer*>(m_pSpellLearn_ChaserPointer)->Set_SpellLearn(Index);
|
||||
static_cast<CSpellLearn_Name*>(m_pSpellLearn_Name)->Set_Name(Index);
|
||||
static_cast<CSpellLearn_Overlay*>(m_pSpellLearn_Overlay)->Set_SpellLearn(Index);
|
||||
static_cast<CSpellLearn_Slot*>(m_pSpellLearn_Slot)->Set_SpellLearn(Index);
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
static_cast<CSpellLearn_Booster*>(m_pBooster[i])->Move(
|
||||
m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[0],
|
||||
m_pInfoInstance->Get_SpellLearn(Index).Booster[i].m128_f32[1]);
|
||||
static_cast<CSpellLearn_Booster*>(m_pBooster[i])->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
void CSpellLearn_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
@@ -78,11 +116,90 @@ void CSpellLearn_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
Index++;
|
||||
}
|
||||
static_cast<CSpellLearn*>(m_pSpellLearn)->Change_Image(Index);
|
||||
static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
|
||||
static_cast<CSpellLearn_Name*>(m_pSpellLearn_Name)->Set_Name(Index);
|
||||
Set_Learn(Index);
|
||||
}
|
||||
|
||||
if (static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer)->Get_MoveStart() == true)
|
||||
{
|
||||
m_fTime += fTimeDelta;
|
||||
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
m_PointerStates[i].bPerHit = m_PointerStates[i].bHit;
|
||||
|
||||
_bool bPointer = Chack_Element(static_cast<CUIObject*>(m_pBooster[i])->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Current_Size().x,
|
||||
static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Current_Size().x);
|
||||
|
||||
m_PointerStates[i].bHit = bPointer;
|
||||
|
||||
if (m_PointerStates[i].bHit == true && m_PointerStates[i].bPerHit == false)
|
||||
{
|
||||
m_Booster.iBoosterIndex = _int(i);
|
||||
m_Booster.bBoosterOn = true;
|
||||
Function_Callback(TEXT("Booster"), &m_Booster);
|
||||
}
|
||||
|
||||
if (m_PointerStates[i].bHit == false && m_PointerStates[i].bPerHit == true)
|
||||
{
|
||||
m_Booster.iBoosterIndex = _int(i);
|
||||
m_Booster.bBoosterOn = false;
|
||||
Function_Callback(TEXT("Booster"), &m_Booster);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
m_ChaseStates[i].bPerHit = m_ChaseStates[i].bHit;
|
||||
|
||||
_bool bPointer = Chack_Element(static_cast<CUIObject*>(m_pBooster[i])->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x,
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x);
|
||||
|
||||
m_ChaseStates[i].bHit = bPointer;
|
||||
|
||||
if (m_ChaseStates[i].bHit == true && m_ChaseStates[i].bPerHit == false)
|
||||
{
|
||||
m_Booster.iBoosterIndex = _int(i);
|
||||
m_Booster.bBoosterOn = true;
|
||||
Function_Callback(TEXT("BoosterOff"), &m_Booster);
|
||||
}
|
||||
|
||||
static_cast<CSpellLearn_Overlay*>(m_pSpellLearn_Overlay)->Set_Count(
|
||||
static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer)->Get_SpellTrail());
|
||||
|
||||
}
|
||||
|
||||
if (m_fTime >= 1.f)
|
||||
{
|
||||
static_cast<CSpellLearn_ChaserPointer*>(m_pSpellLearn_ChaserPointer)->Set_FadeIn();
|
||||
}
|
||||
|
||||
if (m_fTime >= 2.f)
|
||||
{
|
||||
static_cast<CSpellLearn_ChaserPointer*>(m_pSpellLearn_ChaserPointer)->Set_Move();
|
||||
|
||||
if (_bool bPointer = Chack_Element(static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Current_Size().x,
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x) == true)
|
||||
{
|
||||
Set_Learn(Index);
|
||||
|
||||
m_Booster.iBoosterIndex = _int(-1);
|
||||
m_Booster.bBoosterOn = false;
|
||||
Function_Callback(TEXT("Booster"), &m_Booster);
|
||||
for (size_t i = 0; i < m_PointerStates.size(); ++i)
|
||||
{
|
||||
m_PointerStates[i].bPerHit = false;
|
||||
m_PointerStates[i].bHit = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -204,6 +321,36 @@ HRESULT CSpellLearn_Panel::Ready_Element(void* pArg)
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_ChaserPointer>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_ChaserPointer**>(&m_pSpellLearn_ChaserPointer))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SPellLeam_ChaserPointer"), m_pSpellLearn_ChaserPointer);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Slot**>(&m_pSpellLearn_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_Slot"), m_pSpellLearn_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Overlay**>(&m_pSpellLearn_Overlay))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_Overlay"), m_pSpellLearn_Overlay);
|
||||
|
||||
for (_int i = 0; i < 3; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Booster>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Booster**>(&m_pSpellLearn_Booster))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
static_cast<CSpellLearn_Booster*>(m_pSpellLearn_Booster)->Set_Index(i);
|
||||
|
||||
m_pBooster.push_back(m_pSpellLearn_Booster);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_Slot.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSpellLearn_Slot::CSpellLearn_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Slot::CSpellLearn_Slot(const CSpellLearn_Slot& rhs)
|
||||
:CElementObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 380.f;
|
||||
Desc.fY = -30.f;
|
||||
Desc.fSizeX = 105.f;
|
||||
Desc.fSizeY = 105.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_fAngle = XMConvertToRadians(135.f);
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fMoveSpeed = 10.f;
|
||||
m_fLerpX = 600.f;
|
||||
m_fLerpY = 100.f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::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;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bClear == true)
|
||||
{
|
||||
SizeUp(fTimeDelta * m_fTimeMult * m_fMoveSpeed);
|
||||
}
|
||||
|
||||
if (m_fSizeUp == true)
|
||||
{
|
||||
if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true)
|
||||
{
|
||||
m_fSizeUp = false;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SLOT))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_Slot::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::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_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_iSpellType", &m_iSpellType, sizeof(_int))))
|
||||
{
|
||||
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;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), 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;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Set_SpellLearn(_int Index)
|
||||
{
|
||||
MoveX(m_pInfoInstance->Get_SpellLearn(Index).fEndPosition.x);
|
||||
MoveY(m_pInfoInstance->Get_SpellLearn(Index).fEndPosition.y);
|
||||
SizeUpdate(m_fOrigin_Size.x, m_fOrigin_Size.y);
|
||||
m_fSizeUp = false;
|
||||
m_bClear = false;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Clear()
|
||||
{
|
||||
m_bClear = true;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::SizeUp(_float fSizeX)
|
||||
{
|
||||
m_fSizeX += fSizeX;
|
||||
m_fSizeY += fSizeX;
|
||||
|
||||
if (160.f <= m_fSizeX + fSizeX)
|
||||
{
|
||||
m_fSizeX = 160.f;
|
||||
m_fSizeY = 160.f;
|
||||
m_bClear = false;
|
||||
m_fSizeUp = true;
|
||||
}
|
||||
}
|
||||
|
||||
CSpellLearn_Slot* CSpellLearn_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_Slot* pInstance = new CSpellLearn_Slot(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_Slot::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_Slot* pInstance = new CSpellLearn_Slot(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpellLearn_Slot::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -19,8 +19,8 @@ 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,
|
||||
SPELL_LEARN,
|
||||
ENEMY_DETECTION, INTERACTION_OBJECT, END };
|
||||
SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER,
|
||||
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, QUEST_SLOT, END };
|
||||
|
||||
enum class SHADER_PASS_NPC_PBR_ANIM {
|
||||
|
||||
@@ -94,10 +94,14 @@ namespace Client
|
||||
|
||||
typedef struct tagSpellLearnInfo
|
||||
{
|
||||
_wstring pSpellName{};
|
||||
_wstring pImageName{};
|
||||
_float fSpellSize{};
|
||||
_float2 fStartPosition{};
|
||||
_wstring pSpellName{};
|
||||
_wstring pImageName{};
|
||||
_int iSpellID{};
|
||||
_int iSpellType{};
|
||||
_float fSpellSize{};
|
||||
_float2 fStartPosition{};
|
||||
_float2 fEndPosition{};
|
||||
vector<_vector> Booster;
|
||||
vector<_vector> Lines;
|
||||
}SPELLLEARNINFO;
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ class CSpellLearn final : public CElementObject
|
||||
|
||||
public:
|
||||
HRESULT Change_Image(_int SpellID);
|
||||
void Set_Pointer(class CSpellLearn_MovePointer* Pointer, class CSpellLearn_ChaserPointer* Chase);
|
||||
|
||||
private:
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
@@ -42,6 +46,25 @@ class CSpellLearn final : public CElementObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
class CSpellLearn_MovePointer* m_pPointer = { nullptr };
|
||||
class CSpellLearn_ChaserPointer* m_pChasePointer = { nullptr };
|
||||
|
||||
_float2 m_vPointerPosition{};
|
||||
_float3 m_vPointerScale{};
|
||||
|
||||
_float2 m_vChasePosition{};
|
||||
_float3 m_vChaseScale{};
|
||||
|
||||
_bool m_bReset{};
|
||||
|
||||
_int m_iIndex{};
|
||||
_int m_iTrailIndex{};
|
||||
vector<_float2> m_Trail;
|
||||
|
||||
_int m_iChaseiTrailIndex{};
|
||||
vector<_float2> m_ChaseTrail;
|
||||
vector<_vector> m_MoveLine;
|
||||
|
||||
public:
|
||||
static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSpellLearn_Booster final : public CElementObject
|
||||
{
|
||||
private:
|
||||
struct Booster
|
||||
{
|
||||
_bool bBoosterOn = { false };
|
||||
_int iBoosterIndex{};
|
||||
};
|
||||
private:
|
||||
CSpellLearn_Booster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Booster(const CSpellLearn_Booster& rhs);
|
||||
virtual ~CSpellLearn_Booster() = 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;
|
||||
|
||||
public:
|
||||
void BoosterOn(void* pArg);
|
||||
void BoosterOff(void* pArg);
|
||||
|
||||
void Set_Index(_int iIndex);
|
||||
void Reset();
|
||||
|
||||
private:
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom3 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_bool m_bBoosterOn = { false };
|
||||
_bool m_bBoosterOff = { false };
|
||||
_float4 m_fImagePosi{};
|
||||
_int m_iIndex{};
|
||||
public:
|
||||
static CSpellLearn_Booster* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSpellLearn_ChaserPointer final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_ChaserPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_ChaserPointer(const CSpellLearn_ChaserPointer& rhs);
|
||||
virtual ~CSpellLearn_ChaserPointer() = 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;
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
void Set_Move();
|
||||
private:
|
||||
void Line(_float fTime);
|
||||
void SpeedUp();
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
_bool m_bMoveStart = { false };
|
||||
|
||||
_int m_iLineIndex{};
|
||||
_int m_iCurrentLine{};
|
||||
vector<_vector> m_MoveLine;
|
||||
|
||||
public:
|
||||
static CSpellLearn_ChaserPointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,59 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSpellLearn_LookPointer final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_LookPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_LookPointer(const CSpellLearn_LookPointer& rhs);
|
||||
virtual ~CSpellLearn_LookPointer() = 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;
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
_bool m_bMoveStart = { false };
|
||||
|
||||
_int m_iLineIndex{};
|
||||
_int m_iCurrentLine{};
|
||||
vector<_vector> m_MoveLine;
|
||||
_float m_localX{};
|
||||
_float m_localY{};
|
||||
public:
|
||||
static CSpellLearn_LookPointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -13,6 +13,12 @@ NS_BEGIN(Client)
|
||||
|
||||
class CSpellLearn_MovePointer final : public CElementObject
|
||||
{
|
||||
private:
|
||||
struct Booster
|
||||
{
|
||||
_bool bBoosterOn = { false };
|
||||
_int iBoosterIndex{};
|
||||
};
|
||||
private:
|
||||
CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs);
|
||||
@@ -33,8 +39,12 @@ class CSpellLearn_MovePointer final : public CElementObject
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
_int Get_SpellTrail();
|
||||
_bool Get_MoveStart();
|
||||
private:
|
||||
void Line(_float fTime);
|
||||
void Line(_float fTime, _float2 fMouse);
|
||||
|
||||
void Set_Booster(void* pArg);
|
||||
|
||||
|
||||
private:
|
||||
@@ -43,11 +53,17 @@ class CSpellLearn_MovePointer final : public CElementObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
class SpellLearm_LookPointer* m_pSpellLeam_LookPointer = { nullptr };
|
||||
|
||||
_bool m_bMoveStart = { false };
|
||||
_bool m_bBooster = { false };
|
||||
|
||||
Booster m_Booster;
|
||||
|
||||
_int m_iLineIndex{};
|
||||
_int m_iCurrentLine{};
|
||||
vector<_vector> m_MoveLine;
|
||||
vector<_vector> m_Boosters;
|
||||
|
||||
public:
|
||||
static CSpellLearn_MovePointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSpellLearn_Overlay final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_Overlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Overlay(const CSpellLearn_Overlay& rhs);
|
||||
virtual ~CSpellLearn_Overlay() = 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;
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
void Set_Count(_int Index);
|
||||
|
||||
private:
|
||||
void Clear();
|
||||
void Compute_UI(_uint SpellID);
|
||||
void Update_Trail(_float fTimeaDalta);
|
||||
void SizeUp(_float fSizeX);
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom3 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_int m_iImageFrameX{};
|
||||
_int m_iImageFrameY{};
|
||||
_float m_fFrame{};
|
||||
_float4 m_vUV{};
|
||||
|
||||
_float m_fSpellLearn{};
|
||||
_float m_fTrail{};
|
||||
_float m_fTargetTrail{};
|
||||
_bool m_bClear = { false };
|
||||
_bool m_fSizeUp = { false };
|
||||
public:
|
||||
static CSpellLearn_Overlay* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -13,7 +13,17 @@ NS_BEGIN(Client)
|
||||
|
||||
class CSpellLearn_Panel final : public CPanelObject
|
||||
{
|
||||
|
||||
private:
|
||||
struct Booster
|
||||
{
|
||||
_bool bBoosterOn = { false };
|
||||
_int iBoosterIndex{};
|
||||
};
|
||||
struct State
|
||||
{
|
||||
_bool bHit = { false };
|
||||
_bool bPerHit = { false };
|
||||
};
|
||||
private:
|
||||
CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Panel(const CSpellLearn_Panel& rhs);
|
||||
@@ -33,6 +43,9 @@ class CSpellLearn_Panel final : public CPanelObject
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Set_Learn(_int Index);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
@@ -46,10 +59,18 @@ class CSpellLearn_Panel final : public CPanelObject
|
||||
CGameObject* m_pSpellLearn_Name = { nullptr };
|
||||
CGameObject* m_pSpellLearn = { nullptr };
|
||||
CGameObject* m_pSpellLearn_MovePointer = { nullptr };
|
||||
CGameObject* m_pSpellLearn_ChaserPointer = { nullptr };
|
||||
CGameObject* m_pSpellLearn_Data = { nullptr };
|
||||
CGameObject* m_pSpellLearn_Booster = { nullptr };
|
||||
CGameObject* m_pSpellLearn_Slot = { nullptr };
|
||||
CGameObject* m_pSpellLearn_Overlay = { nullptr };
|
||||
|
||||
_int Index{};
|
||||
|
||||
vector<CGameObject*> m_pBooster;
|
||||
Booster m_Booster;
|
||||
State m_State;
|
||||
vector<State> m_PointerStates;
|
||||
vector<State> m_ChaseStates;
|
||||
public:
|
||||
static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSpellLearn_Slot final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Slot(const CSpellLearn_Slot& rhs);
|
||||
virtual ~CSpellLearn_Slot() = 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;
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
void SizeUp(_float fSizeX);
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_bool m_bClear = { false };
|
||||
_bool m_fSizeUp = { false };
|
||||
public:
|
||||
static CSpellLearn_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -1,28 +1,256 @@
|
||||
<SpellLearnInfo>
|
||||
<SpellLearnData>
|
||||
<Name SpellName="봄바르다" ImageName="Bombarda" Size="550" x="730" y="200">
|
||||
<Name SpellName="봄바르다" ImageName="Bombarda" SpellID="11" SpellType="2" Size="550" x="730" y="200" endx="522" endy="-42">
|
||||
<Booster>
|
||||
<Pos x="622" y="60"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="810" y="-187"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="390" y="-187"/>
|
||||
</Booster>
|
||||
<Position>
|
||||
<Pos x="625" y="60"/>
|
||||
<Pos x="730" y="200"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="810" y="-185"/>
|
||||
<Pos x="707" y="170"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="395" y="-185"/>
|
||||
<Pos x="683.5" y="140"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="515" y="-45"/>
|
||||
<Pos x="668" y="120"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="652.5" y="100"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="636" y="80"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="622" y="60"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="636.5" y="40"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="652" y="20"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="666.5" y="0"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="682.5" y="-20"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="698" y="-40"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="713.5" y="-60"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="728.5" y="-80"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="744" y="-100"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="759" y="-120"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="774.5" y="-140"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="790" y="-160"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="805.5" y="-180"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="811.5" y="-189"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="790" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="760" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="730" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="700" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="670" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="640" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="610" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="580" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="550" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="520" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="490" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="460" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="430" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="400" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="390" y="-187"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="416" y="-157"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="441.5" y="-130"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="468" y="-100"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="496" y="-70"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="516" y="-50"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="522" y="-42"/>
|
||||
</Position>
|
||||
</Name>
|
||||
<Name SpellName="루모스" ImageName="Lumos" Size="520" x="410" y="-210">
|
||||
<Name SpellName="루모스" ImageName="Lumos" SpellID="14" SpellType="3" Size="520" x="408.5" y="-218" endx="791.5" endy="-235">
|
||||
<Booster>
|
||||
<Pos x="501.5" y="-10"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="598.5" y="205"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="693" y="-10"/>
|
||||
</Booster>
|
||||
<Position>
|
||||
<Pos x="600" y="200"/>
|
||||
<Pos x="408.5" y="-218"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="790" y="-230"/>
|
||||
<Pos x="420" y="-192"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="434.5" y="-160"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="448" y="-130"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="461.5" y="-100"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="475" y="-70"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="488.5" y="-40"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="501.5" y="-10"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="515" y="20"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="529" y="50"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="542" y="80"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="556" y="110"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="565" y="130"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="574" y="150"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="587" y="180"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="598.5" y="205"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="609.5" y="180"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="622.5" y="150"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="630.5" y="130"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="640" y="110"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="653.5" y="80"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="666.5" y="50"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="679.5" y="20"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="693" y="-10"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="706" y="-40"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="719.5" y="-70"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="732.5" y="-100"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="746" y="-130"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="759" y="-160"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="772.5" y="-190"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="785.5" y="-220"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="791.5" y="-235"/>
|
||||
</Position>
|
||||
</Name>
|
||||
<Name SpellName="아씨오" ImageName="Accio" Size="520" x="852" y="-120">
|
||||
<Name SpellName="아씨오" ImageName="Accio" SpellID="4" SpellType="1" Size="520" x="852" y="-120" endx="347" endy="-71">
|
||||
<Booster>
|
||||
<Pos x="794" y="18"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="623" y="109"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="431" y="56"/>
|
||||
</Booster>
|
||||
<Position>
|
||||
<Pos x="848" y="-100"/>
|
||||
</Position>
|
||||
@@ -87,9 +315,60 @@
|
||||
<Pos x="347" y="-71"/>
|
||||
</Position>
|
||||
</Name>
|
||||
<Name SpellName="디센도" ImageName="Descendo" Size="520" x="453" y="-245">
|
||||
<Name SpellName="디센도" ImageName="Descendo" SpellID="6" SpellType="1" Size="520" x="453" y="-245" endx="580" endy="-68">
|
||||
<Booster>
|
||||
<Pos x="453" y="0"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="550" y="222"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="744" y="101"/>
|
||||
</Booster>
|
||||
<Position>
|
||||
<Pos x="453" y="90"/>
|
||||
<Pos x="453" y="-222.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="-200"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="-177.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="-155"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="-132.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="-110"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="-87.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="-65"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="-42.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="-20"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="2.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="25"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="47.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="70"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="453" y="92.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="458" y="122"/>
|
||||
@@ -158,7 +437,58 @@
|
||||
<Pos x="580" y="-68"/>
|
||||
</Position>
|
||||
</Name>
|
||||
<Name SpellName="레벨리오" ImageName="Revelio" Size="550" x="454" y="-240">
|
||||
<Name SpellName="레벨리오" ImageName="Revelio" SpellID="26" SpellType="3" Size="550" x="454" y="-240" endx="710" endy="-189">
|
||||
<Booster>
|
||||
<Pos x="454" y="0"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="550" y="222"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="738" y="36"/>
|
||||
</Booster>
|
||||
<Position>
|
||||
<Pos x="454" y="-218"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="-196"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="-174"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="-152"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="-130"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="-108"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="-86"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="-64"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="-42"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="-20"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="2"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="24"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="46"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="68"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="454" y="90"/>
|
||||
</Position>
|
||||
@@ -244,10 +574,58 @@
|
||||
<Pos x="710" y="-189"/>
|
||||
</Position>
|
||||
</Name>
|
||||
<Name SpellName="레비오소" ImageName="Levioso" Size="550" x="476" y="-253">
|
||||
<Name SpellName="레비오소" ImageName="Levioso" SpellID="2" SpellType="0" Size="550" x="476" y="-253" endx="528" endy="265">
|
||||
<Booster>
|
||||
<Pos x="735" y="-172"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="475" y="-45"/>
|
||||
</Booster>
|
||||
<Booster>
|
||||
<Pos x="475" y="120"/>
|
||||
</Booster>
|
||||
<Position>
|
||||
<Pos x="502" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="528" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="554" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="580" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="606" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="632" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="658" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="684" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="710" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="735" y="-253"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="735" y="-237"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="735" y="-221"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="735" y="-205"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="735" y="-189"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="735" y="-172"/>
|
||||
</Position>
|
||||
|
||||
@@ -316,9 +316,9 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
|
||||
|
||||
Out.vOutLine = float4(g_vOutLineColor.rgb, fRim);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
@@ -354,9 +354,9 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = float4(fDiffuseMask, fDiffuseMask, fDiffuseMask, AlphaMask);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
|
||||
@@ -383,9 +383,9 @@ PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vSRXO_MASK.r, vSRXO_MASK.g, vSRXO_MASK.a, 0.f);
|
||||
@@ -410,9 +410,9 @@ PS_OUT PS_EYE_DN_SRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(0.5f, 0.5f, 1.f, 0.f);
|
||||
@@ -459,9 +459,9 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = float4(fDiffuseMask, fDiffuseMask, fDiffuseMask, AlphaMask);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
|
||||
@@ -501,9 +501,9 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = float4(fDiffuseMask, fDiffuseMask, fDiffuseMask, AlphaMask);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
|
||||
@@ -529,9 +529,9 @@ PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vSRXO_Mask.r, vSRXO_Mask.g, vSRXO_Mask.a, 0.f);
|
||||
@@ -557,9 +557,9 @@ PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vSRO_Mask.r, vSRO_Mask.g, vSRO_Mask.b, 0.f);
|
||||
@@ -585,9 +585,9 @@ PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
|
||||
@@ -613,9 +613,9 @@ PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
|
||||
@@ -642,9 +642,9 @@ PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
|
||||
@@ -671,9 +671,9 @@ PS_OUT PS_DNMRO_ToMRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
|
||||
@@ -700,9 +700,9 @@ PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vSpecular_Mask.r, 0.5f, 1.f, 0.f);
|
||||
@@ -735,9 +735,9 @@ PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vSRO_Mask.r, Roughness, Occlusion, 0.f);
|
||||
@@ -771,9 +771,9 @@ PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vMRO_MASK.r, Roughness, Occlusion, vSRXO_Mask.b);
|
||||
@@ -802,7 +802,7 @@ PS_OUT_BLEND PS_Dragon_EtherealEyes(PS_IN In)
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
float fOppacity = g_NormalBlendTexture.Sample(DefaultSampler, uv).a;
|
||||
float4 vBaseColor = g_DiffuseBlend.Sample(DefaultSampler, uv);
|
||||
//TODO 눈알 더 해야함
|
||||
//TODO ?덉븣 ???댁빞??
|
||||
Out.vAlbedo = lerp(vDiffuse, vBaseColor, fOppacity);
|
||||
return Out;
|
||||
}
|
||||
@@ -842,9 +842,9 @@ PS_OUT PS_Dragon_Body(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vMRO, 0.f);
|
||||
@@ -875,9 +875,9 @@ PS_OUT PS_Dragon_Wings(PS_IN In)
|
||||
|
||||
Out.vAlbedo = vDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(vMRO, 0.f);
|
||||
|
||||
@@ -64,13 +64,21 @@ Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
|
||||
int g_iHover;
|
||||
int g_iBoosterOn;
|
||||
int g_iBoosterOff;
|
||||
int g_iClick;
|
||||
int g_iColor;
|
||||
int g_Count;
|
||||
int g_ChaseCount;
|
||||
|
||||
int g_iStep1 = 0;
|
||||
int g_iStep2 = 0;
|
||||
int g_iStep3 = 0;
|
||||
|
||||
float2 g_Trail[200];
|
||||
float2 g_ChaseTrail[200];
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -1795,32 +1803,105 @@ PS_OUT PS_SpellLearnColor(PS_IN In)
|
||||
Color = tex;
|
||||
|
||||
Color.rgb *= tex1.rgb;
|
||||
|
||||
float2 rectPos = g_fPosition;
|
||||
|
||||
float2 rectPos = g_fPosition - float2(256.f, 259.f);
|
||||
float2 rectSize = g_fCurrent_Size;
|
||||
|
||||
float2 itemPos = g_fItemPosition1;
|
||||
float2 itemSize = g_fItemImageSizes1;
|
||||
|
||||
float x0 = max(rectPos.x, itemPos.x);
|
||||
float x1 = min(rectPos.x + rectSize.x, itemPos.x + itemSize.x);
|
||||
float y0 = max(rectPos.y, itemPos.y);
|
||||
float y1 = min(rectPos.y + rectSize.y, itemPos.y + itemSize.y);
|
||||
float2 pixelPos;
|
||||
pixelPos.x = rectPos.x + In.vTexcoord.x * rectSize.x;
|
||||
pixelPos.y = rectPos.y + (1.0f - In.vTexcoord.y) * rectSize.y;
|
||||
|
||||
float uMin = (x0 - rectPos.x) / rectSize.x;
|
||||
float uMax = (x1 - rectPos.x) / rectSize.x;
|
||||
float vMin = (y0 - rectPos.y) / rectSize.y;
|
||||
float vMax = (y1 - rectPos.y) / rectSize.y;
|
||||
|
||||
vMin = 1.0f - vMin;
|
||||
vMax = 1.0f - vMax;
|
||||
|
||||
if (In.vTexcoord.x >= min(uMin, uMax) && In.vTexcoord.x <= max(uMin, uMax) &&
|
||||
In.vTexcoord.y >= min(vMin, vMax) && In.vTexcoord.y <= max(vMin, vMax))
|
||||
if (pixelPos.x >= itemPos.x &&
|
||||
pixelPos.x <= itemPos.x + itemSize.x &&
|
||||
pixelPos.y >= itemPos.y &&
|
||||
pixelPos.y <= itemPos.y + itemSize.y)
|
||||
{
|
||||
Color.rgb = float3(0.f, 0.f, 1.f);
|
||||
}
|
||||
|
||||
for (int i = 0; i < g_Count; ++i)
|
||||
{
|
||||
float2 trailTopLeft = g_Trail[i];
|
||||
float2 trailCenter = trailTopLeft + itemSize / 2.0f;
|
||||
|
||||
float halfWidth = itemSize.x / 2.0f + 6.f;
|
||||
float halfHeight = itemSize.y / 2.0f + 6.f;
|
||||
|
||||
if (pixelPos.x >= trailCenter.x - halfWidth &&
|
||||
pixelPos.x <= trailCenter.x + halfWidth &&
|
||||
pixelPos.y >= trailCenter.y - halfHeight &&
|
||||
pixelPos.y <= trailCenter.y + halfHeight)
|
||||
{
|
||||
Color.rgb = float3(20.f, 100.f, 180.f) / 255.f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < g_ChaseCount; ++j)
|
||||
{
|
||||
float2 ChaseTopLeft = g_ChaseTrail[j];
|
||||
float2 ChaseCenter = ChaseTopLeft + itemSize / 2.0f;
|
||||
|
||||
float halfWidth = itemSize.x * 0.7f;
|
||||
float halfHeight = itemSize.y * 0.7f;
|
||||
|
||||
if (pixelPos.x >= ChaseCenter.x - halfWidth &&
|
||||
pixelPos.x <= ChaseCenter.x + halfWidth &&
|
||||
pixelPos.y >= ChaseCenter.y - halfHeight &&
|
||||
pixelPos.y <= ChaseCenter.y + halfHeight)
|
||||
{
|
||||
Color.rgb = float3(110.f, 5.f, 5.f) / 255.f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_SpellLearnBooster(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Color = tex;
|
||||
|
||||
float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size;
|
||||
float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size;
|
||||
float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
|
||||
bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
|
||||
|
||||
if (g_iBoosterOn == 0 && g_iBoosterOff == 0)
|
||||
{
|
||||
if (inside1)
|
||||
{
|
||||
float4 tex1 = g_Texture1.Sample(DefaultSampler, Imagelocal);
|
||||
Color = lerp(Color, tex1, tex1.a);
|
||||
}
|
||||
}
|
||||
else if (g_iBoosterOn != 0 && g_iBoosterOff == 0)
|
||||
{
|
||||
|
||||
float4 tex3 = g_Texture3.Sample(DefaultSampler, In.vTexcoord);
|
||||
Color = lerp(Color, tex3, tex3.a);
|
||||
}
|
||||
else if (g_iBoosterOn == 0 && g_iBoosterOff != 0)
|
||||
{
|
||||
float4 tex2 = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
tex2.rgb *= float3(1.f, 0.f, 0.f);
|
||||
Color = tex;
|
||||
|
||||
Color = lerp(Color, tex2, tex2.a);
|
||||
}
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
@@ -2416,6 +2497,16 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_SpellLearnColor();
|
||||
}
|
||||
|
||||
pass SpellLearnBooster
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
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_SpellLearnBooster();
|
||||
}
|
||||
|
||||
pass Enemy_Detection
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 12 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 177 KiB |
Binary file not shown.
Binary file not shown.
@@ -198,13 +198,17 @@ call Update_Shaders.bat
|
||||
<ClInclude Include="..\public\Quest_Slot.h" />
|
||||
<ClInclude Include="..\public\Quest_Status.h" />
|
||||
<ClInclude Include="..\Public\Skill_Data.h" />
|
||||
<ClInclude Include="..\public\SPellLeam_SpeedPointer.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Booster.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_ChaserPointer.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_LookPointer.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Canvas.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Data.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_MovePointer.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Name.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Overlay.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Panel.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Slot.h" />
|
||||
<ClInclude Include="..\Public\State_Blink.h" />
|
||||
<ClInclude Include="..\Public\State_Dead.h" />
|
||||
<ClInclude Include="..\Public\State_Hit.h" />
|
||||
@@ -424,13 +428,17 @@ call Update_Shaders.bat
|
||||
<ClCompile Include="..\private\Quest_Slot.cpp" />
|
||||
<ClCompile Include="..\private\Quest_Status.cpp" />
|
||||
<ClCompile Include="..\Private\Skill_Data.cpp" />
|
||||
<ClCompile Include="..\private\SPellLeam_SpeedPointer.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Booster.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_ChaserPointer.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_LookPointer.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Canvas.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Data.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_MovePointer.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Name.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Overlay.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Panel.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\State_Blink.cpp" />
|
||||
<ClCompile Include="..\Private\State_Dead.cpp" />
|
||||
<ClCompile Include="..\Private\State_Hit.cpp" />
|
||||
|
||||
@@ -631,11 +631,23 @@
|
||||
<Filter Include="50.UI\SpellLearn_Data">
|
||||
<UniqueIdentifier>{6e769435-83c4-4f64-b306-1b8c5f2d228d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer">
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer">
|
||||
<UniqueIdentifier>{54a92f0d-26f1-49bf-a13b-ab11995968c7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Layer_Effect\Effect\Magic\Blink">
|
||||
<UniqueIdentifier>{3b207257-c396-473b-9906-df04b28fb0cd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer">
|
||||
<UniqueIdentifier>{ea002e2c-481e-4f1f-a16f-4e47e3a48d37}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster">
|
||||
<UniqueIdentifier>{933a90c2-8fce-4e6d-89e7-74e88cbc7f45}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot">
|
||||
<UniqueIdentifier>{5bab4bbf-253e-4d66-a0d2-8a6328ae244b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay">
|
||||
<UniqueIdentifier>{268e67a6-fa77-4a34-84d9-b3e6f6e46a00}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -1263,8 +1275,20 @@
|
||||
<ClInclude Include="..\public\SpellLearn_Data.h">
|
||||
<Filter>50.UI\SpellLearn_Data</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\SPellLeam_SpeedPointer.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer</Filter>
|
||||
<ClInclude Include="..\public\SpellLearn_ChaserPointer.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\SpellLearn_LookPointer.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\SpellLearn_Booster.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\SpellLearn_Overlay.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\SpellLearn_Slot.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Blink.h">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\Magic\Blink</Filter>
|
||||
@@ -1897,8 +1921,20 @@
|
||||
<ClCompile Include="..\private\SpellLearn_Data.cpp">
|
||||
<Filter>50.UI\SpellLearn_Data</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\SPellLeam_SpeedPointer.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_SpeedPointer</Filter>
|
||||
<ClCompile Include="..\private\SpellLearn_ChaserPointer.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SPellLeam_ChaserPointer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\SpellLearn_LookPointer.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLeam_LookPointer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\SpellLearn_Booster.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Booster</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\SpellLearn_Overlay.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Overlay</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\SpellLearn_Slot.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Blink.cpp">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\Magic\Blink</Filter>
|
||||
|
||||
@@ -118,6 +118,11 @@
|
||||
#include "SpellLearn_Name.h"
|
||||
#include "SpellLearn.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "SpellLearn_ChaserPointer.h"
|
||||
#include "SpellLearn_LookPointer.h"
|
||||
#include "SpellLearn_Booster.h"
|
||||
#include "SpellLearn_Slot.h"
|
||||
#include "SpellLearn_Overlay.h"
|
||||
|
||||
#include "IMGUIUI.h"
|
||||
|
||||
@@ -1220,6 +1225,7 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Canvas>(g_iStaticLevel, CSpellLearn_Canvas::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -1240,6 +1246,26 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_ChaserPointer>(g_iStaticLevel, CSpellLearn_ChaserPointer::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_LookPointer>(g_iStaticLevel, CSpellLearn_LookPointer::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Booster>(g_iStaticLevel, CSpellLearn_Booster::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Slot>(g_iStaticLevel, CSpellLearn_Slot::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Overlay>(g_iStaticLevel, CSpellLearn_Overlay::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CIMGUIUI>(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "SPellLeam_SpeedPointer.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSPellLeam_SpeedPointer::CSPellLeam_SpeedPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSPellLeam_SpeedPointer::CSPellLeam_SpeedPointer(const CSPellLeam_SpeedPointer& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSPellLeam_SpeedPointer::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSPellLeam_SpeedPointer::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 476.f;
|
||||
Desc.fY = -253.f;
|
||||
Desc.fSizeX = 32.f;
|
||||
Desc.fSizeY = 32.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 = 5.f;
|
||||
m_fMoveSpeed = 15.f;
|
||||
m_fAngle = XMConvertToRadians(0);
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSPellLeam_SpeedPointer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CSPellLeam_SpeedPointer::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CSPellLeam_SpeedPointer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSPellLeam_SpeedPointer::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSPellLeam_SpeedPointer::Get_WorldPostion()
|
||||
{
|
||||
return _vector();
|
||||
}
|
||||
|
||||
HRESULT CSPellLeam_SpeedPointer::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSPellLeam_SpeedPointer::Ready_Components(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSPellLeam_SpeedPointer* CSPellLeam_SpeedPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CGameObject* CSPellLeam_SpeedPointer::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CSPellLeam_SpeedPointer::Free()
|
||||
{
|
||||
}
|
||||
|
||||
void CSPellLeam_SpeedPointer::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "SpellLearn.h"
|
||||
#include "GameInstance.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "SpellLearn_ChaserPointer.h"
|
||||
|
||||
CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
@@ -38,8 +39,12 @@ HRESULT CSpellLearn::Initialize(void* pArg)
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_iTrailIndex = 0;
|
||||
m_fSortZ = 0.02f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("OverrlayClear"), [this](void* p) {this->Set_FadeOut(); });
|
||||
Change_Image(0);
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
@@ -86,7 +91,44 @@ void CSpellLearn::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
if (m_bReset == true)
|
||||
{
|
||||
m_Trail.clear();
|
||||
m_ChaseTrail.clear();
|
||||
m_bReset = false;
|
||||
}
|
||||
|
||||
if (m_bHover == false)
|
||||
{
|
||||
fill(m_Trail.begin(), m_Trail.end(), _float2(-9999.f, -9999.f));
|
||||
fill(m_ChaseTrail.begin(), m_ChaseTrail.end(), _float2(-9999.f, -9999.f));
|
||||
m_bReset = true;
|
||||
}
|
||||
|
||||
if (m_pPointer != nullptr)
|
||||
{
|
||||
if (m_pPointer->Get_MoveStart() == true)
|
||||
{
|
||||
m_bHover = true;
|
||||
m_vPointerPosition = m_pPointer->Get_Position();
|
||||
m_vPointerScale = m_pPointer->Get_Current_Size();
|
||||
|
||||
m_vChasePosition = m_pChasePointer->Get_Position();
|
||||
m_vChaseScale = m_pChasePointer->Get_Current_Size();
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
if (m_fTime >= 0.3f)
|
||||
{
|
||||
m_fTime = 0.f;
|
||||
m_Trail.push_back(m_vPointerPosition);
|
||||
m_iTrailIndex++;
|
||||
m_ChaseTrail.push_back(m_vChasePosition);
|
||||
m_iChaseiTrailIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -98,11 +140,7 @@ void CSpellLearn::Late_Update(_float fTimeDelta)
|
||||
}
|
||||
if (m_bVisible) {
|
||||
if (m_pPointer != nullptr)
|
||||
{
|
||||
m_vPointerPosition = m_pPointer->Get_Position();
|
||||
m_vPointerScale = m_pPointer->Get_Current_Size();
|
||||
}
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
@@ -172,10 +210,6 @@ HRESULT CSpellLearn::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemPosition1", &m_vPointerPosition, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemImageSizes1", &m_vPointerScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -188,7 +222,22 @@ HRESULT CSpellLearn::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_Trail", m_Trail.data(), sizeof(_float2) * _uint(m_Trail.size()))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_Count", &m_iTrailIndex, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_ChaseTrail", m_ChaseTrail.data(), sizeof(_float2) * _uint(m_Trail.size()))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_ChaseCount", &m_iChaseiTrailIndex, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -216,9 +265,14 @@ HRESULT CSpellLearn::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CSpellLearn::Change_Image(_int SpellID)
|
||||
{
|
||||
m_bHover = false;
|
||||
m_ChaseTrail.push_back(_float2(-9999.f, -9999.f));
|
||||
m_Trail.push_back(_float2(-9999.f, -9999.f));
|
||||
m_iTrailIndex = 0;
|
||||
m_iChaseiTrailIndex = 0;
|
||||
_wstring pName = TEXT("Prototype_Texture_");
|
||||
_wstring pImageName = pName + static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(SpellID).pImageName;
|
||||
|
||||
m_MoveLine = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(SpellID).Lines;
|
||||
if (m_pDiffuse_TextureCom)
|
||||
{
|
||||
Remove_Component<CTexture>();
|
||||
@@ -227,12 +281,19 @@ HRESULT CSpellLearn::Change_Image(_int SpellID)
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(LEVEL::UI), pImageName, reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
Set_FadeIn();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn::Set_Pointer(CSpellLearn_MovePointer* Pointer)
|
||||
void CSpellLearn::Set_Pointer(CSpellLearn_MovePointer* Pointer, CSpellLearn_ChaserPointer* Chase)
|
||||
{
|
||||
m_pPointer = Pointer;
|
||||
m_pChasePointer = Chase;
|
||||
}
|
||||
|
||||
void CSpellLearn::Clear()
|
||||
{
|
||||
fill(m_ChaseTrail.begin(), m_ChaseTrail.end(), _float2(-9999.f, -9999.f));
|
||||
}
|
||||
|
||||
CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
|
||||
@@ -0,0 +1,317 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_Booster.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpellLearn_Booster::CSpellLearn_Booster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Booster::CSpellLearn_Booster(const CSpellLearn_Booster& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 476.f;
|
||||
Desc.fY = -253.f;
|
||||
Desc.fSizeX = 64.f;
|
||||
Desc.fSizeY = 64.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 = 5.f;
|
||||
m_fAngle = XMConvertToRadians(0);
|
||||
m_bHover = true;
|
||||
m_fImagePosi = _float4(16.f, 16.f, 32.f, 32.f);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("BoosterOn"), [this](void* p) {this->BoosterOn(p); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("BoosterOff"), [this](void* p) {this->BoosterOff(p); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
Visible(true);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::BoosterOn(void* pArg)
|
||||
{
|
||||
Booster* State = static_cast<Booster*>(pArg);
|
||||
if (State->iBoosterIndex != m_iIndex)
|
||||
return;
|
||||
|
||||
m_bBoosterOn = true;
|
||||
m_bBoosterOff = false;
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::BoosterOff(void* pArg)
|
||||
{
|
||||
Booster* State = static_cast<Booster*>(pArg);
|
||||
|
||||
if (m_bBoosterOn == true)
|
||||
return;
|
||||
|
||||
if (State->iBoosterIndex != m_iIndex)
|
||||
return;
|
||||
|
||||
m_bBoosterOff = true;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("ChaseBooster"));
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Set_Index(_int iIndex)
|
||||
{
|
||||
m_iIndex = iIndex;
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Reset()
|
||||
{
|
||||
m_bBoosterOn = false;
|
||||
m_bBoosterOff = false;
|
||||
Set_FadeIn();
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Clear()
|
||||
{
|
||||
Set_FadeOut();
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::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 * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELLLEARNBOOSTER)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_Booster::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::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_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 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;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bHover, sizeof(_bool))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBoosterOn", &m_bBoosterOn, sizeof(_bool))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBoosterOff", &m_bBoosterOff, sizeof(_bool))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Booster::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_ButtonCalloutRing"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Mouse_LeftClick"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SpellMinigame_SpeedBurstFail"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_VFX_T_Speck_HighCoverage_D"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom3), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpellLearn_Booster* CSpellLearn_Booster::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_Booster* pInstance = new CSpellLearn_Booster(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_Booster");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_Booster::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_Booster* pInstance = new CSpellLearn_Booster(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_Booster");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom3);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn_Booster::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_ChaserPointer.h"
|
||||
#include "GameInstance.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
|
||||
CSpellLearn_ChaserPointer::CSpellLearn_ChaserPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_ChaserPointer::CSpellLearn_ChaserPointer(const CSpellLearn_ChaserPointer& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_ChaserPointer::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_ChaserPointer::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 476.f;
|
||||
Desc.fY = -253.f;
|
||||
Desc.fSizeX = 32.f;
|
||||
Desc.fSizeY = 32.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 = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_fMoveSpeed = 165.f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("ChaseBooster"), [this](void* p) {this->SpeedUp(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
Set_SpellLearn(0);
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::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 * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bMoveStart == true)
|
||||
{
|
||||
Line(fTimeDelta);
|
||||
}
|
||||
|
||||
if (m_fMoveSpeed >= 165.f)
|
||||
{
|
||||
m_fMoveSpeed -= fTimeDelta;
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_ChaserPointer::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 CSpellLearn_ChaserPointer::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Set_SpellLearn(_int Index)
|
||||
{
|
||||
m_fAlpha = 0.f;
|
||||
m_bHover = false;
|
||||
m_bMoveStart = false;
|
||||
m_fTime = 0.f;
|
||||
m_iLineIndex = _int(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Lines.size());
|
||||
m_MoveLine = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Lines;
|
||||
m_iCurrentLine = 0;
|
||||
m_fX = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fStartPosition.x;
|
||||
m_fY = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fStartPosition.y;
|
||||
m_fMoveSpeed = 165.f;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Set_Move()
|
||||
{
|
||||
m_bHover = true;
|
||||
m_bMoveStart = true;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Line(_float fTime)
|
||||
{
|
||||
m_vLerp_Position = m_MoveLine[m_iCurrentLine];
|
||||
|
||||
if (Start_Lerp(fTime) == true)
|
||||
{
|
||||
if (m_iCurrentLine < m_iLineIndex - 1)
|
||||
{
|
||||
++m_iCurrentLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bMoveStart = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::SpeedUp()
|
||||
{
|
||||
m_fMoveSpeed = 190.f;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Clear()
|
||||
{
|
||||
m_fMoveSpeed = 0.f;
|
||||
Set_FadeOut();
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_ChaserPointer::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 CSpellLearn_ChaserPointer::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SpellMinigame_SpeedBurstDropBack"), 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;
|
||||
}
|
||||
|
||||
CSpellLearn_ChaserPointer* CSpellLearn_ChaserPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_ChaserPointer* pInstance = new CSpellLearn_ChaserPointer(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_ChaserPointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_ChaserPointer::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_ChaserPointer* pInstance = new CSpellLearn_ChaserPointer(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_ChaserPointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn_ChaserPointer::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -41,12 +41,34 @@ HRESULT CSpellLearn_Data::Initialize(void* pArg)
|
||||
// 속성 읽기
|
||||
Info.pSpellName = CMyTools::ToWstring(pName->Attribute("SpellName"));
|
||||
Info.pImageName = CMyTools::ToWstring(pName->Attribute("ImageName"));
|
||||
pName->QueryIntAttribute("SpellID", &Info.iSpellID);
|
||||
pName->QueryIntAttribute("SpellType", &Info.iSpellType);
|
||||
pName->QueryFloatAttribute("Size", &Info.fSpellSize);
|
||||
|
||||
_float fX{}, fY{};
|
||||
pName->QueryFloatAttribute("x", &fX);
|
||||
pName->QueryFloatAttribute("y", &fY);
|
||||
Info.fStartPosition = _float2(fX, fY);
|
||||
_float endx{}, endy{};
|
||||
pName->QueryFloatAttribute("endx", &endx);
|
||||
pName->QueryFloatAttribute("endy", &endy);
|
||||
Info.fEndPosition = _float2(endx, endy);
|
||||
|
||||
tinyxml2::XMLElement* pBooster = pName->FirstChildElement("Booster");
|
||||
while (pBooster)
|
||||
{
|
||||
tinyxml2::XMLElement* pPos = pBooster->FirstChildElement("Pos");
|
||||
if (pPos)
|
||||
{
|
||||
_float px{}, py{};
|
||||
pPos->QueryFloatAttribute("x", &px);
|
||||
pPos->QueryFloatAttribute("y", &py);
|
||||
Info.Booster.push_back(XMVectorSet(px, py, 0.f, 1.f));
|
||||
}
|
||||
|
||||
// 다음 Position으로 이동
|
||||
pBooster = pBooster->NextSiblingElement("Booster");
|
||||
}
|
||||
|
||||
// Position 요소 반복
|
||||
tinyxml2::XMLElement* pPosition = pName->FirstChildElement("Position");
|
||||
|
||||
@@ -0,0 +1,253 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_LookPointer.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpellLearn_LookPointer::CSpellLearn_LookPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_LookPointer::CSpellLearn_LookPointer(const CSpellLearn_LookPointer& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 100.f;
|
||||
Desc.fY = 100.f;
|
||||
Desc.fSizeX = 80.f;
|
||||
Desc.fSizeY = 80.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 = 5.f;
|
||||
m_fMoveSpeed = 130.f;
|
||||
Set_SpellLearn(0);
|
||||
m_fAngle = XMConvertToRadians(0);
|
||||
Visible(true);
|
||||
m_localX = 0.f;
|
||||
m_localY = 20.f;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::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 * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fAngle = XMConvertToRadians(static_cast<CUIObject*>(m_pOwner)->Get_Angle());
|
||||
|
||||
float cosA = cos(m_fAngle);
|
||||
float sinA = sin(m_fAngle);
|
||||
|
||||
float rotatedX = m_localX * cosA - m_localY * sinA;
|
||||
float rotatedY = m_localX * sinA + m_localY * cosA;
|
||||
|
||||
MoveX(rotatedX);
|
||||
MoveY(rotatedY);
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ROTATION)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_LookPointer::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::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;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fMapAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_LookPointer::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_CursorArrow"), 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;
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::Set_SpellLearn(_int Index)
|
||||
{
|
||||
m_bMoveStart = false;
|
||||
m_iLineIndex = _int(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Lines.size());
|
||||
m_MoveLine = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Lines;
|
||||
m_iCurrentLine = 0;
|
||||
m_fX = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fStartPosition.x;
|
||||
m_fY = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fStartPosition.y;
|
||||
}
|
||||
|
||||
CSpellLearn_LookPointer* CSpellLearn_LookPointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_LookPointer* pInstance = new CSpellLearn_LookPointer(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_LookPointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_LookPointer::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_LookPointer* pInstance = new CSpellLearn_LookPointer(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_LookPointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn_LookPointer::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "GameInstance.h"
|
||||
#include "SpellLearn_LookPointer.h"
|
||||
|
||||
CSpellLearn_MovePointer::CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
@@ -36,41 +37,68 @@ HRESULT CSpellLearn_MovePointer::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 10.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_fMoveSpeed = 15.f;
|
||||
m_fMoveSpeed = 105.f;
|
||||
Set_SpellLearn(0);
|
||||
m_fAngle = XMConvertToRadians(0);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Booster"), [this](void* p) {this->Set_Booster(p); });
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Set_SpellLearn(_int Index)
|
||||
{
|
||||
m_bMoveStart = false;
|
||||
m_bHover = true;
|
||||
m_iLineIndex = _int(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Lines.size());
|
||||
m_MoveLine = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Lines;
|
||||
m_Boosters = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Booster;
|
||||
m_iCurrentLine = 0;
|
||||
m_fX = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fStartPosition.x;
|
||||
m_fY = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fStartPosition.y;
|
||||
m_Booster.iBoosterIndex = -1;
|
||||
m_Booster.bBoosterOn = false;
|
||||
Set_FadeIn();
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Line(_float fTime)
|
||||
_int CSpellLearn_MovePointer::Get_SpellTrail()
|
||||
{
|
||||
return m_iCurrentLine;
|
||||
}
|
||||
|
||||
_bool CSpellLearn_MovePointer::Get_MoveStart()
|
||||
{
|
||||
return m_bMoveStart;
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Line(_float fTime, _float2 fMouse)
|
||||
{
|
||||
m_vLerp_Position = m_MoveLine[m_iCurrentLine];
|
||||
|
||||
if (Start_Lerp(m_fMoveSpeed * fTime) == true)
|
||||
if (Start_Lerp_Speed(fTime, fMouse) == true)
|
||||
{
|
||||
if (m_iCurrentLine < m_iLineIndex - 1)
|
||||
{
|
||||
++m_iCurrentLine;
|
||||
m_fPerPosition = _float2(m_MoveLine[m_iCurrentLine - 1].m128_f32[0], m_MoveLine[m_iCurrentLine - 1].m128_f32[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bMoveStart = false;
|
||||
Set_FadeOut();
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("LearnClear"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Set_Booster(void* pArg)
|
||||
{
|
||||
Booster* Info = static_cast<Booster*>(pArg);
|
||||
m_Booster.iBoosterIndex = Info->iBoosterIndex;
|
||||
m_Booster.bBoosterOn = Info->bBoosterOn;
|
||||
m_bBooster = true;
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Priority_Update(_float fTimeDelta)
|
||||
@@ -114,28 +142,45 @@ void CSpellLearn_MovePointer::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
POINT ptMouse{};
|
||||
GetCursorPos(&ptMouse);
|
||||
ScreenToClient(g_hWnd, &ptMouse);
|
||||
_float2 fMouse{};
|
||||
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
|
||||
fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f);
|
||||
|
||||
_float2 fFinalMouse{};
|
||||
fFinalMouse.x = fMouse.x - m_fX;
|
||||
fFinalMouse.y = fMouse.y - m_fY;
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_L))
|
||||
{
|
||||
m_bMoveStart = true;
|
||||
m_bBooster = false;
|
||||
m_fMoveSpeed = 105.f;
|
||||
}
|
||||
|
||||
if (m_bMoveStart == true)
|
||||
{
|
||||
Line(fTimeDelta);
|
||||
Line(fTimeDelta, fMouse);
|
||||
}
|
||||
|
||||
POINT ptMouse{};
|
||||
GetCursorPos(&ptMouse);
|
||||
ScreenToClient(g_hWnd, &ptMouse);
|
||||
_float2 fMouse;
|
||||
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
|
||||
fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f);
|
||||
m_fAngle = atan2(-fFinalMouse.x, fFinalMouse.y);
|
||||
|
||||
fMouse.x = fMouse.x - m_fX;
|
||||
fMouse.y = fMouse.y - m_fY;
|
||||
if (m_bBooster == true)
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON))
|
||||
{
|
||||
m_bBooster = false;
|
||||
m_fMoveSpeed = 160.f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("BoosterOn"), &m_Booster);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
m_fAngle = atan2(-fMouse.x, fMouse.y);
|
||||
if (m_fMoveSpeed >= 105.f)
|
||||
{
|
||||
m_fMoveSpeed -= fTimeDelta * m_fTimeMult;
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
@@ -148,7 +193,8 @@ void CSpellLearn_MovePointer::Late_Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
if (m_bHover == true)
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
@@ -237,6 +283,10 @@ HRESULT CSpellLearn_MovePointer::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_LookPointer>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_LookPointer**>(&m_pSpellLeam_LookPointer))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,387 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_Overlay.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpellLearn_Overlay::CSpellLearn_Overlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Overlay::CSpellLearn_Overlay(const CSpellLearn_Overlay& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 380.f;
|
||||
Desc.fY = -30.f;
|
||||
Desc.fSizeX = 105.f;
|
||||
Desc.fSizeY = 105.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_iImageFrameX = 8;
|
||||
m_iImageFrameY = 8;
|
||||
m_fFrame = 0.2f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAngle = XMConvertToRadians(-135.f);
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_vUVScale.x = 1.f;
|
||||
m_vUVScale.y = 1.f;
|
||||
m_fCoolTime = 5.f;
|
||||
m_fSortZ = 0.01f;
|
||||
m_fMoveSpeed = 10.f;
|
||||
m_fLerpX = 600.f;
|
||||
m_fLerpY = 100.f;
|
||||
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
Compute_UI(5);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Set_SpellLearn(_int Index)
|
||||
{
|
||||
Compute_UI(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).iSpellID);
|
||||
m_vUVScale.y = 0.f;
|
||||
m_fTrail = 0.f;
|
||||
m_iSpellType = static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).iSpellType;
|
||||
m_fSpellLearn = _float(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).Lines.size());
|
||||
MoveX(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fEndPosition.x);
|
||||
MoveY(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fEndPosition.y);
|
||||
SizeUpdate(m_fOrigin_Size.x, m_fOrigin_Size.y);
|
||||
m_fSizeUp = false;
|
||||
m_bClear = false;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Set_Count(_int Index)
|
||||
{
|
||||
m_fTrail = _float(Index);
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::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;
|
||||
}
|
||||
}
|
||||
|
||||
Update_Trail(fTimeDelta);
|
||||
|
||||
if (m_bClear == true)
|
||||
{
|
||||
SizeUp(fTimeDelta * m_fTimeMult * m_fMoveSpeed);
|
||||
}
|
||||
|
||||
if (m_fSizeUp == true)
|
||||
{
|
||||
if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true)
|
||||
{
|
||||
m_fSizeUp = false;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::TYPE))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_Overlay::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::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_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 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_fFrame", &m_fFrame, 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_iSpellType", &m_iSpellType, sizeof(_int))))
|
||||
{
|
||||
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;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountX", &m_iImageFrameX, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountY", &m_iImageFrameY, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaU", &m_vUVScale.x, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaV", &m_vUVScale.y, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCoolTime", &m_fCoolTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Overlay::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemBack_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_spellmeter_Generic"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Spell"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_tillingSmokes"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom3), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Clear()
|
||||
{
|
||||
m_vUVScale.y = 1.2f;
|
||||
m_bClear = true;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Compute_UI(_uint SpellID)
|
||||
{
|
||||
_float2 fImage_Size = { 1024.f, 1792.f };
|
||||
|
||||
_uint iCountX = 4;
|
||||
_uint iCountY = 6;
|
||||
|
||||
_float iImageX = 256.f;
|
||||
_float iImageY = 256.f;
|
||||
|
||||
_uint iframeX = SpellID % iCountX;
|
||||
_uint iframeY = SpellID / iCountX;
|
||||
|
||||
_float2 UVStart;
|
||||
UVStart.x = iframeX * iImageX / fImage_Size.x;
|
||||
UVStart.y = iframeY * iImageY / fImage_Size.y;
|
||||
|
||||
_float2 UVEnd;
|
||||
UVEnd.x = UVStart.x + (iImageX / fImage_Size.x);
|
||||
UVEnd.y = UVStart.y + (iImageY / fImage_Size.y);
|
||||
|
||||
_float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y };
|
||||
m_vUV = UV;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Update_Trail(_float fTimeaDalta)
|
||||
{
|
||||
m_vUVScale.y = CMyTools::Lerp_f1D(m_vUVScale.y, m_fTrail / m_fSpellLearn * 1.05f, fTimeaDalta * m_fMoveSpeed);
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::SizeUp(_float fSizeX)
|
||||
{
|
||||
m_fSizeX += fSizeX;
|
||||
m_fSizeY += fSizeX;
|
||||
|
||||
if (160.f <= m_fSizeX + fSizeX)
|
||||
{
|
||||
m_fSizeX = 160.f;
|
||||
m_fSizeY = 160.f;
|
||||
m_bClear = false;
|
||||
m_fSizeUp = true;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("OverrlayClear"));
|
||||
}
|
||||
}
|
||||
|
||||
CSpellLearn_Overlay* CSpellLearn_Overlay::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_Overlay* pInstance = new CSpellLearn_Overlay(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_Overlay");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_Overlay::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_Overlay* pInstance = new CSpellLearn_Overlay(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Overlay");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom3);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn_Overlay::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -4,7 +4,11 @@
|
||||
#include "SpellLearn_Name.h"
|
||||
#include "SpellLearn.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "SPellLearn_ChaserPointer.h"
|
||||
#include "SpellLearn_Data.h"
|
||||
#include "SpellLearn_Booster.h"
|
||||
#include "SpellLearn_Slot.h"
|
||||
#include "SpellLearn_Overlay.h"
|
||||
|
||||
CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
@@ -45,7 +49,22 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg)
|
||||
m_fCanvasAlpha = 1.f;
|
||||
m_fSortZ = 0.05f;
|
||||
m_fDelayTime = 1.f;
|
||||
static_cast<CSpellLearn*>(m_pSpellLearn)->Set_Pointer(static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer));
|
||||
static_cast<CSpellLearn*>(m_pSpellLearn)->Set_Pointer(
|
||||
static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer),
|
||||
static_cast<CSpellLearn_ChaserPointer*>(m_pSpellLearn_ChaserPointer));
|
||||
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
static_cast<CSpellLearn_Booster*>(m_pBooster[i])->Move(Get_Learninfo(Index).Booster[i].m128_f32[0],
|
||||
Get_Learninfo(Index).Booster[i].m128_f32[1]);
|
||||
}
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
m_PointerStates.push_back(m_State);
|
||||
m_ChaseStates.push_back(m_State);
|
||||
}
|
||||
static_cast<CSpellLearn_Overlay*>(m_pSpellLearn_Overlay)->Set_SpellLearn(0);
|
||||
static_cast<CSpellLearn_Slot*>(m_pSpellLearn_Slot)->Set_SpellLearn(0);
|
||||
Visible(true);
|
||||
ElementAllVisible(true);
|
||||
return S_OK;
|
||||
@@ -56,6 +75,23 @@ const CUIObject::SPELLLEARNINFO CSpellLearn_Panel::Get_Learninfo(_int Index)
|
||||
return static_cast<CSpellLearn_Data*>(m_pSpellLearn_Data)->Get_SpellLearn(Index);
|
||||
}
|
||||
|
||||
void CSpellLearn_Panel::Set_Learn(_int Index)
|
||||
{
|
||||
m_fTime = 0.f;
|
||||
static_cast<CSpellLearn*>(m_pSpellLearn)->Change_Image(Index);
|
||||
static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
|
||||
static_cast<CSpellLearn_ChaserPointer*>(m_pSpellLearn_ChaserPointer)->Set_SpellLearn(Index);
|
||||
static_cast<CSpellLearn_Name*>(m_pSpellLearn_Name)->Set_Name(Index);
|
||||
static_cast<CSpellLearn_Overlay*>(m_pSpellLearn_Overlay)->Set_SpellLearn(Index);
|
||||
static_cast<CSpellLearn_Slot*>(m_pSpellLearn_Slot)->Set_SpellLearn(Index);
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
static_cast<CSpellLearn_Booster*>(m_pBooster[i])->Move(Get_Learninfo(Index).Booster[i].m128_f32[0],
|
||||
Get_Learninfo(Index).Booster[i].m128_f32[1]);
|
||||
static_cast<CSpellLearn_Booster*>(m_pBooster[i])->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
void CSpellLearn_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
@@ -82,11 +118,90 @@ void CSpellLearn_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
Index++;
|
||||
}
|
||||
static_cast<CSpellLearn*>(m_pSpellLearn)->Change_Image(Index);
|
||||
static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer)->Set_SpellLearn(Index);
|
||||
static_cast<CSpellLearn_Name*>(m_pSpellLearn_Name)->Set_Name(Index);
|
||||
Set_Learn(Index);
|
||||
}
|
||||
|
||||
if (static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer)->Get_MoveStart() == true)
|
||||
{
|
||||
m_fTime += fTimeDelta;
|
||||
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
m_PointerStates[i].bPerHit = m_PointerStates[i].bHit;
|
||||
|
||||
_bool bPointer = Chack_Element(static_cast<CUIObject*>(m_pBooster[i])->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Current_Size().x,
|
||||
static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Current_Size().x);
|
||||
|
||||
m_PointerStates[i].bHit = bPointer;
|
||||
|
||||
if (m_PointerStates[i].bHit == true && m_PointerStates[i].bPerHit == false)
|
||||
{
|
||||
m_Booster.iBoosterIndex = _int(i);
|
||||
m_Booster.bBoosterOn = true;
|
||||
Function_Callback(TEXT("Booster"), &m_Booster);
|
||||
}
|
||||
|
||||
if (m_PointerStates[i].bHit == false && m_PointerStates[i].bPerHit == true)
|
||||
{
|
||||
m_Booster.iBoosterIndex = _int(i);
|
||||
m_Booster.bBoosterOn = false;
|
||||
Function_Callback(TEXT("Booster"), &m_Booster);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < m_pBooster.size(); ++i)
|
||||
{
|
||||
m_ChaseStates[i].bPerHit = m_ChaseStates[i].bHit;
|
||||
|
||||
_bool bPointer = Chack_Element(static_cast<CUIObject*>(m_pBooster[i])->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x,
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x);
|
||||
|
||||
m_ChaseStates[i].bHit = bPointer;
|
||||
|
||||
if (m_ChaseStates[i].bHit == true && m_ChaseStates[i].bPerHit == false)
|
||||
{
|
||||
m_Booster.iBoosterIndex = _int(i);
|
||||
m_Booster.bBoosterOn = true;
|
||||
Function_Callback(TEXT("BoosterOff"), &m_Booster);
|
||||
}
|
||||
|
||||
static_cast<CSpellLearn_Overlay*>(m_pSpellLearn_Overlay)->Set_Count(
|
||||
static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer)->Get_SpellTrail());
|
||||
|
||||
}
|
||||
|
||||
if (m_fTime >= 1.f)
|
||||
{
|
||||
static_cast<CSpellLearn_ChaserPointer*>(m_pSpellLearn_ChaserPointer)->Set_FadeIn();
|
||||
}
|
||||
|
||||
if (m_fTime >= 2.f)
|
||||
{
|
||||
static_cast<CSpellLearn_ChaserPointer*>(m_pSpellLearn_ChaserPointer)->Set_Move();
|
||||
|
||||
if (_bool bPointer = Chack_Element(static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Position(),
|
||||
static_cast<CUIObject*>(m_pSpellLearn_MovePointer)->Get_Current_Size().x,
|
||||
static_cast<CUIObject*>(m_pSpellLearn_ChaserPointer)->Get_Current_Size().x) == true)
|
||||
{
|
||||
Set_Learn(Index);
|
||||
|
||||
m_Booster.iBoosterIndex = _int(-1);
|
||||
m_Booster.bBoosterOn = false;
|
||||
Function_Callback(TEXT("Booster"), &m_Booster);
|
||||
for (size_t i = 0; i < m_PointerStates.size(); ++i)
|
||||
{
|
||||
m_PointerStates[i].bPerHit = false;
|
||||
m_PointerStates[i].bHit = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -213,6 +328,36 @@ HRESULT CSpellLearn_Panel::Ready_Element(void* pArg)
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_ChaserPointer>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_ChaserPointer**>(&m_pSpellLearn_ChaserPointer))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SPellLeam_ChaserPointer"), m_pSpellLearn_ChaserPointer);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Slot**>(&m_pSpellLearn_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_Slot"), m_pSpellLearn_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Overlay**>(&m_pSpellLearn_Overlay))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_Overlay"), m_pSpellLearn_Overlay);
|
||||
|
||||
for (_int i = 0; i < 3; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Booster>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Booster**>(&m_pSpellLearn_Booster))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
static_cast<CSpellLearn_Booster*>(m_pSpellLearn_Booster)->Set_Index(i);
|
||||
|
||||
m_pBooster.push_back(m_pSpellLearn_Booster);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,283 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_Slot.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpellLearn_Slot::CSpellLearn_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Slot::CSpellLearn_Slot(const CSpellLearn_Slot& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 380.f;
|
||||
Desc.fY = -30.f;
|
||||
Desc.fSizeX = 105.f;
|
||||
Desc.fSizeY = 105.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_fAngle = XMConvertToRadians(135.f);
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fMoveSpeed = 10.f;
|
||||
m_fLerpX = 600.f;
|
||||
m_fLerpY = 100.f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("LearnClear"), [this](void* p) {this->Clear(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::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;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bClear == true)
|
||||
{
|
||||
SizeUp(fTimeDelta * m_fTimeMult * m_fMoveSpeed);
|
||||
}
|
||||
|
||||
if (m_fSizeUp == true)
|
||||
{
|
||||
if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true)
|
||||
{
|
||||
m_fSizeUp = false;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SLOT))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_Slot::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::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_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_iSpellType", &m_iSpellType, sizeof(_int))))
|
||||
{
|
||||
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;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Slot::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), 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;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Set_SpellLearn(_int Index)
|
||||
{
|
||||
MoveX(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fEndPosition.x);
|
||||
MoveY(static_cast<CUIObject*>(m_pOwner)->Get_Learninfo(Index).fEndPosition.y);
|
||||
SizeUpdate(m_fOrigin_Size.x, m_fOrigin_Size.y);
|
||||
m_fSizeUp = false;
|
||||
m_bClear = false;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Clear()
|
||||
{
|
||||
m_bClear = true;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::SizeUp(_float fSizeX)
|
||||
{
|
||||
m_fSizeX += fSizeX;
|
||||
m_fSizeY += fSizeX;
|
||||
|
||||
if (160.f <= m_fSizeX + fSizeX)
|
||||
{
|
||||
m_fSizeX = 160.f;
|
||||
m_fSizeY = 160.f;
|
||||
m_bClear = false;
|
||||
m_fSizeUp = true;
|
||||
}
|
||||
}
|
||||
|
||||
CSpellLearn_Slot* CSpellLearn_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_Slot* pInstance = new CSpellLearn_Slot(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_Slot::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_Slot* pInstance = new CSpellLearn_Slot(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn_Slot::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -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,
|
||||
SPELL_LEARN, SPELLLEARNCOLOR,
|
||||
SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER,
|
||||
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 , DISTORTION , NONPOS , NONPOS_BLUR, BLUR_MESH, 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, QUEST_SLOT, END };
|
||||
|
||||
@@ -27,7 +27,11 @@ class CSpellLearn final : public CElementObject
|
||||
|
||||
public:
|
||||
HRESULT Change_Image(_int SpellID);
|
||||
void Set_Pointer(class CSpellLearn_MovePointer* Pointer);
|
||||
void Set_Pointer(class CSpellLearn_MovePointer* Pointer, class CSpellLearn_ChaserPointer* Chase);
|
||||
|
||||
private:
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
@@ -35,9 +39,24 @@ class CSpellLearn final : public CElementObject
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
class CSpellLearn_MovePointer* m_pPointer = { nullptr };
|
||||
class CSpellLearn_ChaserPointer* m_pChasePointer = { nullptr };
|
||||
|
||||
_float2 m_vPointerPosition{};
|
||||
_float3 m_vPointerScale{};
|
||||
|
||||
_float2 m_vChasePosition{};
|
||||
_float3 m_vChaseScale{};
|
||||
|
||||
_bool m_bReset{};
|
||||
|
||||
_int m_iIndex{};
|
||||
_int m_iTrailIndex{};
|
||||
vector<_float2> m_Trail;
|
||||
|
||||
_int m_iChaseiTrailIndex{};
|
||||
vector<_float2> m_ChaseTrail;
|
||||
vector<_vector> m_MoveLine;
|
||||
|
||||
public:
|
||||
static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_Booster final : public CElementObject
|
||||
{
|
||||
private:
|
||||
struct Booster
|
||||
{
|
||||
_bool bBoosterOn = { false };
|
||||
_int iBoosterIndex{};
|
||||
};
|
||||
private:
|
||||
CSpellLearn_Booster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Booster(const CSpellLearn_Booster& rhs);
|
||||
virtual ~CSpellLearn_Booster() = 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;
|
||||
|
||||
public:
|
||||
void BoosterOn(void* pArg);
|
||||
void BoosterOff(void* pArg);
|
||||
|
||||
void Set_Index(_int iIndex);
|
||||
void Reset();
|
||||
|
||||
private:
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom3 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_bool m_bBoosterOn = { false };
|
||||
_bool m_bBoosterOff = { false };
|
||||
_float4 m_fImagePosi{};
|
||||
_int m_iIndex{};
|
||||
public:
|
||||
static CSpellLearn_Booster* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_ChaserPointer final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_ChaserPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_ChaserPointer(const CSpellLearn_ChaserPointer& rhs);
|
||||
virtual ~CSpellLearn_ChaserPointer() = 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;
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
void Set_Move();
|
||||
private:
|
||||
void Line(_float fTime);
|
||||
void SpeedUp();
|
||||
void Clear();
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
_bool m_bMoveStart = { false };
|
||||
|
||||
_int m_iLineIndex{};
|
||||
_int m_iCurrentLine{};
|
||||
vector<_vector> m_MoveLine;
|
||||
|
||||
public:
|
||||
static CSpellLearn_ChaserPointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_LookPointer final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_LookPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_LookPointer(const CSpellLearn_LookPointer& rhs);
|
||||
virtual ~CSpellLearn_LookPointer() = 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;
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
_bool m_bMoveStart = { false };
|
||||
|
||||
_int m_iLineIndex{};
|
||||
_int m_iCurrentLine{};
|
||||
vector<_vector> m_MoveLine;
|
||||
_float m_localX{};
|
||||
_float m_localY{};
|
||||
public:
|
||||
static CSpellLearn_LookPointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -7,6 +7,12 @@ NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_MovePointer final : public CElementObject
|
||||
{
|
||||
private:
|
||||
struct Booster
|
||||
{
|
||||
_bool bBoosterOn = { false };
|
||||
_int iBoosterIndex{};
|
||||
};
|
||||
private:
|
||||
CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs);
|
||||
@@ -27,23 +33,29 @@ class CSpellLearn_MovePointer final : public CElementObject
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
|
||||
_int Get_SpellTrail();
|
||||
_bool Get_MoveStart();
|
||||
private:
|
||||
void Line(_float fTime);
|
||||
void Line(_float fTime, _float2 fMouse);
|
||||
|
||||
void Set_Booster(void* pArg);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
class SpellLearm_LookPointer* m_pSpellLeam_LookPointer = { nullptr };
|
||||
|
||||
_bool m_bMoveStart = { false };
|
||||
_bool m_bBooster = { false };
|
||||
|
||||
Booster m_Booster;
|
||||
|
||||
_int m_iLineIndex{};
|
||||
_int m_iCurrentLine{};
|
||||
vector<_vector> m_MoveLine;
|
||||
|
||||
vector<_vector> m_Boosters;
|
||||
public:
|
||||
static CSpellLearn_MovePointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_Overlay final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_Overlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Overlay(const CSpellLearn_Overlay& rhs);
|
||||
virtual ~CSpellLearn_Overlay() = 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;
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
void Set_Count(_int Index);
|
||||
|
||||
private:
|
||||
void Clear();
|
||||
void Compute_UI(_uint SpellID);
|
||||
void Update_Trail(_float fTimeaDalta);
|
||||
void SizeUp(_float fSizeX);
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom3 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_int m_iImageFrameX{};
|
||||
_int m_iImageFrameY{};
|
||||
_float m_fFrame{};
|
||||
_float4 m_vUV{};
|
||||
|
||||
_float m_fSpellLearn{};
|
||||
_float m_fTrail{};
|
||||
_float m_fTargetTrail{};
|
||||
_bool m_bClear = { false };
|
||||
_bool m_fSizeUp = { false };
|
||||
public:
|
||||
static CSpellLearn_Overlay* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -11,7 +11,17 @@ NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_Panel final : public CPanelObject
|
||||
{
|
||||
|
||||
private:
|
||||
struct Booster
|
||||
{
|
||||
_bool bBoosterOn = { false };
|
||||
_int iBoosterIndex{};
|
||||
};
|
||||
struct State
|
||||
{
|
||||
_bool bHit = { false };
|
||||
_bool bPerHit = { false };
|
||||
};
|
||||
private:
|
||||
CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Panel(const CSpellLearn_Panel& rhs);
|
||||
@@ -34,6 +44,8 @@ class CSpellLearn_Panel final : public CPanelObject
|
||||
public:
|
||||
virtual const SPELLLEARNINFO Get_Learninfo(_int Index) override;
|
||||
|
||||
void Set_Learn(_int Index);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
@@ -45,10 +57,19 @@ class CSpellLearn_Panel final : public CPanelObject
|
||||
CGameObject* m_pSpellLearn_Name = { nullptr };
|
||||
CGameObject* m_pSpellLearn = { nullptr };
|
||||
CGameObject* m_pSpellLearn_MovePointer = { nullptr };
|
||||
CGameObject* m_pSpellLearn_ChaserPointer = { nullptr };
|
||||
CGameObject* m_pSpellLearn_Data = { nullptr };
|
||||
CGameObject* m_pSpellLearn_Booster = { nullptr };
|
||||
CGameObject* m_pSpellLearn_Slot= { nullptr };
|
||||
CGameObject* m_pSpellLearn_Overlay = { nullptr };
|
||||
|
||||
_int Index{};
|
||||
|
||||
vector<CGameObject*> m_pBooster;
|
||||
Booster m_Booster;
|
||||
State m_State;
|
||||
vector<State> m_PointerStates;
|
||||
vector<State> m_ChaseStates;
|
||||
public:
|
||||
static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
+14
-5
@@ -5,12 +5,12 @@
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSPellLeam_SpeedPointer final : public CElementObject
|
||||
class CSpellLearn_Slot final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSPellLeam_SpeedPointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSPellLeam_SpeedPointer(const CSPellLeam_SpeedPointer& rhs);
|
||||
virtual ~CSPellLeam_SpeedPointer() = default;
|
||||
CSpellLearn_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Slot(const CSpellLearn_Slot& rhs);
|
||||
virtual ~CSpellLearn_Slot() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
@@ -19,19 +19,28 @@ class CSPellLeam_SpeedPointer final : public CElementObject
|
||||
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;
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
void SizeUp(_float fSizeX);
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_bool m_bClear = { false };
|
||||
_bool m_fSizeUp = { false };
|
||||
public:
|
||||
static CSPellLeam_SpeedPointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
static CSpellLearn_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
@@ -158,6 +158,46 @@ _bool CElementObject::Start_Lerp(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
_bool CElementObject::Start_Lerp_Speed(_float fTimeDelta, _float2 MousePoint)
|
||||
{
|
||||
_vector Mouse = XMVectorSet(MousePoint.x, MousePoint.y, 1.f, 1.f);
|
||||
_vector Pos = m_fCurrent_Position;
|
||||
_vector Target = m_vLerp_Position;
|
||||
|
||||
_vector Dir = XMVectorSubtract(Target, Pos);
|
||||
_vector MouseDir = XMVectorSubtract(Mouse, Pos);
|
||||
|
||||
_vector NorDir = XMVector3Normalize(Dir);
|
||||
_vector NorMouse = XMVector3Normalize(MouseDir);
|
||||
|
||||
_float SameDir = XMVectorGetX(XMVector3Dot(NorDir, NorMouse));
|
||||
_float Weight = max(0.5f, SameDir);
|
||||
_vector LenVec = XMVector3Length(Dir);
|
||||
_float Distance = XMVectorGetX(LenVec);
|
||||
|
||||
_float move = m_fMoveSpeed * fTimeDelta * Weight;
|
||||
|
||||
if (Distance <= move)
|
||||
{
|
||||
m_fX = m_vLerp_Position.m128_f32[0];
|
||||
m_fY = m_vLerp_Position.m128_f32[1];
|
||||
return true;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
XMVECTOR DirNorm = XMVector3Normalize(Dir);
|
||||
m_fX = (Pos + DirNorm * move).m128_f32[0];
|
||||
m_fY = (Pos + DirNorm * move).m128_f32[1];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
_bool CElementObject::Set_Trgger()
|
||||
{
|
||||
return _bool();
|
||||
}
|
||||
|
||||
void CElementObject::Reset_Pos(_float fTimeDelta)
|
||||
{
|
||||
_vector Pos = m_fCurrent_Position;
|
||||
|
||||
@@ -183,6 +183,19 @@ _bool CPanelObject::Chack_Visible()
|
||||
return m_bVisible;
|
||||
}
|
||||
|
||||
_bool CPanelObject::Chack_Element(_float2 Position, _float2 Target, _float Scale, _float TargetScale)
|
||||
{
|
||||
_vector vPos = XMVectorSet(Position.x, Position.y, 0.f, 1.f);
|
||||
_vector vTarget = XMVectorSet(Target.x, Target.y, 0.f, 1.f);
|
||||
|
||||
_float Dir = XMVectorGetX(XMVector3Length(XMVectorSubtract(vTarget, vPos)));
|
||||
|
||||
if (Dir <= (Scale * 0.5f) + (TargetScale * 0.5f))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
CGameObject* CPanelObject::Find_Element(const wstring& Name)
|
||||
{
|
||||
auto iter = m_Elements_map.find(Name);
|
||||
|
||||
@@ -377,7 +377,7 @@ _bool CUIObject::Start_Lerp(_float fTimeDelta)
|
||||
return false;
|
||||
}
|
||||
|
||||
_bool CUIObject::Start_Bezier(_float fTimeDelta)
|
||||
_bool CUIObject::Start_Lerp_Speed(_float fTimeDelta, _float2 Mouse_Point)
|
||||
{
|
||||
return _bool();
|
||||
}
|
||||
@@ -538,6 +538,11 @@ _float2 CUIObject::Get_Font()
|
||||
return _float2(m_fFontX, m_fFontY);
|
||||
}
|
||||
|
||||
_float2 CUIObject::Get_PerPosition()
|
||||
{
|
||||
return m_fPerPosition;
|
||||
}
|
||||
|
||||
void CUIObject::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
@@ -31,6 +31,8 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
|
||||
virtual _float Get_Nine_Slice_Bottom() override;
|
||||
|
||||
virtual _bool Start_Lerp(_float fTimeDelta) override;
|
||||
virtual _bool Start_Lerp_Speed(_float fTimeDelta, _float2 MousePoint) override;
|
||||
virtual _bool Set_Trgger();
|
||||
virtual void Reset_Pos(_float fTimeDelta)override;
|
||||
virtual void Start_Size_Lerp(_float fTimeDelta) override;
|
||||
virtual void Reset_Size_Lerp(_float fTimeDelta) override;
|
||||
@@ -43,6 +45,9 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
|
||||
|
||||
_float m_fBezierTime = 0;
|
||||
|
||||
vector<_vector> m_vector;
|
||||
|
||||
|
||||
public:
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
@@ -33,10 +33,12 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject
|
||||
|
||||
virtual void Add_Function(wstring Name, function<void(void*)> Evnet) override;
|
||||
virtual void Function_Callback(wstring Name, void* pArg = nullptr) override;
|
||||
|
||||
protected:
|
||||
virtual void Add_Element(wstring Name, class CGameObject* pElement);
|
||||
virtual _bool Chack_Visible() override;
|
||||
|
||||
virtual _bool Chack_Element(_float2 Position, _float2 Target, _float Scale, _float TargetScale);
|
||||
protected:
|
||||
vector<class CGameObject*> m_Elements; // 패널이 엘리먼츠를 관리하기 위해 만듬
|
||||
vector<wstring> m_ElementName; // 엘리멘트들의 이름을 전해주기 위해서
|
||||
|
||||
@@ -76,10 +76,14 @@ typedef struct tagCurrentQeustSerectInfo
|
||||
|
||||
typedef struct tagSpellLearnInfo
|
||||
{
|
||||
_wstring pSpellName{};
|
||||
_wstring pImageName{};
|
||||
_float fSpellSize{};
|
||||
_float2 fStartPosition{};
|
||||
_wstring pSpellName{};
|
||||
_wstring pImageName{};
|
||||
_int iSpellID{};
|
||||
_int iSpellType{};
|
||||
_float fSpellSize{};
|
||||
_float2 fStartPosition{};
|
||||
_float2 fEndPosition{};
|
||||
vector<_vector> Booster;
|
||||
vector<_vector> Lines;
|
||||
}SPELLLEARNINFO;
|
||||
|
||||
@@ -152,7 +156,7 @@ typedef struct tagSpellLearnInfo
|
||||
virtual void Lerp_PosX(_float PosX);
|
||||
virtual void Lerp_PosY(_float PosY);
|
||||
virtual _bool Start_Lerp(_float fTimeDelta);
|
||||
virtual _bool Start_Bezier(_float fTimeDelta);
|
||||
virtual _bool Start_Lerp_Speed(_float fTimeDelta, _float2 Mouse_Point);
|
||||
virtual void Reset_Pos(_float fTimeDelta);
|
||||
virtual void Start_Size_Lerp(_float fTimeDelta);
|
||||
virtual void Reset_Size_Lerp(_float fTimeDelta);
|
||||
@@ -190,6 +194,7 @@ typedef struct tagSpellLearnInfo
|
||||
virtual void Set_FontX(_float fFontX);
|
||||
virtual void Set_FontY(_float fFontY);
|
||||
virtual _float2 Get_Font();
|
||||
virtual _float2 Get_PerPosition();
|
||||
protected:
|
||||
_vector m_fOrigin_Position_vector{};
|
||||
_float2 m_fOrigin_Position{};
|
||||
@@ -246,6 +251,8 @@ typedef struct tagSpellLearnInfo
|
||||
_float m_fFontX{};
|
||||
_float m_fFontY{};
|
||||
_float m_fFontOffSet{};
|
||||
|
||||
_float2 m_fPerPosition{};
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype();
|
||||
virtual HRESULT Initialize(void* pArg);
|
||||
|
||||
Reference in New Issue
Block a user