Merge branch 'Develope' into Bloom

This commit is contained in:
kimnuri
2025-12-01 12:00:56 +09:00
46 changed files with 1340 additions and 491 deletions
@@ -340,15 +340,27 @@ PS_OUT PS_QuestType(PS_IN In)
return Out; return Out;
} }
PS_OUT PS_UVMult(PS_IN In) PS_OUT PS_Spell_Anim(PS_IN In)
{ {
PS_OUT Out; PS_OUT Out;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = g_Texture.Sample(DefaultSampler, In.vTexcoord); float4 Color = float4(1.f,1.f,1.f,1.f);
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
color.a *= Alpha; Color = tex1;
Out.vColor = color;
float2 texpos = g_fImageSipos1.xy / g_fCurrent_Size;
float2 texsize = g_fImageSipos1.zw / g_fCurrent_Size;
float2 texlocal = (In.vTexcoord - texpos) / texsize;
bool inside = all(texlocal >= 0.0f && texlocal <= 1.0f);
float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
if (inside)
Color = lerp(Color, tex2, tex2.a);
Color.a *= Alpha;
Out.vColor = Color;
return Out; return Out;
} }
@@ -1229,14 +1241,14 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_QuestType(); PixelShader = compile ps_5_0 PS_QuestType();
} }
pass UVMult pass Spell_Anim
{ {
SetRasterizerState(RS_Default); SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_Default, 0); SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN(); VertexShader = compile vs_5_0 VS_MAIN();
GeometryShader = NULL; GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_UVMult(); PixelShader = compile ps_5_0 PS_Spell_Anim();
} }
pass NineSlice pass NineSlice
+77 -46
View File
@@ -13,18 +13,17 @@
HRESULT CBroom::InputAction() HRESULT CBroom::InputAction()
{ {
if ( if (
m_pGameInstance->Key_Down(DIK_SPACE) m_pGameInstance->Key_Pressing(DIK_SPACE)
|| m_pGameInstance->Key_Down(DIK_LCONTROL) || m_pGameInstance->Key_Pressing(DIK_LCONTROL)
|| m_pGameInstance->Key_Down(DIK_E) || m_pGameInstance->Key_Pressing(DIK_E)
|| m_pGameInstance->Key_Down(DIK_R) || m_pGameInstance->Key_Pressing(DIK_R)
|| m_pGameInstance->Key_Down(DIK_Q) || m_pGameInstance->Key_Pressing(DIK_Q)
|| m_pGameInstance->Mouse_Up(DIM_LBUTTON) || m_pGameInstance->Key_Pressing(DIK_LSHIFT)
|| m_pGameInstance->Key_Down(DIK_LSHIFT) || m_pGameInstance->Key_Pressing(DIK_C)
|| m_pGameInstance->Key_Down(DIK_C) || m_pGameInstance->Key_Pressing(DIK_V)
|| m_pGameInstance->Key_Down(DIK_V) || m_pGameInstance->Key_Pressing(DIK_Z)
|| m_pGameInstance->Key_Down(DIK_Z) || m_pGameInstance->Key_Pressing(DIK_G)
|| m_pGameInstance->Key_Down(DIK_G) || m_pGameInstance->Key_Pressing(DIK_B)
|| m_pGameInstance->Key_Down(DIK_B)
) )
{ {
return S_OK; return S_OK;
@@ -62,10 +61,10 @@ HRESULT CBroom::InputSpell()
m_pGameInstance->Key_Down(DIK_1) m_pGameInstance->Key_Down(DIK_1)
|| m_pGameInstance->Key_Down(DIK_2) || m_pGameInstance->Key_Down(DIK_2)
|| m_pGameInstance->Key_Down(DIK_3) || m_pGameInstance->Key_Down(DIK_3)
|| m_pGameInstance->Key_Down(DIK_4) || m_pGameInstance->Key_Down(DIK_4)
) )
{ {
return S_OK; return S_OK;
} }
return E_FAIL; return E_FAIL;
} }
@@ -106,6 +105,13 @@ HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta)
m_pFSM->Change_State(FSMSTATE::MOVE); m_pFSM->Change_State(FSMSTATE::MOVE);
return E_FAIL; return E_FAIL;
} }
if (SUCCEEDED(InputMove()))
{
if (m_pFSM->IsEnable_Previous(FSMSTATE::MOVE))
{
m_pFSM->Change_State(FSMSTATE::MOVE);
}
}
return E_FAIL; return E_FAIL;
} }
@@ -118,59 +124,82 @@ void CBroom::Behavior_IdleExit()
void CBroom::Behavior_MoveEnter() void CBroom::Behavior_MoveEnter()
{ {
pair<_uint, _bool> pairAnimInfo = {}; pair<_uint, _bool> pairAnimInfo = {};
_bool bFoward = m_pGameInstance->Key_Pressing(DIK_W);
_bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
_bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
_bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
m_pFSM->Enable_State(FSMSTATE::MOVE); m_pFSM->Enable_State(FSMSTATE::MOVE);
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) { if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
m_pFSM->Enable_State(FSMSTATE::JOG); m_pFSM->Enable_State(FSMSTATE::JOG);
if (SUCCEEDED(InputMove()))
if (SUCCEEDED(InputMove()) || SUCCEEDED(InputAction()))
{ {
if (bFoward) if (m_pGameInstance->Key_Pressing(DIK_W))
{ {
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
} }
else if (bLeft) else if (m_pGameInstance->Key_Pressing(DIK_A))
{ {
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B]; pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
} }
else if (bRight) else if (m_pGameInstance->Key_Pressing(DIK_D))
{ {
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B]; pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
} }
else if (m_pGameInstance->Key_Pressing(DIK_LCONTROL))
{
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
}
else if (m_pGameInstance->Key_Pressing(DIK_SPACE))
{
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.5f, true);
} }
} }
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
} }
HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta) HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
{ {
pair<_uint, _bool> pairAnimInfo = {}; pair<_uint, _bool> pairAnimInfo = {};
_bool bFoward = m_pGameInstance->Key_Pressing(DIK_W); _uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
_bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
_bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
_bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
if (SUCCEEDED(InputMove())) if (SUCCEEDED(InputMove()) || SUCCEEDED(InputAction()))
{ {
if (bFoward) if (m_pGameInstance->Key_Pressing(DIK_W))
{ {
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B]; pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
m_pTransformCom->Go_Straight(fTimeDelta); m_pTransformCom->Go_Straight(fTimeDelta);
} }
else if (bLeft) else if (m_pGameInstance->Key_Pressing(DIK_A))
{ {
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B]; pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
} }
else if (bRight) else if (m_pGameInstance->Key_Pressing(DIK_D))
{ {
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B]; pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
} }
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); else if (m_pGameInstance->Key_Pressing(DIK_LCONTROL))
{
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
}
else if (m_pGameInstance->Key_Pressing(DIK_SPACE))
{
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.5f, true);
return S_OK; return S_OK;
} }
else
{
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
if (m_pModelCom->IsFinishedAnim() && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
{
m_pFSM->Change_State(FSMSTATE::IDLE);
return E_FAIL;
}
return S_OK;
}
return E_FAIL; return E_FAIL;
} }
@@ -192,21 +221,23 @@ void CBroom::Add_FSM()
Desc.funcPriorityUpdate = nullptr; Desc.funcPriorityUpdate = nullptr;
Desc.funcLateUpdate = nullptr; Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc)); m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
} }
{
CState_Move::STATE_MOVE_DESC Desc{};
Desc.pOwner = this;
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
Desc.funcPriorityUpdate = nullptr;
Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
}
#pragma endregion
{
CState_Move::STATE_MOVE_DESC Desc{};
Desc.pOwner = this;
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
Desc.funcPriorityUpdate = nullptr;
Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
}
#pragma endregion
} }
void CBroom::Set_Anim() void CBroom::Set_Anim()
{ {
m_Animation[STATEANIM::BROOM_MOUNT_B] = { 29,false }; m_Animation[STATEANIM::BROOM_MOUNT_B] = { 29,false };
@@ -226,6 +226,7 @@ call Update_Resources.bat
<ClInclude Include="..\Public\Player.h" /> <ClInclude Include="..\Public\Player.h" />
<ClInclude Include="..\Public\PlayerInfo.h" /> <ClInclude Include="..\Public\PlayerInfo.h" />
<ClInclude Include="..\Public\Slot_Number.h" /> <ClInclude Include="..\Public\Slot_Number.h" />
<ClInclude Include="..\public\Skill_Data.h" />
<ClInclude Include="..\Public\Spell_Overlay.h" /> <ClInclude Include="..\Public\Spell_Overlay.h" />
<ClInclude Include="..\Public\Spell_Slot.h" /> <ClInclude Include="..\Public\Spell_Slot.h" />
<ClInclude Include="..\Public\Spell_UI.h" /> <ClInclude Include="..\Public\Spell_UI.h" />
@@ -316,6 +317,7 @@ call Update_Resources.bat
<ClCompile Include="..\Private\Player.cpp" /> <ClCompile Include="..\Private\Player.cpp" />
<ClCompile Include="..\Private\PlayerInfo.cpp" /> <ClCompile Include="..\Private\PlayerInfo.cpp" />
<ClCompile Include="..\Private\Slot_Number.cpp" /> <ClCompile Include="..\Private\Slot_Number.cpp" />
<ClCompile Include="..\private\Skill_Data.cpp" />
<ClCompile Include="..\Private\Spell_Overlay.cpp" /> <ClCompile Include="..\Private\Spell_Overlay.cpp" />
<ClCompile Include="..\Private\Spell_Slot.cpp" /> <ClCompile Include="..\Private\Spell_Slot.cpp" />
<ClCompile Include="..\Private\Spell_UI.cpp" /> <ClCompile Include="..\Private\Spell_UI.cpp" />
@@ -256,6 +256,9 @@
<ClInclude Include="..\Public\State_Broom_Ride.h"> <ClInclude Include="..\Public\State_Broom_Ride.h">
<Filter>04.Mechanic\State\Broom</Filter> <Filter>04.Mechanic\State\Broom</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\public\Skill_Data.h">
<Filter>04.Mechanic\Skill\Skill_Data</Filter>
</ClInclude>
<ClInclude Include="..\Public\Revelio.h"> <ClInclude Include="..\Public\Revelio.h">
<Filter>02.GameObjects\Effect\Revelio</Filter> <Filter>02.GameObjects\Effect\Revelio</Filter>
</ClInclude> </ClInclude>
@@ -326,9 +329,6 @@
<Filter Include="04.Mechanic\State"> <Filter Include="04.Mechanic\State">
<UniqueIdentifier>{1bfec6dc-f008-4d18-87d6-be38824b1272}</UniqueIdentifier> <UniqueIdentifier>{1bfec6dc-f008-4d18-87d6-be38824b1272}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="04.Mechanic\Skill">
<UniqueIdentifier>{c5b61cb3-bc5f-4429-8715-b309dcf054b2}</UniqueIdentifier>
</Filter>
<Filter Include="01.Levels\10.Field"> <Filter Include="01.Levels\10.Field">
<UniqueIdentifier>{2b209526-b728-4fba-a184-b9224d72903a}</UniqueIdentifier> <UniqueIdentifier>{2b209526-b728-4fba-a184-b9224d72903a}</UniqueIdentifier>
</Filter> </Filter>
@@ -566,6 +566,12 @@
<Filter Include="02.GameObjects\Effect\Revelio"> <Filter Include="02.GameObjects\Effect\Revelio">
<UniqueIdentifier>{19a2325e-1184-4ee0-92e1-657bf184418c}</UniqueIdentifier> <UniqueIdentifier>{19a2325e-1184-4ee0-92e1-657bf184418c}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="04.Mechanic\Skill">
<UniqueIdentifier>{c5b61cb3-bc5f-4429-8715-b309dcf054b2}</UniqueIdentifier>
</Filter>
<Filter Include="04.Mechanic\Skill\Skill_Data">
<UniqueIdentifier>{2bc5b43e-0e24-49d4-95b0-549ad4428201}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="Client.cpp"> <ClCompile Include="Client.cpp">
@@ -817,6 +823,9 @@
<ClCompile Include="..\Private\Revelio.cpp"> <ClCompile Include="..\Private\Revelio.cpp">
<Filter>02.GameObjects\Effect\Revelio</Filter> <Filter>02.GameObjects\Effect\Revelio</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\private\Skill_Data.cpp">
<Filter>04.Mechanic\Skill\Skill_Data</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="Client.rc"> <ResourceCompile Include="Client.rc">
+4
View File
@@ -42,11 +42,15 @@ HRESULT CBroom::Initialize(void* pArg)
m_pFSM->Change_State(FSMSTATE::IDLE); m_pFSM->Change_State(FSMSTATE::IDLE);
} }
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, 10.f, 0.f, 1.f));
return S_OK; return S_OK;
} }
void CBroom::Priority_Update(_float fTimeDelta) void CBroom::Priority_Update(_float fTimeDelta)
{ {
} }
void CBroom::Update(_float fTimeDelta) void CBroom::Update(_float fTimeDelta)
@@ -124,7 +124,7 @@ HRESULT CEffectPool::Ready_Effect()
))) return E_FAIL; ))) return E_FAIL;
if (FAILED(Create_Effect(SKILL_TYPE::BOMBARD, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
CBombard* pEffect = nullptr; CBombard* pEffect = nullptr;
@@ -134,7 +134,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag) HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag)
{ {
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGamePlay_Canvas>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_UI))) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGamePlay_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) {
return E_FAIL; return E_FAIL;
} }
@@ -117,7 +117,7 @@ HRESULT CMagic_Icon::Render()
_vector CMagic_Icon::Get_WorldPostion() _vector CMagic_Icon::Get_WorldPostion()
{ {
return m_pOwner->Get_WorldPostion(); return m_pTransformCom->Get_State(STATE::POSITION);
} }
HRESULT CMagic_Icon::Bind_ShaderResources() HRESULT CMagic_Icon::Bind_ShaderResources()
@@ -433,14 +433,12 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
xmvInputDir = XMVector3Normalize(xmvInputDir); xmvInputDir = XMVector3Normalize(xmvInputDir);
_float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) }; _float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
GUI::Text("%.1f, %.1f", vInputDir.x, vInputDir.y);
_vector xmvCurLook = XMVector4Normalize( _vector xmvCurLook = XMVector4Normalize(
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) }; _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
_float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir); _float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir);
_float absDir = fabsf(vDir); _float absDir = fabsf(vDir);
_float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x; _float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x;
_bool bSkipAngleCheck = { false }; _bool bSkipAngleCheck = { false };
@@ -455,7 +453,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
} }
if (!bSkipAngleCheck) { if (!bSkipAngleCheck) {
_float absDir = fabsf(vDir); _float absDir = fabsf(vDir);
if (absDir <= XMConvertToRadians(90.f)) { if (absDir < XMConvertToRadians(80.f)) {
if (m_pFSM->IsEnable(FSMSTATE::JOG)) if (m_pFSM->IsEnable(FSMSTATE::JOG))
{ {
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
@@ -887,7 +885,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
{ {
pairAnimInfo = m_Animation[STATEANIM::ACCIO]; pairAnimInfo = m_Animation[STATEANIM::ACCIO];
Add_Event(pairAnimInfo.first, Add_Event(pairAnimInfo.first,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARD, this);m_eSpell = STATEANIM::END; }, [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this);m_eSpell = STATEANIM::END; },
0.25f); 0.25f);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
} }
@@ -981,11 +979,10 @@ void CPlayer::Behavior_Broom_RideEnter()
HRESULT CPlayer::Behavior_Broom_RideExitCheck() HRESULT CPlayer::Behavior_Broom_RideExitCheck()
{ {
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex(); _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
pair<_uint, _bool> pairAnimInfo;
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT].first) if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT].first)
{ {
if (m_pModelCom->IsFinishedAnim()) { if (m_pModelCom->IsFinishedAnim()) {
pair<_uint, _bool> pairAnimInfo;
pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_END]; pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_END];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true); m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true);
} }
@@ -996,19 +993,35 @@ HRESULT CPlayer::Behavior_Broom_RideExitCheck()
return E_FAIL; return E_FAIL;
}*/ }*/
if (SUCCEEDED(InputMove()))
if (m_pGameInstance->Key_Pressing(DIK_W))
{ {
pair<_uint, _bool> pairAnimInfo; pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_FWD);
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE); }
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); else if (m_pGameInstance->Key_Pressing(DIK_A))
{
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_LEFT);
}
else if (m_pGameInstance->Key_Pressing(DIK_D))
{
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_RIGHT);
}
else if (m_pGameInstance->Key_Pressing(DIK_LCONTROL))
{
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DOWN);
}
else if (m_pGameInstance->Key_Pressing(DIK_SPACE))
{
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_UP);
} }
else else
{ {
pair<_uint, _bool> pairAnimInfo;
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE); pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
} }
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
if (m_pGameInstance->Key_Down(DIK_N)) { if (m_pGameInstance->Key_Down(DIK_N)) {
m_pFSM->Change_State(FSMSTATE::IDLE); m_pFSM->Change_State(FSMSTATE::IDLE);
return E_FAIL; return E_FAIL;
@@ -1045,6 +1058,8 @@ void CPlayer::Player_InterpTurn(_float fTimeDelta)
_float degree = XMConvertToDegrees(angle); _float degree = XMConvertToDegrees(angle);
GUI::Text("Degree: %.3f", degree);
_vector xmvInput = XMVectorZero(); _vector xmvInput = XMVectorZero();
if (m_pGameInstance->Key_Pressing(DIK_W)) if (m_pGameInstance->Key_Pressing(DIK_W))
@@ -1180,33 +1195,50 @@ void CPlayer::Add_FSM()
#pragma region Behavior_Broom_Ride #pragma region Behavior_Broom_Ride
{ {
CState_Broom_Ride::STATE_BROOM_RIDE_DESC Desc{}; CState_Broom_Ride::STATE_BROOM_RIDE_DESC Desc{};
Desc.pOwner = this; Desc.pOwner = this;
Desc.funcEnterEvent = [this]() { Behavior_Broom_RideEnter(); }; Desc.funcEnterEvent = [this]() { Behavior_Broom_RideEnter(); };
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_RideExitCheck(); }; Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_RideExitCheck(); };
Desc.funcExitEvent = [this]() { Behavior_Broom_RideExit(); }; Desc.funcExitEvent = [this]() { Behavior_Broom_RideExit(); };
Desc.funcPriorityUpdate = [this](_float fTimeDelta) { Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
if (m_pGameInstance->Key_Pressing(DIK_W)) if (m_pGameInstance->Key_Pressing(DIK_W))
{ {
_float3 fMove = m_pGameInstance->Get_MouseMove(); _float3 fMove = m_pGameInstance->Get_MouseMove();
m_pBroomTransform->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.03f); m_pBroomTransform->Turn(m_pBroomTransform->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.03f);
} }
_matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr()); _matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
_matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket")); _matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
XMVECTOR Scale, Rot, Trans; _vector Scale, Rot, Trans;
XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal); XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal);
_matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans); _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
static _float3 OffsetPos = { 0.f, 0.f, 0.f };
GUI::DragFloat3("BroomOffset", (_float*)&OffsetPos, 0.01f); if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_FWD].first)
_matrix Offset = XMMatrixTranslation(OffsetPos.x, {
OffsetPos.y, OffsetPos.z); m_OffsetPos = { 0.f, 1.05f, 0.f };
}
else
{
m_OffsetPos = { 0.f, 1.18f, 0.f };
}
GUI::DragFloat3("BroomOffset", (_float*)&m_OffsetPos, 0.01f);
_matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
m_OffsetPos.y, m_OffsetPos.z);
_matrix SocketWorld = BoneNoScale * Offset* BroomWorld; _matrix SocketWorld = BoneNoScale * Offset* BroomWorld;
m_pTransformCom->Set_WorldMatrix(SocketWorld); _matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f));
m_pCharacter_Controller->Set_Position(SocketWorld.r[3]);
_matrix FinalWorld = FixRot * SocketWorld;
m_pTransformCom->Set_WorldMatrix(FinalWorld);
m_pCharacter_Controller->Set_Position(FinalWorld.r[3]);
}; };
Desc.funcLateUpdate = nullptr; Desc.funcLateUpdate = nullptr;
m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc)); m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc));
@@ -1272,8 +1304,12 @@ void CPlayer::Set_Anim()
m_Animation[STATEANIM::HIT_L] = { 1124,false }; m_Animation[STATEANIM::HIT_L] = { 1124,false };
m_Animation[STATEANIM::HIT_R] = { 1125,false }; m_Animation[STATEANIM::HIT_R] = { 1125,false };
m_Animation[STATEANIM::BROOM_IDLE] = { 679,true }; m_Animation[STATEANIM::BROOM_IDLE] = { 710,true };
m_Animation[STATEANIM::BROOM_FWD] = { 680,true }; m_Animation[STATEANIM::BROOM_FWD] = { 711,true };
m_Animation[STATEANIM::BROOM_LEFT] = { 713,true };
m_Animation[STATEANIM::BROOM_RIGHT] = { 714,true };
m_Animation[STATEANIM::BROOM_DOWN] = { 712,true };
m_Animation[STATEANIM::BROOM_UP] = { 715,true };
m_Animation[STATEANIM::BROOM_MOUNT] = { 734,false }; m_Animation[STATEANIM::BROOM_MOUNT] = { 734,false };
m_Animation[STATEANIM::BROOM_MOUNT_END] = { 737,false }; m_Animation[STATEANIM::BROOM_MOUNT_END] = { 737,false };
@@ -1286,6 +1322,11 @@ void CPlayer::Set_Anim()
m_Animation[STATEANIM::JOG_AIM_STOP_BWD] = { 444,false }; m_Animation[STATEANIM::JOG_AIM_STOP_BWD] = { 444,false };
//루모스 스탑 912 //루모스 스탑 912
//713 왼쪽 슬로우
//714 오른쪽
//712 아래
//715 위
} }
@@ -0,0 +1 @@
#include "pch.h"
+1 -1
View File
@@ -184,7 +184,7 @@ HRESULT CSpell_UI::Render()
_vector CSpell_UI::Get_WorldPostion() _vector CSpell_UI::Get_WorldPostion()
{ {
return m_pOwner->Get_WorldPostion(); return m_pTransformCom->Get_State(STATE::POSITION);
} }
HRESULT CSpell_UI::Bind_ShaderResources() HRESULT CSpell_UI::Bind_ShaderResources()
+8 -1
View File
@@ -18,7 +18,14 @@ namespace Client
enum class EFFECT_TYPE { EFFECT, TRAIL, END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END };
enum class SKILL_TYPE { JAP, BOMBARD, DESCENDO, PROTEGO, REVELIO ,END }; enum class SKILL_TYPE {
ARESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, ASSIO,
DEPULSO, DESCENDO, FLIPENDO, CONFRINGO, DIFFINDO, EXPELLIARMUS,
BOMBARDA, INCENDIO, DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA,
CONJURING_SPELL, ALTERING_SPELL, EVANESCO, AVADA_KEDAVRA, CRUCIO, IMPERIO,
BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, JAP, REVELIO, PROTEGO, STUPEFY,
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, END
};
enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END }; enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END };
} }
@@ -19,11 +19,12 @@ namespace Client
typedef struct tagSpellInfo typedef struct tagSpellInfo
{ {
_uint iSpell_ID{}; _uint iSpell_ID{};
_wstring pSpell_Name{}; _wstring pSpell_Name;
_uint iSpell_Type{}; _uint iSpell_Type{};
_uint iSpell_CoolTime{}; _uint iSpell_CoolTime{};
_uint iAnimNum{};
_wstring pSpellInfo;
_bool bSpell_Lock = false; _bool bSpell_Lock = false;
_bool bEquip_Spell = false; _bool bEquip_Spell = false;
}SPELLINFO; }SPELLINFO;
}; };
+1
View File
@@ -96,6 +96,7 @@ class CPlayer final : public CUnit
vector<PendingEvent> m_PendingEvents; vector<PendingEvent> m_PendingEvents;
_float3 m_OffsetPos = {};
_float m_fAmount = { 1.f }; _float m_fAmount = { 1.f };
_float m_fInputTime = {}; _float m_fInputTime = {};
_bool m_bRatio = { false }; _bool m_bRatio = { false };
@@ -0,0 +1,5 @@
#pragma once
class CSkill_Data
{
};
@@ -340,15 +340,27 @@ PS_OUT PS_QuestType(PS_IN In)
return Out; return Out;
} }
PS_OUT PS_UVMult(PS_IN In) PS_OUT PS_Spell_Anim(PS_IN In)
{ {
PS_OUT Out; PS_OUT Out;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = g_Texture.Sample(DefaultSampler, In.vTexcoord); float4 Color = float4(1.f,1.f,1.f,1.f);
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
color.a *= Alpha; Color = tex1;
Out.vColor = color;
float2 texpos = g_fImageSipos1.xy / g_fCurrent_Size;
float2 texsize = g_fImageSipos1.zw / g_fCurrent_Size;
float2 texlocal = (In.vTexcoord - texpos) / texsize;
bool inside = all(texlocal >= 0.0f && texlocal <= 1.0f);
float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
if (inside)
Color = lerp(Color, tex2, tex2.a);
Color.a *= Alpha;
Out.vColor = Color;
return Out; return Out;
} }
@@ -1229,14 +1241,14 @@ technique11 PosTexTechnique11
PixelShader = compile ps_5_0 PS_QuestType(); PixelShader = compile ps_5_0 PS_QuestType();
} }
pass UVMult pass Spell_Anim
{ {
SetRasterizerState(RS_Default); SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_Default, 0); SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN(); VertexShader = compile vs_5_0 VS_MAIN();
GeometryShader = NULL; GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_UVMult(); PixelShader = compile ps_5_0 PS_Spell_Anim();
} }
pass NineSlice pass NineSlice
@@ -257,7 +257,9 @@
<ClInclude Include="..\Public\Revelio.h" /> <ClInclude Include="..\Public\Revelio.h" />
<ClInclude Include="..\Public\Protego.h" /> <ClInclude Include="..\Public\Protego.h" />
<ClInclude Include="..\public\Slot_Number.h" /> <ClInclude Include="..\public\Slot_Number.h" />
<ClInclude Include="..\public\Spell_Anim.h" />
<ClInclude Include="..\public\Spell_Canvas.h" /> <ClInclude Include="..\public\Spell_Canvas.h" />
<ClInclude Include="..\public\Spell_Data.h" />
<ClInclude Include="..\public\Spell_Header.h" /> <ClInclude Include="..\public\Spell_Header.h" />
<ClInclude Include="..\public\Spell_Header_Line.h" /> <ClInclude Include="..\public\Spell_Header_Line.h" />
<ClInclude Include="..\public\Spell_Hover.h" /> <ClInclude Include="..\public\Spell_Hover.h" />
@@ -413,7 +415,9 @@
<ClCompile Include="..\Private\Revelio.cpp" /> <ClCompile Include="..\Private\Revelio.cpp" />
<ClCompile Include="..\Private\Protego.cpp" /> <ClCompile Include="..\Private\Protego.cpp" />
<ClCompile Include="..\private\Slot_Number.cpp" /> <ClCompile Include="..\private\Slot_Number.cpp" />
<ClCompile Include="..\private\Spell_Anim.cpp" />
<ClCompile Include="..\private\Spell_Canvas.cpp" /> <ClCompile Include="..\private\Spell_Canvas.cpp" />
<ClCompile Include="..\private\Spell_Data.cpp" />
<ClCompile Include="..\Private\Spell_Header.cpp" /> <ClCompile Include="..\Private\Spell_Header.cpp" />
<ClCompile Include="..\private\Spell_Header_Line.cpp" /> <ClCompile Include="..\private\Spell_Header_Line.cpp" />
<ClCompile Include="..\private\Spell_Hover.cpp" /> <ClCompile Include="..\private\Spell_Hover.cpp" />
@@ -369,7 +369,7 @@
</Filter> </Filter>
<Filter Include="02.GameObjects\Layer_Effect\Effect\10.Levioso"> <Filter Include="02.GameObjects\Layer_Effect\Effect\10.Levioso">
<UniqueIdentifier>{c87ea325-8242-4bc4-aec7-b102a5b1c847}</UniqueIdentifier> <UniqueIdentifier>{c87ea325-8242-4bc4-aec7-b102a5b1c847}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="50.UI\Spell_Canvas\Spell_Panel\Spell_List"> <Filter Include="50.UI\Spell_Canvas\Spell_Panel\Spell_List">
<UniqueIdentifier>{8d15e456-f0d7-45b6-b725-7f1a8c0f6b0f}</UniqueIdentifier> <UniqueIdentifier>{8d15e456-f0d7-45b6-b725-7f1a8c0f6b0f}</UniqueIdentifier>
</Filter> </Filter>
@@ -436,6 +436,12 @@
<Filter Include="02.GameObjects\Env\03.MapElement\Light"> <Filter Include="02.GameObjects\Env\03.MapElement\Light">
<UniqueIdentifier>{99652c97-4011-4d1f-84fb-7e6aa9f6ec1a}</UniqueIdentifier> <UniqueIdentifier>{99652c97-4011-4d1f-84fb-7e6aa9f6ec1a}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="50.UI\Spell_Canvas\Spell_Panel\Spell_Anim">
<UniqueIdentifier>{4aa98871-8d80-4757-b616-e96f4e840857}</UniqueIdentifier>
</Filter>
<Filter Include="50.UI\Spell_Data">
<UniqueIdentifier>{3949bd3b-1686-43e3-822c-d3eabe41653e}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Editor.h"> <ClInclude Include="Editor.h">
@@ -812,7 +818,7 @@
</ClInclude> </ClInclude>
<ClInclude Include="..\Public\Levioso.h"> <ClInclude Include="..\Public\Levioso.h">
<Filter>02.GameObjects\Layer_Effect\Effect\10.Levioso</Filter> <Filter>02.GameObjects\Layer_Effect\Effect\10.Levioso</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\public\Spell_List.h"> <ClInclude Include="..\public\Spell_List.h">
<Filter>50.UI\Spell_Canvas\Spell_Panel\Spell_List</Filter> <Filter>50.UI\Spell_Canvas\Spell_Panel\Spell_List</Filter>
</ClInclude> </ClInclude>
@@ -852,6 +858,12 @@
<ClInclude Include="..\public\MapElement_Light.h"> <ClInclude Include="..\public\MapElement_Light.h">
<Filter>02.GameObjects\Env\03.MapElement\Light</Filter> <Filter>02.GameObjects\Env\03.MapElement\Light</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\public\Spell_Anim.h">
<Filter>50.UI\Spell_Canvas\Spell_Panel\Spell_Anim</Filter>
</ClInclude>
<ClInclude Include="..\public\Spell_Data.h">
<Filter>50.UI\Spell_Data</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Image Include="Editor.ico"> <Image Include="Editor.ico">
@@ -1227,7 +1239,7 @@
</ClCompile> </ClCompile>
<ClCompile Include="..\Private\Levioso.cpp"> <ClCompile Include="..\Private\Levioso.cpp">
<Filter>02.GameObjects\Layer_Effect\Effect\10.Levioso</Filter> <Filter>02.GameObjects\Layer_Effect\Effect\10.Levioso</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\private\Spell_List.cpp"> <ClCompile Include="..\private\Spell_List.cpp">
<Filter>50.UI\Spell_Canvas\Spell_Panel\Spell_List</Filter> <Filter>50.UI\Spell_Canvas\Spell_Panel\Spell_List</Filter>
</ClCompile> </ClCompile>
@@ -1267,6 +1279,12 @@
<ClCompile Include="..\private\MapElement_Light.cpp"> <ClCompile Include="..\private\MapElement_Light.cpp">
<Filter>02.GameObjects\Env\03.MapElement\Light</Filter> <Filter>02.GameObjects\Env\03.MapElement\Light</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\private\Spell_Anim.cpp">
<Filter>50.UI\Spell_Canvas\Spell_Panel\Spell_Anim</Filter>
</ClCompile>
<ClCompile Include="..\private\Spell_Data.cpp">
<Filter>50.UI\Spell_Data</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="Editor.rc"> <ResourceCompile Include="Editor.rc">
@@ -3,18 +3,18 @@
#include "GameInstance.h" #include "GameInstance.h"
CEessential_Spell_Slot::CEessential_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) CEessential_Spell_Slot::CEessential_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext) :CElementObject(pDevice, pContext)
{ {
} }
CEessential_Spell_Slot::CEessential_Spell_Slot(const CEessential_Spell_Slot& rhs) CEessential_Spell_Slot::CEessential_Spell_Slot(const CEessential_Spell_Slot& rhs)
:CElementObject(rhs) :CElementObject(rhs)
{ {
} }
HRESULT CEessential_Spell_Slot::Initialize_Prototype() HRESULT CEessential_Spell_Slot::Initialize_Prototype()
{ {
return S_OK; return S_OK;
} }
HRESULT CEessential_Spell_Slot::Initialize(void* pArg) HRESULT CEessential_Spell_Slot::Initialize(void* pArg)
@@ -44,7 +44,7 @@ HRESULT CEessential_Spell_Slot::Initialize(void* pArg)
m_fOffSetY = 80.f; m_fOffSetY = 80.f;
m_iCols = 4; m_iCols = 4;
m_pVIBufferCom->Set_Cloned(true); m_pVIBufferCom->Set_Cloned(true);
m_pVIBufferCom->Set_Pos( -731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols);
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
return S_OK; return S_OK;
} }
@@ -88,8 +88,10 @@ void CEessential_Spell_Slot::Update(_float fTimeDelta)
m_fAlpha = 0.f; m_fAlpha = 0.f;
} }
} }
m_fTime += fTimeDelta * m_fTimeMult;
Hover(); Hover();
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta); __super::Update(fTimeDelta);
} }
@@ -165,7 +167,25 @@ void CEessential_Spell_Slot::Hover()
fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0]; fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0];
fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1];
m_pVIBufferCom->Set_Mouse_Hover(fMouse); m_bPrevHover = m_bHover;
m_bHover = (m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse));
if (m_iSpellType != -1)
{
m_bHover = true;
if (m_bHover == true && m_bPrevHover == false)
{
m_iSpellType += ENUM_CLASS(SKILL_TYPE::JAP);
static_cast<CUIObject*>(m_pOwner)->Set_SkillType(m_iSpellType);
}
}
else
{
m_bHover = false;
if (m_bHover == false && m_bPrevHover == true)
{
static_cast<CUIObject*>(m_pOwner)->Set_SkillType(m_iSpellType);
}
}
} }
@@ -126,7 +126,7 @@ HRESULT CEffectPool::Ready_Effect()
))) return E_FAIL; ))) return E_FAIL;
if (FAILED(Create_Effect(SKILL_TYPE::BOMBARD, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
CBombard* pEffect = nullptr; CBombard* pEffect = nullptr;
@@ -135,7 +135,7 @@ HRESULT CEffectPool::Ready_Effect()
return pEffect;} return pEffect;}
))) return E_FAIL; ))) return E_FAIL;
if (FAILED(Create_Effect(SKILL_TYPE::DECENDO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
CDecendo* pEffect = nullptr; CDecendo* pEffect = nullptr;
@@ -757,8 +757,8 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_UI(const _wstring& strLayerTag)
HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag) HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag)
{ {
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, nullptr, nullptr, &m_Test))) /*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, nullptr, nullptr, &m_Test)))
return E_FAIL; return E_FAIL;*/
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummySkyBox>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE))) if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummySkyBox>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE)))
return E_FAIL; return E_FAIL;
File diff suppressed because it is too large Load Diff
@@ -549,7 +549,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
case STATEANIM::ACCIO: case STATEANIM::ACCIO:
pairAnimInfo = m_Animation[STATEANIM::ACCIO]; pairAnimInfo = m_Animation[STATEANIM::ACCIO];
m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARD, this); m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this);
break; break;
@@ -557,7 +557,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
{ {
pairAnimInfo = m_Animation[STATEANIM::DESCENDO]; pairAnimInfo = m_Animation[STATEANIM::DESCENDO];
m_pEffectPool->Use_Skill(SKILL_TYPE::DECENDO, this); m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, this);
} }
break; break;
default: default:
@@ -0,0 +1,241 @@
#include "pch.h"
#include "Spell_Anim.h"
#include "GameInstance.h"
CSpell_Anim::CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
{
}
CSpell_Anim::CSpell_Anim(const CSpell_Anim& rhs)
:CElementObject(rhs)
{
}
HRESULT CSpell_Anim::Initialize_Prototype()
{
return S_OK;
}
HRESULT CSpell_Anim::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = 0.f;
Desc.fY = 0.f;
Desc.fSizeX = 470.f;
Desc.fSizeY = 250.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 = 3.f;
m_fSortZ = 0.01f;
m_iTotalFrames = 216;
m_fFrameTime = 0.1f;
m_iCurrentFrame = 0;
m_bAnim_Start = false;
return S_OK;
}
void CSpell_Anim::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
}
void CSpell_Anim::Update(_float fTimeDelta)
{
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_pGameInstance->Key_Down(DIK_9))
{
m_bAnim_Start = !m_bAnim_Start;
}
if (m_bAnim_Start)
{
m_fTime += fTimeDelta * m_fTimeMult;
}
else
m_iCurrentFrame = 0;
if (m_fTime >= m_fFrameTime)
{
m_iCurrentFrame++;
m_fTime -= m_fFrameTime;
if (m_iCurrentFrame >= m_iTotalFrames)
m_iCurrentFrame = 0;
}
__super::Update(fTimeDelta);
}
void CSpell_Anim::Late_Update(_float fTimeDelta)
{
if (m_bVisible) {
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
}
__super::Late_Update(fTimeDelta);
}
HRESULT CSpell_Anim::Render()
{
if (FAILED(Bind_ShaderResources()))
{
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND))))
{
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Bind_Resources()))
{
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Render()))
{
return E_FAIL;
}
return S_OK;
}
_vector CSpell_Anim::Get_WorldPostion()
{
return m_pTransformCom->Get_State(STATE::POSITION);
}
void CSpell_Anim::Anim_Start(_uint iSpell_Id)
{
}
void CSpell_Anim::Anim_End()
{
}
HRESULT CSpell_Anim::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", m_iCurrentFrame)))
{
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
{
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
{
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
{
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
{
return E_FAIL;
}
return S_OK;
}
HRESULT CSpell_Anim::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("Crucio"), 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;
}
CSpell_Anim* CSpell_Anim::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CSpell_Anim* pInstance = new CSpell_Anim(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CSpell_Anim");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CSpell_Anim::Clone(void* pArg, CGameObject* pOwner)
{
CSpell_Anim* pInstance = new CSpell_Anim(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CSpell_Anim");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CSpell_Anim::Free()
{
__super::Free();
SAFE_RELEASE(m_pDiffuse_TextureCom);
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pVIBufferCom);
}
void CSpell_Anim::Describe_Entity()
{
}
@@ -39,7 +39,6 @@ HRESULT CSpell_Canvas::Initialize(void* pArg)
{ {
return E_FAIL; return E_FAIL;
} }
return S_OK; return S_OK;
} }
@@ -132,9 +131,7 @@ void CSpell_Canvas::Free()
SAFE_RELEASE(m_pVIBufferCom); SAFE_RELEASE(m_pVIBufferCom);
} }
#ifdef _DEBUG
void CSpell_Canvas::Describe_Entity() void CSpell_Canvas::Describe_Entity()
{ {
} }
#endif // _DEBUG
@@ -0,0 +1,91 @@
#include "pch.h"
#include "Spell_Data.h"
#include "GameObject.h"
CSpell_Data::CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CGameObject(pDevice, pContext)
{
}
CSpell_Data::CSpell_Data(const CSpell_Data& rhs)
:CGameObject(rhs)
{
}
HRESULT CSpell_Data::Initialize_Prototype()
{
return S_OK;
}
HRESULT CSpell_Data::Initialize(void* pArg)
{
return S_OK;
}
void CSpell_Data::Priority_Update(_float fTimeDelta)
{
}
void CSpell_Data::Update(_float fTimeDelta)
{
}
void CSpell_Data::Late_Update(_float fTimeDelta)
{
}
HRESULT CSpell_Data::Render()
{
return S_OK;
}
_vector CSpell_Data::Get_WorldPostion()
{
return _vector();
}
HRESULT CSpell_Data::Bind_ShaderResources()
{
return S_OK;
}
HRESULT CSpell_Data::Ready_Components(void* pArg)
{
return S_OK;
}
CSpell_Data* CSpell_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CSpell_Data* pInstance = new CSpell_Data(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CSpell_Data");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CSpell_Data::Clone(void* pArg, CGameObject* pOwner)
{
CSpell_Data* pInstance = new CSpell_Data(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CSpell_Data");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CSpell_Data::Free()
{
__super::Free();
}
void CSpell_Data::Describe_Entity()
{
}
+21 -4
View File
@@ -3,18 +3,18 @@
#include "GameInstance.h" #include "GameInstance.h"
CSpell_List::CSpell_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) CSpell_List::CSpell_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext) :CElementObject(pDevice, pContext)
{ {
} }
CSpell_List::CSpell_List(const CSpell_List& rhs) CSpell_List::CSpell_List(const CSpell_List& rhs)
:CElementObject(rhs) :CElementObject(rhs)
{ {
} }
HRESULT CSpell_List::Initialize_Prototype() HRESULT CSpell_List::Initialize_Prototype()
{ {
return S_OK; return S_OK;
} }
HRESULT CSpell_List::Initialize(void* pArg) HRESULT CSpell_List::Initialize(void* pArg)
@@ -178,7 +178,24 @@ void CSpell_List::Hover()
fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0]; fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0];
fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1]; fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1];
m_pVIBufferCom->Set_Mouse_Hover(fMouse); m_bPrevHover = m_bHover;
m_bHover = (m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse));
if (m_iSpellType != -1)
{
m_bHover = true;
if (m_bHover == true && m_bPrevHover == false)
{
static_cast<CUIObject*>(m_pOwner)->Set_SkillType(m_iSpellType);
}
}
else
{
m_bHover = false;
if (m_bHover == false && m_bPrevHover == true)
{
static_cast<CUIObject*>(m_pOwner)->Set_SkillType(m_iSpellType);
}
}
} }
@@ -49,6 +49,7 @@ HRESULT CSpell_Panel::Initialize(void* pArg)
return E_FAIL; return E_FAIL;
} }
m_fCanvasAlpha = 1.f; m_fCanvasAlpha = 1.f;
m_fSortZ = 0.04f;
return S_OK; return S_OK;
} }
@@ -47,6 +47,7 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
SizeUpX(512.f); SizeUpX(512.f);
SizeUpY(270.f); SizeUpY(270.f);
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL); m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
m_fSortZ = 0.02f;
return S_OK; return S_OK;
} }
@@ -1,6 +1,7 @@
#include "pch.h" #include "pch.h"
#include "Spell_Vidio_Border.h" #include "Spell_Vidio_Border.h"
#include "GameInstance.h" #include "GameInstance.h"
#include "Spell_Anim.h"
CSpell_Vidio_Border::CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) CSpell_Vidio_Border::CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext) :CElementObject(pDevice, pContext)
@@ -87,6 +88,7 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta)
} }
m_fTime += fTimeDelta * m_fTimeMult; m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta); __super::Update(fTimeDelta);
} }
@@ -185,7 +187,10 @@ HRESULT CSpell_Vidio_Border::Ready_Components(void* pArg)
{ {
return E_FAIL; return E_FAIL;
} }
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Anim>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Anim**>(&m_pSpell_Anim))))
{
return E_FAIL;
}
return S_OK; return S_OK;
} }
+11 -2
View File
@@ -28,13 +28,22 @@ namespace Editor
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR , TRAIL_BLOOM, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR , TRAIL_BLOOM, END };
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, END };
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, END }; enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, SPELL_ANIM, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, END };
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, END }; enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, END };
enum class EFFECT_TYPE { EFFECT, TRAIL, END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END };
enum class SKILL_TYPE{ JAP , BOMBARD , DECENDO , PROTEGO , REVELIO , LEVIOSO ,END }; enum class SKILL_TYPE{ ARESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색
ASSIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색
CONFRINGO, DIFFINDO, EXPELLIARMUS, BOMBARDA, INCENDIO, // 빨간색
DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA, // 하늘색
CONJURING_SPELL, ALTERING_SPELL, EVANESCO, // 연녹색
AVADA_KEDAVRA, CRUCIO, IMPERIO, // 진녹색
BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색
JAP , REVELIO, PROTEGO, STUPEFY, // 검은색
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, END };
enum class BLOOM_TYPE { NONE , BASIC , MULTIPLY , END}; enum class BLOOM_TYPE { NONE , BASIC , MULTIPLY , END};
} }
@@ -43,6 +43,8 @@ class CEessential_Spell_Slot final : public CElementObject
_float m_fOffSetY{}; _float m_fOffSetY{};
_uint m_iCols{}; _uint m_iCols{};
_bool m_bHover = { false };
_bool m_bPrevHover = { false };
public: public:
static CEessential_Spell_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); static CEessential_Spell_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -0,0 +1,51 @@
#pragma once
#include "Editor_Define.h"
#include "ElementObject.h"
NS_BEGIN(Editor)
class CSpell_Anim final : public CElementObject
{
private:
CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CSpell_Anim(const CSpell_Anim& rhs);
virtual ~CSpell_Anim() = 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;
public:
void Anim_Start(_uint iSpell_Id);
void Anim_End();
private:
virtual HRESULT Bind_ShaderResources() override;
virtual HRESULT Ready_Components(void* pArg) override;
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CTexture* m_pDesendo_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
_int m_iTotalFrames{}; // 전체 프레임 수
_float m_fFrameTime{}; // 한 프레임당 시간(초)
_int m_iCurrentFrame{}; // 현재 보여줄 프레임
_uint m_iSpell_Index{};
_bool m_bAnim_Start = { false };
public:
static CSpell_Anim* 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,41 @@
#pragma once
#include "Editor_Define.h"
#include "GameObject.h"
NS_BEGIN(Engine)
class CGameObject;
NS_END
NS_BEGIN(Editor)
class CSpell_Data final : public CGameObject
{
CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CSpell_Data(const CSpell_Data& rhs);
virtual ~CSpell_Data() = default;
public:
virtual void Priority_Update(_float fTimeDelta);
virtual void Update(_float fTimeDelta);
virtual void Late_Update(_float fTimeDelta);
virtual HRESULT Render() override;
virtual _vector Get_WorldPostion() override;
private:
virtual HRESULT Bind_ShaderResources() override;
virtual HRESULT Ready_Components(void* pArg) override;
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
private:
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
CGameObject* m_pSpell_Panel = { nullptr };
public:
static CSpell_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
};
NS_END
@@ -47,6 +47,9 @@ class CSpell_List final : public CElementObject
_float m_fOffSetY{}; _float m_fOffSetY{};
_uint m_iCols{}; _uint m_iCols{};
_bool m_bHover = { false };
_bool m_bPrevHover = { false };
public: public:
static CSpell_List* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); static CSpell_List* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -23,6 +23,11 @@ class CSpell_Panel final : public CPanelObject
virtual HRESULT Render() override; virtual HRESULT Render() override;
virtual _vector Get_WorldPostion() override; virtual _vector Get_WorldPostion() override;
public:
void SlotHoverOn();
void SlotHoverOff();
void SlotHover();
private: private:
virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Bind_ShaderResources() override;
virtual HRESULT Ready_Components(void* pArg) override; virtual HRESULT Ready_Components(void* pArg) override;
@@ -46,6 +51,8 @@ class CSpell_Panel final : public CPanelObject
CGameObject* m_pSpell_Preview = { nullptr }; CGameObject* m_pSpell_Preview = { nullptr };
CGameObject* m_pSpell_Vidio_Border = { nullptr }; CGameObject* m_pSpell_Vidio_Border = { nullptr };
_uint m_iSlotHover_Index{};
public: public:
static CSpell_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); static CSpell_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -27,9 +27,12 @@ class CSpell_Vidio_Border final : public CElementObject
private: private:
CTexture* m_pDiffuse_TextureCom = { nullptr }; CTexture* m_pDiffuse_TextureCom = { nullptr };
CTexture* m_pDesendo_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr }; CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
CGameObject* m_pSpell_Anim = { nullptr };
public: public:
static CSpell_Vidio_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); static CSpell_Vidio_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+1 -3
View File
@@ -215,9 +215,8 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform)
CAnimation* pSecondAnim = m_Animations[m_iCurrSecondAnimIndex]; CAnimation* pSecondAnim = m_Animations[m_iCurrSecondAnimIndex];
m_bIsFinishedAnim = pCurAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, true, m_iBoneMask, m_vector); m_bIsFinishedAnim = pCurAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, true, m_iBoneMask, m_vector);
pCurAnim->InterpAnim(pPreAnim, m_Bones, m_fRatio);
m_bIsSecondFinishedAnim = pSecondAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsSecondLoop, fTimeDelta, false, m_iBoneMask); m_bIsSecondFinishedAnim = pSecondAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsSecondLoop, fTimeDelta, false, m_iBoneMask);
//pCurAnim->InterpAnim(pPreAnim, m_Bones, m_fRatio);
if (m_fRatio >= 1.f) if (m_fRatio >= 1.f)
{ {
m_iPreAnimIndex = m_iCurrentAnimIndex; m_iPreAnimIndex = m_iCurrentAnimIndex;
@@ -227,7 +226,6 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform)
else else
{ {
m_bIsFinishedAnim = m_Animations[m_iCurrentAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, true, m_iBoneMask, m_vector); m_bIsFinishedAnim = m_Animations[m_iCurrentAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, true, m_iBoneMask, m_vector);
m_bIsSecondFinishedAnim = m_Animations[m_iCurrSecondAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsSecondLoop, fTimeDelta, false, m_iBoneMask); m_bIsSecondFinishedAnim = m_Animations[m_iCurrSecondAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsSecondLoop, fTimeDelta, false, m_iBoneMask);
m_iPreAnimIndex = m_iCurrentAnimIndex; m_iPreAnimIndex = m_iCurrentAnimIndex;
} }
+7 -4
View File
@@ -17,7 +17,7 @@ CRenderer::CRenderer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
HRESULT CRenderer::Add_RenderGroup(RENDER eRenderGroup, CGameObject* pRenderObject) HRESULT CRenderer::Add_RenderGroup(RENDER eRenderGroup, CGameObject* pRenderObject)
{ {
if (nullptr == pRenderObject || pRenderObject->isDead()){ if (nullptr == pRenderObject || pRenderObject->isDead()) {
return E_FAIL; return E_FAIL;
} }
@@ -78,7 +78,7 @@ void CRenderer::Render()
Describe_Entitiy(); Describe_Entitiy();
m_pGameInstance->RenderTarget_Debuger(); m_pGameInstance->RenderTarget_Debuger();
if(m_pGameInstance->Key_Pressing(DIK_F10)){ if (m_pGameInstance->Key_Pressing(DIK_F10)) {
Render_Debug(); Render_Debug();
} }
#endif #endif
@@ -615,6 +615,7 @@ void CRenderer::Render_Bloom()
void CRenderer::Render_UI() void CRenderer::Render_UI()
{ {
m_RenderObjects[ENUM_CLASS(RENDER::UI)].sort([](CGameObject* pDest, CGameObject* pSrc)->_bool { m_RenderObjects[ENUM_CLASS(RENDER::UI)].sort([](CGameObject* pDest, CGameObject* pSrc)->_bool {
_float3 vDstPos = {}; _float3 vDstPos = {};
_float3 vSrcPos = {}; _float3 vSrcPos = {};
@@ -624,6 +625,8 @@ void CRenderer::Render_UI()
return vDstPos.z > vSrcPos.z; return vDstPos.z > vSrcPos.z;
}); // z 소팅 }); // z 소팅
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::UI)]) for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::UI)])
{ {
if (nullptr != pRenderObject) { if (nullptr != pRenderObject) {
@@ -1073,11 +1076,11 @@ void CRenderer::Describe_Entitiy()
GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f"); GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f");
if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance){ if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance) {
m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance; m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance;
} }
if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f){ if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f) {
m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f; m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f;
} }
@@ -265,7 +265,7 @@ void CVIBuffer_UI_Instance::Set_Index_Renge_Color(_uint StartIndex, _uint EndInd
m_pContext->Unmap(m_pVBInstance, 0); m_pContext->Unmap(m_pVBInstance, 0);
} }
_uint CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos) _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos)
{ {
D3D11_MAPPED_SUBRESOURCE SubResource{}; D3D11_MAPPED_SUBRESOURCE SubResource{};
@@ -273,7 +273,7 @@ _uint CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos)
VTX_INSTANCE_UI* pVertices = static_cast<VTX_INSTANCE_UI*>(SubResource.pData); VTX_INSTANCE_UI* pVertices = static_cast<VTX_INSTANCE_UI*>(SubResource.pData);
_uint hoveredIndex = (_uint)-1; _int hoveredIndex = -1;
for (_uint i = 0; i < m_iNumInstance; i++) for (_uint i = 0; i < m_iNumInstance; i++)
{ {
_float2 pos = pVertices[i].fPos; _float2 pos = pVertices[i].fPos;
@@ -292,11 +292,13 @@ _uint CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos)
if (PtInRect(&rcInstance, pt)) if (PtInRect(&rcInstance, pt))
{ {
pVertices[i].bHover = 1.f; pVertices[i].bHover = 1.f;
hoveredIndex = i; // ✅ 인덱스 저장 hoveredIndex = i;
break;
} }
else else
{ {
pVertices[i].bHover = 0.f; pVertices[i].bHover = 0.f;
hoveredIndex = -1;
} }
} }
@@ -23,8 +23,6 @@ class ENGINE_DLL CAnimation : public CBase
vector<_int>* Capture_Bones(); vector<_int>* Capture_Bones();
void InterpAnim(CAnimation* pPreAnim, vector<CBone*>& Bones, _float fRatio); void InterpAnim(CAnimation* pPreAnim, vector<CBone*>& Bones, _float fRatio);
void CreateGPUData(ID3D11Device* pDevice); void CreateGPUData(ID3D11Device* pDevice);
+1 -1
View File
@@ -15,7 +15,7 @@ enum ESTATE
COMBAT, LIGHT_ATTACK, SPELL, SKILL, SKILL2, COMBAT, LIGHT_ATTACK, SPELL, SKILL, SKILL2,
MAPHELP,POTION, MAPHELP,POTION,
ACCIO,DESCENDO,DIFFINDO,DEPULSO,LUMOS,LUMOS_STOP,DISILLUSION_ENTER,DISILLUSION_EXIT, ANCIENT_THROW, ACCIO,DESCENDO,DIFFINDO,DEPULSO,LUMOS,LUMOS_STOP,DISILLUSION_ENTER,DISILLUSION_EXIT, ANCIENT_THROW,
BROOM_IDLE,BROOM_FWD, BROOM_HOVER_IDLE, BROOM_HOVER_START,BROOM_MOUNT, BROOM_MOUNT_END, BROOM_IDLE,BROOM_FWD,BROOM_LEFT,BROOM_RIGHT,BROOM_DOWN,BROOM_UP, BROOM_HOVER_IDLE, BROOM_HOVER_START,BROOM_MOUNT, BROOM_MOUNT_END,
HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R, HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R,
KNOCKDOWN, KNOCKDOWN_FWD, KNOCKDOWN_FWD_SPLT, KNOCKDOWN_FWD_SPLT_HOLD, KNOCKDOWN_BWD, KNOCKDOWN_BWD_SPLT, KNOCKDOWN_BWD_SPLT_HOLD, KNOCKDOWN, KNOCKDOWN_FWD, KNOCKDOWN_FWD_SPLT, KNOCKDOWN_FWD_SPLT_HOLD, KNOCKDOWN_BWD, KNOCKDOWN_BWD_SPLT, KNOCKDOWN_BWD_SPLT_HOLD,
GETUP, GETUP_BWD, GETUP_FWD, GETUP_L, GETUP_L_FD, GETUP_L_FU, GETUP_R, GETUP_R_FD, GETUP_R_FU, GETUP_SLOUCH, GETUP, GETUP_BWD, GETUP_FWD, GETUP_L, GETUP_L_FD, GETUP_L_FU, GETUP_R, GETUP_R_FD, GETUP_R_FU, GETUP_SLOUCH,
@@ -33,7 +33,7 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
void Set_Cloned(_bool isCloned) { m_isCloned = isCloned; } void Set_Cloned(_bool isCloned) { m_isCloned = isCloned; }
void Set_ImageUV(UI_ATLAS_DESC* AtlasUV); void Set_ImageUV(UI_ATLAS_DESC* AtlasUV);
void Set_Index_Renge_Color(_uint StartIndex, _uint EndIndex, _float4 vColor); void Set_Index_Renge_Color(_uint StartIndex, _uint EndIndex, _float4 vColor);
_uint Set_Mouse_Hover(_float2 fMousePos); _int Set_Mouse_Hover(_float2 fMousePos);
private: private:
VTX_INSTANCE_UI* m_pInstanceVertices = { nullptr }; VTX_INSTANCE_UI* m_pInstanceVertices = { nullptr };