@@ -58,6 +58,7 @@ Texture2D g_Texture5;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
|
||||
int g_iHover;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
@@ -344,7 +345,7 @@ PS_OUT PS_Spell_Anim(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 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -1059,7 +1060,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float3 BGColor= float3(1.f, 1.f, 1.f);
|
||||
float3 BGColor = float3(1.f, 1.f, 1.f);
|
||||
|
||||
switch (g_iSpellType)
|
||||
{
|
||||
@@ -1189,6 +1190,48 @@ PS_OUT PS_Spell_Drag(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Camera_LockOn(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);
|
||||
|
||||
float2 center = float2(0.5, 0.5);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
float angle = -g_fTime;
|
||||
float s = sin(angle);
|
||||
float c = cos(angle);
|
||||
float2 maskuv = float2(uv.x * c - uv.y * s, uv.x * s + uv.y * c) + center;
|
||||
|
||||
float tex1 = g_Texture.Sample(ClampSampler, maskuv).r;
|
||||
|
||||
Color.a = tex1 * 0.3f;
|
||||
|
||||
if (g_iHover != 0)
|
||||
{
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, maskuv);
|
||||
|
||||
Color.rgb += (tex2.rgb * tex2.a) * 2.f;
|
||||
}
|
||||
|
||||
float2 UpUV = In.vTexcoord;
|
||||
UpUV.y += g_fTime;
|
||||
|
||||
float4 tex3 = g_Texture2.Sample(DefaultSampler, UpUV);
|
||||
float tex4 = g_Texture1.Sample(ClampSampler, In.vTexcoord).r;
|
||||
|
||||
tex3.a *= tex4;
|
||||
|
||||
Color = lerp(Color, tex3, tex3.a);
|
||||
|
||||
Color.a *= Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -1429,4 +1472,14 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_Spell_Drag();
|
||||
}
|
||||
|
||||
pass Camera_LockOn
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Camera_LockOn();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<Filter>01.Levels\01.Logo</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_GamePlay.h">
|
||||
<Filter>01.Levels\02.GamePlay</Filter>
|
||||
<Filter>01.Levels\01.Logo\02.GamePlay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\InfoInstance.h">
|
||||
<Filter>03.InfoInstance</Filter>
|
||||
@@ -398,9 +398,6 @@
|
||||
<Filter Include="01.Levels\00.Loading\Loader">
|
||||
<UniqueIdentifier>{37d70d8d-655c-498b-82a6-afd3d1726cd8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels\02.GamePlay">
|
||||
<UniqueIdentifier>{7e641382-9dfa-4da7-a8c8-a3ee06360e7a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects">
|
||||
<UniqueIdentifier>{27434478-691e-42a8-83c7-ecd1a60f46ce}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -782,6 +779,9 @@
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Blink">
|
||||
<UniqueIdentifier>{27251db2-19f2-4492-a3a4-32c11526f413}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels\01.Logo\02.GamePlay">
|
||||
<UniqueIdentifier>{7e641382-9dfa-4da7-a8c8-a3ee06360e7a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -803,7 +803,7 @@
|
||||
<Filter>01.Levels\01.Logo</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level_GamePlay.cpp">
|
||||
<Filter>01.Levels\02.GamePlay</Filter>
|
||||
<Filter>01.Levels\01.Logo\02.GamePlay</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\InfoInstance.cpp">
|
||||
<Filter>03.InfoInstance</Filter>
|
||||
@@ -1141,6 +1141,7 @@
|
||||
<ClCompile Include="..\Private\Spell_Drag.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Drag</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapContainer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc">
|
||||
|
||||
@@ -31,6 +31,8 @@ HRESULT CBombard::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
m_iSkillType = ENUM_CLASS(SKILL_TYPE::BOMBARDA);
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Bombard")))
|
||||
return E_FAIL;
|
||||
@@ -83,7 +85,7 @@ void CBombard::Late_Update(_float fTimeDelta)
|
||||
if (true == m_pGameInstance->SphereCast(0.125, XMLoadFloat4(&m_vStartPos), XMVector3Normalize(vDir), XMVectorGetX(XMVector3Length(vDir))
|
||||
, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC | PSX::PxQueryFlag::eSTATIC, m_Hitbuffer))
|
||||
{
|
||||
OnCollision();
|
||||
OnCollision(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ HRESULT CDecendo::Initialize(void* pArg)
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Decendo")))
|
||||
return E_FAIL;
|
||||
|
||||
m_iSkillType = ENUM_CLASS(SKILL_TYPE::DESCENDO);
|
||||
|
||||
m_wstrEffectName = L"Decendo";
|
||||
|
||||
@@ -96,6 +97,50 @@ void CDecendo::Late_Update(_float fTimeDelta)
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
_vector vStartPos = m_pProjectile->Get_WorldPostion();
|
||||
|
||||
_vector vEndPos = XMLoadFloat4(&m_vTargetPos);
|
||||
|
||||
_vector vDir2 = { vEndPos - vStartPos };
|
||||
|
||||
_float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
|
||||
|
||||
PSX::PxSweepBuffer pxBuffer = {};
|
||||
|
||||
_bool bHit = m_pGameInstance->SphereCast(0.2f, vStartPos, vDir2, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
|
||||
|
||||
if (bHit) {
|
||||
const PSX::PxSweepHit& hit = pxBuffer.block;
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
PSX::PxShape* pShape = hit.shape;
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::CCTActor:
|
||||
{
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::MONSTER:
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this);
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::TROLL:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion());
|
||||
|
||||
_vector vDir = XMLoadFloat4(&m_vEndPos) - XMLoadFloat4(&m_vStartPos);
|
||||
|
||||
@@ -125,6 +125,25 @@ HRESULT CEffectObject::Render_Blur()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CEffectObject::Disable_Light()
|
||||
{
|
||||
|
||||
if (m_pLightCom == nullptr)
|
||||
return;
|
||||
|
||||
m_pGameInstance->Delete_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
|
||||
}
|
||||
|
||||
void CEffectObject::Add_Light()
|
||||
{
|
||||
if (m_pLightCom == nullptr)
|
||||
return;
|
||||
|
||||
m_pGameInstance->Add_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CEffectObject::Render_Bloom()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
|
||||
@@ -214,6 +214,8 @@ HRESULT CEffect_Container::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
m_pOwner = pObject;
|
||||
|
||||
|
||||
//Add_Chlid_Light();
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
@@ -293,7 +295,7 @@ _int CEffect_Container::CollisionCheck()
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (PXOBJECT(pUserData->eKind))
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::PLAYER:
|
||||
continue;
|
||||
@@ -364,6 +366,8 @@ void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
pPart.second->Set_Visible(false);
|
||||
}
|
||||
}
|
||||
|
||||
//Delete_Chlid_Light();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,9 +57,7 @@ HRESULT CGoblin::Initialize(void* pArg)
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(m_pGameInstance->Real_Random_Float(-20.f, 20.f), 0.f, m_pGameInstance->Real_Random_Float(-20.f, 20.f), 1.f));
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(m_pGameInstance->Random_Float(-20.f, 20.f), 0.f, m_pGameInstance->Random_Float(-20.f, 20.f), 1.f));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -182,8 +180,8 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
_vector vHitDir = {}; // 시도한 move 방향
|
||||
_float fLength = {}; // 작용된 힘
|
||||
|
||||
m_pCharacter_Controller->ConvertToDO(*m_pRigidBody);
|
||||
m_pRigidBody->Add_Force(vHitDir * fLength * 10000.f, PSX::PxForceMode::eFORCE);
|
||||
//m_pCharacter_Controller->ConvertToDO(*m_pRigidBody);
|
||||
//m_pRigidBody->Add_Force(vHitDir * fLength * 10000.f, PSX::PxForceMode::eFORCE);
|
||||
|
||||
//m_pCharacter_Controller->ConvertToDO(*m_pRigidBody);
|
||||
//m_pRigidBody->Add_Force(vHitDir * fLength * 100.f, PSX::PxForceMode::eIMPULSE);
|
||||
@@ -206,7 +204,8 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
|
||||
break;
|
||||
}
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::BLINK))
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ void CGoblin::Behavior_IdleEnter()
|
||||
|
||||
HRESULT CGoblin::Behavior_IdleExitCheck()
|
||||
{
|
||||
if (m_fTargetDistance <= 20.f /*&& m_fTargetDistance != 0.f*/)
|
||||
if (m_fTargetDistance <= 20.f && m_fTargetDistance != 0.f)
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
|
||||
return E_FAIL;
|
||||
@@ -134,7 +134,7 @@ HRESULT CGoblin::Behavior_SwingExitCheck(_float fTimeDelta)
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
if (m_pFSM->IsEnable(FSMSTATE::SWING) && m_bStep)
|
||||
{
|
||||
_float fDesiredRange = 0.5f;
|
||||
_float fDesiredRange = 1.f;
|
||||
_float dist = m_fTargetDistance;
|
||||
|
||||
if (dist > fDesiredRange)
|
||||
@@ -205,9 +205,23 @@ void CGoblin::Behavior_BlinkEnter()
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::BLINK);
|
||||
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::TP)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::TP)];
|
||||
_float3 vRandomPos = _float3(m_pGameInstance->Real_Random_Float(-1.5f, 1.5f), 1.f, m_pGameInstance->Real_Random_Float(-1.5f, 1.5f));
|
||||
_vector vRandPos = XMLoadFloat3(&vRandomPos);
|
||||
m_pCharacter_Controller->Set_Position(XMLoadFloat4(&m_vTargetPos) + vRandPos);
|
||||
_vector vPlayerPos = XMLoadFloat4(&m_vTargetPos);
|
||||
_vector vPlayerLook = m_pTarget->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
vPlayerLook = XMVectorSetY(vPlayerLook, 0.f);
|
||||
vPlayerLook = XMVector3Normalize(vPlayerLook);
|
||||
|
||||
_float randAngleDeg = m_pGameInstance->Real_Random_Float(-60.f, 60.f);
|
||||
_float randAngleRad = XMConvertToRadians(randAngleDeg);
|
||||
|
||||
_matrix rot = XMMatrixRotationY(randAngleRad);
|
||||
_vector offsetDir = XMVector3TransformNormal(vPlayerLook, rot);
|
||||
|
||||
_float randDist = m_pGameInstance->Real_Random_Float(1.0f, 1.5f);
|
||||
|
||||
_vector vFinalPos = vPlayerPos + offsetDir * randDist;
|
||||
|
||||
m_pCharacter_Controller->Set_Position(vFinalPos);
|
||||
|
||||
}
|
||||
|
||||
HRESULT CGoblin::Behavior_BlinkExitCheck(_float fTimeDelta)
|
||||
@@ -215,7 +229,7 @@ HRESULT CGoblin::Behavior_BlinkExitCheck(_float fTimeDelta)
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
m_fTpTime += fTimeDelta;
|
||||
if (m_fTpTime >= 2.f)
|
||||
if (m_fTpTime >= 1.5f)
|
||||
{
|
||||
m_bVisible = true;
|
||||
m_fTpTime = 0.f;
|
||||
@@ -226,6 +240,7 @@ HRESULT CGoblin::Behavior_BlinkExitCheck(_float fTimeDelta)
|
||||
if (m_pModelCom->IsFinishedAnim() && iCurrAnimIndex == m_Animation[STATEANIM::BLINK].first)
|
||||
{
|
||||
m_bLookAt = true;
|
||||
m_fTpTime = 0.f;
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -280,8 +295,23 @@ HRESULT CGoblin::Behavior_HitExitCheck(_float fTimeDelta)
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::HIT_LEVIOSO].first)
|
||||
{
|
||||
_vector vDir = m_pTransformCom->Get_State(STATE::UP);
|
||||
vDir = XMVector4Normalize(vDir);
|
||||
_vector vPos = m_pCharacter_Controller->Get_Position();
|
||||
m_fAirTime += fTimeDelta;
|
||||
_vector Force = vDir * fTimeDelta;
|
||||
if (m_fAirTime < 1.3f) {
|
||||
m_pCharacter_Controller->Set_Position(vPos + Force);
|
||||
}
|
||||
else {
|
||||
m_pCharacter_Controller->Set_Position(vPos);
|
||||
}
|
||||
m_pCharacter_Controller->SetGravity(false);
|
||||
|
||||
if (m_pModelCom->Get_CurrentTrackProgressRatio() >= 0.31f)
|
||||
{
|
||||
m_fAirTime = 0.f;
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
pairAnimInfo = m_Animation[STATEANIM::LAND];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f);
|
||||
}
|
||||
|
||||
@@ -121,12 +121,28 @@ void CInfoInstance::Key_Input(_uint Input)
|
||||
switch (m_eInput)
|
||||
{
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_1):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_2):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_3):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_4):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_T):
|
||||
if (m_eUI_State == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
m_eUI_State = UI_STATE::SPELL;
|
||||
Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State);
|
||||
}
|
||||
else if (m_eUI_State == UI_STATE::SPELL)
|
||||
{
|
||||
m_eUI_State = UI_STATE::GAMEPLAYER;
|
||||
Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State);
|
||||
}
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_G):
|
||||
|
||||
@@ -140,6 +156,11 @@ void CInfoInstance::Key_Input(_uint Input)
|
||||
}
|
||||
}
|
||||
|
||||
void CInfoInstance::Set_UISTATE(UI_STATE eState)
|
||||
{
|
||||
m_eUI_State = eState;
|
||||
}
|
||||
|
||||
void CInfoInstance::Add_Event(_wstring EventName, function<void(void*)> Event)
|
||||
{
|
||||
UI_Event.emplace(EventName, Event);
|
||||
|
||||
@@ -33,6 +33,8 @@ HRESULT CLevioso::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
m_iSkillType = ENUM_CLASS(SKILL_TYPE::LEVIOSO);
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Levioso")))
|
||||
return E_FAIL;
|
||||
@@ -99,7 +101,7 @@ void CLevioso::Late_Update(_float fTimeDelta)
|
||||
if (true == m_pGameInstance->SphereCast(0.125, XMLoadFloat4(&m_vStartPos), XMVector3Normalize(vDir), XMVectorGetX(XMVector3Length(vDir))
|
||||
, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC | PSX::PxQueryFlag::eSTATIC, m_Hitbuffer))
|
||||
{
|
||||
OnCollision();
|
||||
OnCollision(this);
|
||||
}
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
@@ -40,12 +40,9 @@ void CLight_Main::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("Main_Light");
|
||||
#ifdef _DEBUG
|
||||
m_pLightCom->Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
|
||||
void CLight_Main::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -35,6 +35,8 @@ HRESULT CNomalJap::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
m_iSkillType = ENUM_CLASS(SKILL_TYPE::JAP);
|
||||
|
||||
|
||||
m_wstrEffectName = L"Nomal_Jap";
|
||||
|
||||
@@ -102,17 +104,14 @@ void CNomalJap::Update(_float fTimeDelta)
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount);
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount);
|
||||
|
||||
|
||||
|
||||
XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion());
|
||||
|
||||
|
||||
_vector vDir = XMLoadFloat4(&m_vEndPos) - XMLoadFloat4(&m_vStartPos);
|
||||
|
||||
if (true == m_pGameInstance->SphereCast(0.125, XMLoadFloat4(&m_vStartPos), XMVector3Normalize(vDir), XMVectorGetX(XMVector3Length(vDir))
|
||||
if (true == m_pGameInstance->SphereCast(0.25, XMLoadFloat4(&m_vStartPos), XMVector3Normalize(vDir), XMVectorGetX(XMVector3Length(vDir))
|
||||
, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC | PSX::PxQueryFlag::eSTATIC, m_Hitbuffer))
|
||||
{
|
||||
OnCollision();
|
||||
OnCollision(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +122,50 @@ void CNomalJap::Late_Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
|
||||
_vector vStartPos = m_pProjectile->Get_WorldPostion();
|
||||
|
||||
_vector vEndPos = XMLoadFloat4(&m_vTargetPos);
|
||||
|
||||
_vector vDir = { vEndPos - vStartPos };
|
||||
|
||||
_float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
|
||||
|
||||
PSX::PxSweepBuffer pxBuffer = {};
|
||||
|
||||
_bool bHit = m_pGameInstance->SphereCast(0.2f, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
|
||||
|
||||
if (bHit) {
|
||||
const PSX::PxSweepHit& hit = pxBuffer.block;
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
PSX::PxShape* pShape = hit.shape;
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::CCTActor:
|
||||
{
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::MONSTER:
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this);
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::TROLL:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
|
||||
// UI 연동 추가
|
||||
m_pInfoInstance->Add_Event(TEXT("JAP"), [this](void* p) {this->Get_Spell(*reinterpret_cast<_int*>(p)); });
|
||||
|
||||
m_pInfoInstance->Add_Event(TEXT("Canvas_Change"), [this](void* p) {this->Get_UIState(*reinterpret_cast<_int*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,10 @@ void CPlayer::Update(_float fTimeDelta)
|
||||
{
|
||||
Update_CameraCoordinateSystem();
|
||||
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
@@ -191,6 +194,13 @@ HRESULT CPlayer::Render()
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CPlayer::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
}
|
||||
void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CPlayer::Render_CameraCoordinateSystem()
|
||||
|
||||
@@ -36,72 +36,95 @@ void CPlayer::Get_Spell(_int SkillIndex)
|
||||
m_eSpell = SkillIndex;
|
||||
}
|
||||
|
||||
void CPlayer::Get_UIState(_int UIState)
|
||||
{
|
||||
m_eUIState = UIState;
|
||||
}
|
||||
|
||||
HRESULT CPlayer::InputAction()
|
||||
{
|
||||
if (
|
||||
m_pGameInstance->Key_Down(DIK_SPACE)
|
||||
|| m_pGameInstance->Key_Down(DIK_LCONTROL)
|
||||
|| m_pGameInstance->Key_Down(DIK_E)
|
||||
|| m_pGameInstance->Key_Down(DIK_R)
|
||||
|| m_pGameInstance->Key_Down(DIK_Q)
|
||||
|| m_pGameInstance->Mouse_Up(DIM_LBUTTON)
|
||||
|| m_pGameInstance->Key_Down(DIK_LSHIFT)
|
||||
|| m_pGameInstance->Key_Down(DIK_C)
|
||||
|| m_pGameInstance->Key_Down(DIK_V)
|
||||
|| m_pGameInstance->Key_Down(DIK_Z)
|
||||
|| m_pGameInstance->Key_Down(DIK_G)
|
||||
|| m_pGameInstance->Key_Down(DIK_B)
|
||||
|| m_pGameInstance->Key_Down(DIK_T)
|
||||
|| m_pGameInstance->Key_Down(DIK_TAB)
|
||||
)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_T)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_T));
|
||||
if (m_pGameInstance->Key_Down(DIK_TAB)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_TAB));
|
||||
if ((m_eUIState != ENUM_CLASS(UI_STATE::SPELL))) {
|
||||
if (
|
||||
m_pGameInstance->Key_Down(DIK_SPACE)
|
||||
|| m_pGameInstance->Key_Down(DIK_LCONTROL)
|
||||
|| m_pGameInstance->Key_Down(DIK_E)
|
||||
|| m_pGameInstance->Key_Down(DIK_R)
|
||||
|| m_pGameInstance->Key_Down(DIK_Q)
|
||||
|| m_pGameInstance->Mouse_Up(DIM_LBUTTON)
|
||||
|| m_pGameInstance->Key_Down(DIK_LSHIFT)
|
||||
|| m_pGameInstance->Key_Down(DIK_C)
|
||||
|| m_pGameInstance->Key_Down(DIK_V)
|
||||
|| m_pGameInstance->Key_Down(DIK_Z)
|
||||
|| m_pGameInstance->Key_Down(DIK_G)
|
||||
|| m_pGameInstance->Key_Down(DIK_B)
|
||||
|| m_pGameInstance->Key_Down(DIK_T)
|
||||
|| m_pGameInstance->Key_Down(DIK_TAB)
|
||||
)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_T)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_T));
|
||||
if (m_pGameInstance->Key_Down(DIK_TAB)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_TAB));
|
||||
|
||||
return S_OK;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(m_pGameInstance->Key_Down(DIK_T))
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_T)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_T));
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CPlayer::InputMove()
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_A)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_S)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_D))
|
||||
{
|
||||
return S_OK;
|
||||
if ((m_eUIState != ENUM_CLASS(UI_STATE::SPELL))) {
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_A)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_S)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_D))
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CPlayer::InputKeyUpMove()
|
||||
{
|
||||
if (m_pGameInstance->Key_Up(DIK_W)
|
||||
|| m_pGameInstance->Key_Up(DIK_A)
|
||||
|| m_pGameInstance->Key_Up(DIK_S)
|
||||
|| m_pGameInstance->Key_Up(DIK_D))
|
||||
{
|
||||
return S_OK;
|
||||
if ((m_eUIState != ENUM_CLASS(UI_STATE::SPELL))) {
|
||||
if (m_pGameInstance->Key_Up(DIK_W)
|
||||
|| m_pGameInstance->Key_Up(DIK_A)
|
||||
|| m_pGameInstance->Key_Up(DIK_S)
|
||||
|| m_pGameInstance->Key_Up(DIK_D))
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CPlayer::InputSpell()
|
||||
{
|
||||
if (
|
||||
m_pGameInstance->Key_Down(DIK_1)
|
||||
|| m_pGameInstance->Key_Down(DIK_2)
|
||||
|| m_pGameInstance->Key_Down(DIK_3)
|
||||
|| m_pGameInstance->Key_Down(DIK_4)
|
||||
)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_1)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_1));
|
||||
if (m_pGameInstance->Key_Down(DIK_2)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_2));
|
||||
if (m_pGameInstance->Key_Down(DIK_3)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_3));
|
||||
if (m_pGameInstance->Key_Down(DIK_4)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_4));
|
||||
if ((m_eUIState != ENUM_CLASS(UI_STATE::SPELL))) {
|
||||
if (
|
||||
m_pGameInstance->Key_Down(DIK_1)
|
||||
|| m_pGameInstance->Key_Down(DIK_2)
|
||||
|| m_pGameInstance->Key_Down(DIK_3)
|
||||
|| m_pGameInstance->Key_Down(DIK_4)
|
||||
)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_1)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_1));
|
||||
if (m_pGameInstance->Key_Down(DIK_2)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_2));
|
||||
if (m_pGameInstance->Key_Down(DIK_3)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_3));
|
||||
if (m_pGameInstance->Key_Down(DIK_4)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_4));
|
||||
|
||||
return S_OK;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -136,7 +159,7 @@ void CPlayer::Behavior_IdleEnter() {
|
||||
|
||||
m_bSprintToggle = false;
|
||||
m_bWalkToggle = false;
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,0.5f,true);
|
||||
}
|
||||
|
||||
// S_OK -> 현 상태 유지
|
||||
@@ -1002,7 +1025,7 @@ void CPlayer::Behavior_HitEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::HIT);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
_int RandIndex = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
_int RandIndex = m_pGameInstance->Real_Random_Int(0, 2);
|
||||
switch (RandIndex)
|
||||
{
|
||||
case 0:
|
||||
@@ -1011,6 +1034,9 @@ void CPlayer::Behavior_HitEnter()
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_L];
|
||||
break;
|
||||
case 2:
|
||||
pairAnimInfo = m_Animation[STATEANIM::KNOCKBACK];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1238,10 +1264,12 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
{
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::STOP))
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.05f);
|
||||
if ((m_eUIState != ENUM_CLASS(UI_STATE::SPELL))) {
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::STOP))
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.05f);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1374,7 +1402,7 @@ void CPlayer::Add_FSM()
|
||||
|
||||
void CPlayer::Set_Anim()
|
||||
{
|
||||
m_Animation[STATEANIM::IDLE] = { 266,true };
|
||||
m_Animation[STATEANIM::IDLE] = { 893,true }; //266
|
||||
m_Animation[STATEANIM::IDLE_AIM] = { 5,true };
|
||||
m_Animation[STATEANIM::IDLE_TURN_L] = { 270,false };
|
||||
m_Animation[STATEANIM::IDLE_TURN_R] = { 430,false };
|
||||
@@ -1391,7 +1419,7 @@ void CPlayer::Set_Anim()
|
||||
m_Animation[STATEANIM::JOG_LEFT] = { 164,false }; // Turn
|
||||
m_Animation[STATEANIM::JOG_RIGHT] = { 185,false };// Turn
|
||||
m_Animation[STATEANIM::JOG_BWD] = { 154,false }; // Turn
|
||||
m_Animation[STATEANIM::JOG_STOP] = { 289,false };
|
||||
m_Animation[STATEANIM::JOG_STOP] = { 446,false };
|
||||
|
||||
m_Animation[STATEANIM::JOG_AIM_LEFT] = { 171,true };
|
||||
m_Animation[STATEANIM::JOG_AIM_RIGHT] = { 175,true };
|
||||
@@ -1427,8 +1455,9 @@ void CPlayer::Set_Anim()
|
||||
m_Animation[STATEANIM::SPELL_FAIL] = { 906,false };
|
||||
|
||||
|
||||
m_Animation[STATEANIM::HIT_L] = { 1124,false };
|
||||
m_Animation[STATEANIM::HIT_R] = { 1125,false };
|
||||
m_Animation[STATEANIM::HIT_L] = { 1200,false };
|
||||
m_Animation[STATEANIM::HIT_R] = { 1201,false };
|
||||
m_Animation[STATEANIM::KNOCKBACK] = { 1078,false };
|
||||
|
||||
m_Animation[STATEANIM::BROOM_IDLE] = { 710,true };
|
||||
m_Animation[STATEANIM::BROOM_FWD] = { 711,true };
|
||||
|
||||
@@ -45,13 +45,7 @@ HRESULT CProtego::Initialize(void* pArg)
|
||||
m_wstrEffectName = L"Protego";
|
||||
|
||||
|
||||
m_Events.emplace(1.3f, [&]() {
|
||||
|
||||
m_pSphere->Set_Dissolve(true);
|
||||
m_pBottom->Set_Dissolve(true);
|
||||
m_pCircle->Set_Dissolve(true);
|
||||
|
||||
});
|
||||
|
||||
|
||||
m_fAmountSize = 0.1f;
|
||||
@@ -127,9 +121,6 @@ HRESULT CProtego::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
|
||||
m_fSizeAccTime = 0.f;
|
||||
|
||||
m_pSphere->Set_Dissolve(false);
|
||||
m_pBottom->Set_Dissolve(false);
|
||||
m_pCircle->Set_Dissolve(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
#include "GameObject.h"
|
||||
#include "UIObject.h"
|
||||
#include "tinyxml2.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CSkill_Data::CSkill_Data()
|
||||
:m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||
{
|
||||
|
||||
m_bNoCool = false;
|
||||
m_pInfoInstance->Add_Event(TEXT("NoCooL"), [this](void* p) {this->NoCool(*reinterpret_cast<_bool*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -27,8 +30,11 @@ _int CSkill_Data::Update_Spell(_int SpellID)
|
||||
if (SpellInfo[SpellID].bUse_Skill == false)
|
||||
return -1;
|
||||
|
||||
SpellInfo[SpellID].bUse_Skill = false;
|
||||
m_iSpell_CoolTime[SpellID] = 0.f;
|
||||
if (m_bNoCool == false)
|
||||
{
|
||||
SpellInfo[SpellID].bUse_Skill = false;
|
||||
m_iSpell_CoolTime[SpellID] = 0.f;
|
||||
}
|
||||
|
||||
return SpellInfo[SpellID].iSkill_Type;
|
||||
}
|
||||
@@ -112,6 +118,11 @@ HRESULT CSkill_Data::Load_SpellInfo(const _char* pFilePath)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSkill_Data::NoCool(_bool bNoCool)
|
||||
{
|
||||
m_bNoCool = bNoCool;
|
||||
}
|
||||
|
||||
CSkill_Data* CSkill_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSkill_Data* pInstance = new CSkill_Data();
|
||||
|
||||
@@ -408,6 +408,9 @@ void CSpell_Drag::Free()
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Drag::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -161,6 +161,8 @@ void CSpell_Overlay::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CSpell_Overlay::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
@@ -200,6 +202,17 @@ void CSpell_Overlay::Update(_float fTimeDelta)
|
||||
}
|
||||
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_N))
|
||||
{
|
||||
Nocool = true;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NoCooL"), &Nocool);
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_M))
|
||||
{
|
||||
Nocool = false;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("NoCooL"), &Nocool);
|
||||
}
|
||||
|
||||
m_vUVScale.y = m_fCoolTime;
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
@@ -339,6 +339,7 @@ void CTroll::Behavior_SwingEnter()
|
||||
m_pFSM->Enable_State(FSMSTATE::SWING);
|
||||
pairAnimInfo = m_Animation[STATEANIM::SWING_FWD];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)];
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bLookAt = false; },
|
||||
0.2f);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "GameInstance.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Spell_Canvas.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CUIObject(pDevice, pContext)
|
||||
@@ -10,7 +11,8 @@ CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
}
|
||||
|
||||
CUI_Manager::CUI_Manager(const CUI_Manager& rhs)
|
||||
:CUIObject(rhs)
|
||||
:CUIObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -26,30 +28,71 @@ HRESULT CUI_Manager::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
m_bCanvas_Change = false;
|
||||
m_eType = UI_STATE::GAMEPLAYER;
|
||||
m_pInfoInstance->Set_UISTATE(m_eType);
|
||||
m_pInfoInstance->Add_Event(TEXT("Canvas_Change"), [this](void* p) {this->Canvas_Change(*reinterpret_cast<UI_STATE*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
{
|
||||
m_eType = eType;
|
||||
|
||||
switch (eType)
|
||||
{
|
||||
case UI_STATE::GAMEPLAYER:
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pSpell_Canvas)->Visible(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::SPELL:
|
||||
static_cast<CCanvasObject*>(m_pSpell_Canvas)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::POTION:
|
||||
break;
|
||||
|
||||
case UI_STATE::INVENTORY:
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void CUI_Manager::Clear_Canvas()
|
||||
{
|
||||
}
|
||||
|
||||
CGameObject* CUI_Manager::Get_Canvas(const wstring& Name)
|
||||
{
|
||||
return Find_Canvas(Name);
|
||||
}
|
||||
|
||||
_int CUI_Manager::Canvas_Count()
|
||||
{
|
||||
return m_iCanvas_Count;
|
||||
}
|
||||
|
||||
const vector<wstring> CUI_Manager::Canvas_Name()
|
||||
{
|
||||
return m_CanvasNames;
|
||||
}
|
||||
|
||||
void CUI_Manager::Add_Manager_Event(_wstring Name, function<void(void*)> Event)
|
||||
{
|
||||
m_Event_map.emplace(Name, Event);
|
||||
}
|
||||
|
||||
void CUI_Manager::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CUI_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_T))
|
||||
{
|
||||
m_bCanvas_Change = !m_bCanvas_Change;
|
||||
}
|
||||
|
||||
if (m_bCanvas_Change == false)
|
||||
{
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pSpell_Panel)->Visible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<CCanvasObject*>(m_pSpell_Panel)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void CUI_Manager::Late_Update(_float fTimeDelta)
|
||||
@@ -80,15 +123,51 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGamePlay_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CGamePlay_Canvas**>(&m_pGamePlay_Canves)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Canvas**>(&m_pSpell_Panel)))) {
|
||||
Add_Canvas(TEXT("GamePlay_Canvas"), m_pGamePlay_Canves);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Canvas**>(&m_pSpell_Canvas)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Canvas(TEXT("Spell_Canvas"), m_pSpell_Canvas);
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMouse_Cursor>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMouse_Cursor**>(&m_pMouse_Cursor)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor);
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCameraLockOn>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CCameraLockOn**>(&m_pCamera_LockOn)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CUI_Manager::Clear_Penel()
|
||||
void CUI_Manager::Add_Canvas(_wstring Name, CGameObject* pCanvas)
|
||||
{
|
||||
if (pCanvas == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Find_Canvas(Name) != nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_Canvases.push_back(pCanvas);
|
||||
m_CanvasNames.push_back(Name);
|
||||
m_Canvas_map.emplace(Name, pCanvas);
|
||||
m_iCanvas_Count++;
|
||||
}
|
||||
|
||||
CGameObject* CUI_Manager::Find_Canvas(const _wstring& Name)
|
||||
{
|
||||
auto iter = m_Canvas_map.find(Name);
|
||||
|
||||
if (iter == m_Canvas_map.end())
|
||||
return nullptr;
|
||||
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
CUI_Manager* CUI_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace Client
|
||||
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, SPELL_DRAG, 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, END };
|
||||
|
||||
enum class UI_STATE { GAMEPLAYER, SPELL, POTION, INVENTORY, END };
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
|
||||
|
||||
@@ -134,10 +134,8 @@ class CEffectObject abstract : public CPartObject
|
||||
public:
|
||||
HRESULT Load(const _char* pFilePath, LEVEL eLevel);
|
||||
|
||||
void Set_Dissolve(_bool isDissolve)
|
||||
{
|
||||
m_EffectInfo.isDissolve = isDissolve;
|
||||
}
|
||||
void Disable_Light();
|
||||
void Add_Light();
|
||||
protected:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
|
||||
@@ -25,7 +25,7 @@ class CEffect_Container abstract : public CContainerObject
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr);
|
||||
HRESULT Load_Package(const _char* pPath);
|
||||
_uint Get_SkillType() const { return m_iSkillType; }
|
||||
public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
|
||||
@@ -64,6 +64,7 @@ class CGoblin final : public CMonster
|
||||
|
||||
_bool m_bStep = { false };
|
||||
_float m_fTpTime = {};
|
||||
_float m_fAirTime = {};
|
||||
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
|
||||
@@ -49,7 +49,7 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
_float Get_CoolTime(_int SpellID);
|
||||
void Change_Canvas();
|
||||
void Key_Input(_uint Input); // 플레이어 키 입력
|
||||
|
||||
void Set_UISTATE(UI_STATE eState);
|
||||
void Add_Event(_wstring EventName, function<void(void*)> Event);
|
||||
void Event_CallBack(_wstring EventName, void* pArg = nullptr);
|
||||
#pragma endregion
|
||||
@@ -65,6 +65,8 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
_uint m_eInput = ENUM_CLASS(KEYINPUT::END);
|
||||
_int m_eSpell = ENUM_CLASS(SKILL_TYPE::END);
|
||||
|
||||
UI_STATE m_eUI_State;
|
||||
|
||||
// 임시로 이벤트 1개 만들어 둠
|
||||
multimap<_wstring, function<void(void*)>> UI_Event;
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -17,6 +17,9 @@ class CPlayer final : public CUnit
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Render_CameraCoordinateSystem();
|
||||
#endif // _DEBUG
|
||||
@@ -84,12 +87,13 @@ class CPlayer final : public CUnit
|
||||
private:
|
||||
// UI 연동 추가
|
||||
void Get_Spell(_int SkillIndex);
|
||||
void Get_UIState(_int UIState);
|
||||
|
||||
virtual void Add_FSM();
|
||||
virtual void Set_Anim();
|
||||
|
||||
function<void()> m_InputAction = nullptr;
|
||||
|
||||
_int m_eUIState = { };
|
||||
|
||||
_float3 m_OffsetPos = {};
|
||||
_float m_fAmount = { 1.f };
|
||||
|
||||
@@ -15,33 +15,39 @@ class CSkill_Data final : public CBase
|
||||
public:
|
||||
|
||||
private:
|
||||
CSkill_Data();
|
||||
~CSkill_Data() = default;
|
||||
CSkill_Data();
|
||||
~CSkill_Data() = default;
|
||||
|
||||
public:
|
||||
void Update(_float fTimeDelta);
|
||||
void Change_Level();
|
||||
_float Get_CoolTime(_int SpellID);
|
||||
void Update(_float fTimeDelta);
|
||||
void Change_Level();
|
||||
_float Get_CoolTime(_int SpellID);
|
||||
|
||||
public:
|
||||
HRESULT Load_SpellInfo(const _char* pFilePath);
|
||||
HRESULT Load_SpellInfo(const _char* pFilePath);
|
||||
|
||||
void NoCool(_bool bNoCool);
|
||||
|
||||
public:
|
||||
const SPELL_INFO& Get_Info(_uint SpellID) const;
|
||||
_int Update_Spell(_int SpellID);
|
||||
const SPELL_INFO& Get_Info(_uint SpellID) const;
|
||||
_int Update_Spell(_int SpellID);
|
||||
|
||||
private:
|
||||
_int m_iSpell_Count{};
|
||||
SPELL_INFO SpellInfo[34] = {};
|
||||
_float m_iSpell_CoolTime[34] = {};
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
_int m_iSpell_Count{};
|
||||
SPELL_INFO SpellInfo[34] = {};
|
||||
_float m_iSpell_CoolTime[34] = {};
|
||||
|
||||
_bool m_bNoCool = { false };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||
|
||||
|
||||
public:
|
||||
static CSkill_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
static CSkill_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -62,7 +62,10 @@ class CSpell_Drag final : public CElementObject
|
||||
static CSpell_Drag* 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
|
||||
|
||||
@@ -64,6 +64,8 @@ class CSpell_Overlay final : public CElementObject
|
||||
_bool m_bEquipped[4] = { false };
|
||||
_bool m_bSpellUsed[4] = { false };
|
||||
|
||||
|
||||
_bool Nocool = { false };
|
||||
public:
|
||||
static CSpell_Overlay* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -63,7 +63,7 @@ class CTroll final : public CMonster
|
||||
virtual void Set_Anim();
|
||||
|
||||
_float m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = {};
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = { 20.f,15.f, 10.f, 15.f ,15.f};
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = { 20.f,20.f, 20.f, 20.f ,20.f };
|
||||
|
||||
|
||||
_float m_fRushTime = {};
|
||||
|
||||
@@ -33,15 +33,39 @@ class CUI_Manager final : public CUIObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Clear_Penel();
|
||||
void Canvas_Change(UI_STATE eType);
|
||||
void Clear_Canvas();
|
||||
virtual class CGameObject* Get_Canvas(const wstring& Name);
|
||||
virtual _int Canvas_Count();
|
||||
virtual const vector<wstring> Canvas_Name();
|
||||
|
||||
void Add_Manager_Event(_wstring Name, function<void(void*)> Event);
|
||||
void Event_Callback(_wstring Name, void* pArg = nullptr);
|
||||
private:
|
||||
void Add_Canvas(_wstring Name, class CGameObject* pCanvas);
|
||||
CGameObject* Find_Canvas(const _wstring& Name);
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pGamePlay_Canves= { nullptr };
|
||||
CGameObject* m_pSpell_Panel = { nullptr };
|
||||
CGameObject* m_pGamePlay_Canves = { nullptr };
|
||||
CGameObject* m_pSpell_Canvas = { nullptr };
|
||||
CGameObject* m_pMouse_Cursor = { nullptr };
|
||||
CGameObject* m_pCamera_LockOn = { nullptr };
|
||||
_bool m_bCanvas_Change = { false };
|
||||
|
||||
UI_STATE m_eType{};
|
||||
|
||||
vector<class CGameObject*> m_Canvases; // 캔버스가 패널들을 관리 하기 위해서 필요함
|
||||
vector<wstring> m_CanvasNames; // 패널들의 이름을 전해주기 위해서
|
||||
map<wstring, class CGameObject*> m_Canvas_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서
|
||||
_int m_iCanvas_Count{}; // 전체 패널의 갯수
|
||||
|
||||
multimap<wstring, function<void(void*)>> m_Event_map;
|
||||
|
||||
|
||||
public:
|
||||
static CUI_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user