commit
This commit is contained in:
@@ -88,7 +88,7 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Up(DIK_O)) {
|
||||
if (m_pGameInstance->Key_Up(DIK_INSERT)) {
|
||||
m_pBinded_Camera->Toggle_Priority();
|
||||
}
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
|
||||
|
||||
@@ -47,10 +47,7 @@ void CEffectParts::Update(_float fTimeDelta)
|
||||
if (m_pInstance_ModelCom == nullptr)
|
||||
return;
|
||||
|
||||
m_pInstance_ModelCom->Drop(fTimeDelta);
|
||||
|
||||
if (m_EffectInfo.isBillboard)
|
||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||
|
||||
|
||||
}
|
||||
@@ -64,6 +61,9 @@ void CEffectParts::Late_Update(_float fTimeDelta)
|
||||
if (m_pInstance_ModelCom == nullptr)
|
||||
return;
|
||||
|
||||
m_pInstance_ModelCom->Drop(fTimeDelta);
|
||||
|
||||
|
||||
if (m_EffectInfo.isBillboard)
|
||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||
|
||||
|
||||
@@ -628,6 +628,7 @@ void CPlayer::Behavior_CombatEnter()
|
||||
case STATEANIM::DEPULSO:
|
||||
pairAnimInfo = m_Animation[STATEANIM::DEPULSO];
|
||||
m_eSpell = STATEANIM::END;
|
||||
|
||||
break;
|
||||
case STATEANIM::DIFFINDO:
|
||||
pairAnimInfo = m_Animation[STATEANIM::DIFFINDO];
|
||||
|
||||
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.
@@ -39,6 +39,7 @@ struct ParticleValue
|
||||
float fSizeDrag;
|
||||
float3 vDeltaSize;
|
||||
float2 vDelay;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -101,7 +102,7 @@ void CS_MAIN(
|
||||
{
|
||||
if (isNoWorld)
|
||||
{
|
||||
float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation };
|
||||
row_major float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation };
|
||||
|
||||
|
||||
CurMat = mul(CurMat, WorldMatrix);
|
||||
@@ -112,6 +113,7 @@ void CS_MAIN(
|
||||
particle.vTranslation = CurMat[3].xyzw;
|
||||
}
|
||||
}
|
||||
|
||||
// 라이프타임 움직임
|
||||
particle.vLifeTime.x += fTimeDelta;
|
||||
|
||||
@@ -151,21 +153,26 @@ void CS_MAIN(
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 1.f);
|
||||
float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 0.f);
|
||||
|
||||
particle.vTranslation += vVelocity * fTimeDelta * fDrag;
|
||||
}
|
||||
|
||||
if (isPivotMove)
|
||||
{
|
||||
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
|
||||
|
||||
float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz);
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
float fRatio = (1 - fTime * fTime);
|
||||
|
||||
float fDrag = particleValue.fDrag * fRatio;
|
||||
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
float4 vVelocity = vector(vDir * particleValue.fSpeed, 1.f);
|
||||
float4 vVelocity = vector(vDir * particleValue.fSpeed , 0.f);
|
||||
|
||||
particle.vTranslation += vVelocity * fTimeDelta * fDrag;
|
||||
|
||||
|
||||
@@ -255,10 +255,14 @@ float4 DrawEffect(PS_IN In)
|
||||
float2 vDistortionUVMoveTime = g_ParticleValue[In.iGPUIndex].vDistortionUVMoveTime;
|
||||
float2 vDelay = g_ParticleValue[In.iGPUIndex].vDelay;
|
||||
|
||||
if (vDelay.x < vDelay.y)
|
||||
if (vDelay.y > FLT_EPSILON5)
|
||||
{
|
||||
discard;
|
||||
if (vDelay.x <= vDelay.y)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (g_isDiffuse == true)
|
||||
{
|
||||
@@ -740,6 +744,8 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
|
||||
|
||||
//int2 iTexel = int2(In.vPosition.xy);
|
||||
|
||||
//float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r;
|
||||
@@ -751,7 +757,9 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In)
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse + EmissiveDraw(In);
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -781,7 +789,7 @@ technique11 DefaultTechnique
|
||||
pass Blur
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_BLUR();
|
||||
GeometryShader = NULL;
|
||||
@@ -811,7 +819,7 @@ technique11 DefaultTechnique
|
||||
pass BLUR_NO_WORLD
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_BLUR_NOWORLD();
|
||||
GeometryShader = NULL;
|
||||
@@ -822,8 +830,8 @@ technique11 DefaultTechnique
|
||||
pass BLEND
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetDepthStencilState(DSS_Effect, 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_BLEND();
|
||||
@@ -832,8 +840,8 @@ technique11 DefaultTechnique
|
||||
pass BLEND_NOWORLD
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_NOWORLD();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLEND();
|
||||
|
||||
@@ -249,6 +249,7 @@
|
||||
<ClInclude Include="..\public\NoMountIcon.h" />
|
||||
<ClInclude Include="..\Public\Player.h" />
|
||||
<ClInclude Include="..\public\Potion.h" />
|
||||
<ClInclude Include="..\Public\Levioso.h" />
|
||||
<ClInclude Include="..\Public\Revelio.h" />
|
||||
<ClInclude Include="..\Public\Protego.h" />
|
||||
<ClInclude Include="..\public\Slot_Number.h" />
|
||||
@@ -391,6 +392,7 @@
|
||||
<ClCompile Include="..\Private\Player.cpp" />
|
||||
<ClCompile Include="..\Private\Player_States.cpp" />
|
||||
<ClCompile Include="..\private\Potion.cpp" />
|
||||
<ClCompile Include="..\Private\Levioso.cpp" />
|
||||
<ClCompile Include="..\Private\Revelio.cpp" />
|
||||
<ClCompile Include="..\Private\Protego.cpp" />
|
||||
<ClCompile Include="..\private\Slot_Number.cpp" />
|
||||
|
||||
@@ -394,6 +394,9 @@
|
||||
<Filter Include="02.GameObjects\Layer_Effect\Effect\09.Revelio">
|
||||
<UniqueIdentifier>{03dca491-c8d3-4204-b450-b6089287aa3d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Layer_Effect\Effect\10.Levioso">
|
||||
<UniqueIdentifier>{c87ea325-8242-4bc4-aec7-b102a5b1c847}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -768,6 +771,9 @@
|
||||
<ClInclude Include="..\Public\Revelio.h">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\09.Revelio</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Levioso.h">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\10.Levioso</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1141,6 +1147,9 @@
|
||||
<ClCompile Include="..\Private\Revelio.cpp">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\09.Revelio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Levioso.cpp">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\10.Levioso</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -73,7 +73,6 @@ void CBombard::Late_Update(_float fTimeDelta)
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBombard::Pre_Setting(CGameObject* pObject)
|
||||
|
||||
@@ -88,7 +88,7 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Up(DIK_O)) {
|
||||
if (m_pGameInstance->Key_Up(DIK_INSERT)) {
|
||||
m_pBinded_Camera->Toggle_Priority();
|
||||
}
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
|
||||
|
||||
@@ -46,7 +46,6 @@ void CEditEffect::Update(_float fTimeDelta)
|
||||
if (m_pInstance_ModelCom == nullptr)
|
||||
return;
|
||||
|
||||
m_pInstance_ModelCom->Drop(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
@@ -60,6 +59,9 @@ void CEditEffect::Late_Update(_float fTimeDelta)
|
||||
if (m_pInstance_ModelCom == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
m_pInstance_ModelCom->Drop(fTimeDelta);
|
||||
|
||||
if (m_EffectInfo.isBillboard)
|
||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ HRESULT CEffectObject::Render_Blur()
|
||||
|
||||
SHADER_PASS_INSTANCE_MODEL BlurPass = {};
|
||||
|
||||
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD)
|
||||
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::BLEND_NOWORLD)
|
||||
{
|
||||
BlurPass = SHADER_PASS_INSTANCE_MODEL::NON_WORLD_BLUR;
|
||||
}
|
||||
@@ -132,10 +132,21 @@ HRESULT CEffectObject::Render_Bloom()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SHADER_PASS_INSTANCE_MODEL BloomPass = {};
|
||||
|
||||
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::BLEND_NOWORLD)
|
||||
{
|
||||
BloomPass = SHADER_PASS_INSTANCE_MODEL::BLOOM_NOWORLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
BloomPass = SHADER_PASS_INSTANCE_MODEL::BLOOM;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::BLOOM)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(BloomPass)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "Decendo.h"
|
||||
#include "Protego.h"
|
||||
#include "Revelio.h"
|
||||
#include "Levioso.h"
|
||||
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -38,6 +39,7 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Effect()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -163,6 +165,16 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CLevioso* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CLevioso>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -204,6 +216,33 @@ HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Reset_Pool()
|
||||
{
|
||||
for (size_t i = 0; i < ENUM_CLASS(SKILL_TYPE::END); i++)
|
||||
{
|
||||
for (auto& pEffect : m_EffectList[i])
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
}
|
||||
|
||||
m_EffectList[i].clear();
|
||||
}
|
||||
|
||||
for (auto& pEffect : m_ActiveEffectList)
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
}
|
||||
|
||||
|
||||
m_ActiveEffectList.clear();
|
||||
|
||||
|
||||
if (FAILED(Ready_Effect()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
CEffectPool* CEffectPool::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
@@ -243,14 +282,25 @@ void CEffectPool::Free()
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
}
|
||||
|
||||
m_EffectList[i].clear();
|
||||
}
|
||||
|
||||
for (auto& pEffect : m_ActiveEffectList)
|
||||
{
|
||||
SAFE_RELEASE(pEffect);
|
||||
|
||||
|
||||
}
|
||||
|
||||
m_ActiveEffectList.clear();
|
||||
}
|
||||
|
||||
void CEffectPool::Describe_Entity()
|
||||
{
|
||||
if(GUI::Button("Reset Pool"))
|
||||
{
|
||||
Reset_Pool();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "GameInstance.h"
|
||||
#include "EditEffect.h"
|
||||
#include "TrailObject.h"
|
||||
#include "EffectPool.h"
|
||||
#include "Layer.h"
|
||||
|
||||
|
||||
#include <sstream>
|
||||
@@ -55,6 +57,8 @@ HRESULT CEffect_Editor::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
||||
SAFE_ADDREF(m_pEffectPool);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -521,6 +525,7 @@ void CEffect_Editor::Free()
|
||||
|
||||
SAFE_RELEASE(m_pEditEffect);
|
||||
SAFE_RELEASE(m_pTrailObject);
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
}
|
||||
|
||||
void CEffect_Editor::Describe_Entity()
|
||||
@@ -770,6 +775,11 @@ void CEffect_Editor::Describe_Entity()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
m_pEffectPool->Describe_Entity();
|
||||
|
||||
ImGui::End();
|
||||
|
||||
}
|
||||
|
||||
@@ -42,14 +42,16 @@ HRESULT CLevel_EffectViewer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함!
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffect_Editor>(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, TEXT("Layer_Editor"))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Plane>(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함!
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER)))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -0,0 +1,262 @@
|
||||
#include "pch.h"
|
||||
#include "Levioso.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EditEffect.h"
|
||||
#include "Player.h"
|
||||
#include "TrailObject.h"
|
||||
#include "Dummy_PhysXEffectHitBox.h"
|
||||
|
||||
|
||||
CLevioso::CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CLevioso::CLevioso(const CLevioso& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CLevioso::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevioso::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Levioso")))
|
||||
return E_FAIL;
|
||||
|
||||
m_pLeviosoPJ_0 = Get_PartObject<CEditEffect>("Levioso_PJ0");
|
||||
m_pLeviosoPJ_1 = Get_PartObject<CEditEffect>("Levioso_PJ1");
|
||||
m_pLeviosoTrail = Get_PartObject<CTrailObject>("Levioso_Trail");
|
||||
m_pTrail_PT_0 = Get_PartObject<CEditEffect>("Trail_PT0");
|
||||
|
||||
SAFE_ADDREF(m_pLeviosoPJ_0);
|
||||
SAFE_ADDREF(m_pLeviosoPJ_1);
|
||||
SAFE_ADDREF(m_pLeviosoTrail);
|
||||
SAFE_ADDREF(m_pTrail_PT_0);
|
||||
|
||||
m_wstrEffectName = L"Levioso";
|
||||
|
||||
m_fDuration = 1.5f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLevioso::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->RewindMomentum();
|
||||
}
|
||||
}
|
||||
|
||||
void CLevioso::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
m_pLeviosoPJ_0->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
m_pLeviosoPJ_1->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
|
||||
|
||||
m_pTrail_PT_0->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vOwnerLook * 0.5f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CLevioso::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
CPlayer* pPlayer = static_cast<CPlayer*>(m_pOwner);
|
||||
|
||||
if (pPlayer == nullptr)
|
||||
return;
|
||||
|
||||
_matrix WandWorld = pPlayer->Get_WandPos();
|
||||
|
||||
m_pLeviosoTrail->Get_Component<CTrail>()->Fixed_Trail(WandWorld);
|
||||
|
||||
m_pLeviosoTrail->Trail_Update(m_pTrail_PT_0->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevioso::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pOwner = pObject;
|
||||
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
|
||||
|
||||
CPlayer* pPlayer = static_cast<CPlayer*>(m_pOwner);
|
||||
|
||||
if (pPlayer == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
_vector WandPos = pPlayer->Get_WandPos().r[3];
|
||||
|
||||
m_pLeviosoPJ_0->Get_Component<CTransform>()->Set_WorldMatrix(m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix());
|
||||
m_pLeviosoPJ_1->Get_Component<CTransform>()->Set_WorldMatrix(m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix());
|
||||
m_pTrail_PT_0->Get_Component<CTransform>()->Set_WorldMatrix(m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix());
|
||||
|
||||
m_pLeviosoPJ_0->Get_Component<CTransform>()->Set_State(STATE::POSITION, WandPos);
|
||||
m_pLeviosoPJ_1->Get_Component<CTransform>()->Set_State(STATE::POSITION, WandPos);
|
||||
m_pTrail_PT_0->Get_Component<CTransform>()->Set_State(STATE::POSITION, WandPos);
|
||||
|
||||
|
||||
m_pLeviosoPJ_0 ->Set_Visible(true);
|
||||
m_pLeviosoPJ_1->Set_Visible(true);
|
||||
m_pTrail_PT_0->Set_Visible(true);
|
||||
|
||||
m_pLeviosoTrail->Set_Visible(true);
|
||||
m_pLeviosoTrail->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevioso::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevioso::Ready_Child()
|
||||
{
|
||||
CDummy_PhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vLifeTime = { 0.f, 1.5f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLevioso* CLevioso::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CLevioso* pInstance = new CLevioso(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLevioso");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CLevioso::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CLevioso* pInstance = new CLevioso(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CLevioso");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CLevioso::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
|
||||
|
||||
m_pLeviosoPJ_0->Set_Visible(false);
|
||||
m_pLeviosoPJ_1->Set_Visible(false);
|
||||
m_pTrail_PT_0->Set_Visible(false);
|
||||
m_pLeviosoTrail->Set_Visible(false);
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
}
|
||||
|
||||
void CLevioso::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
if(m_pPhysHitBox != nullptr)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pLeviosoPJ_0);
|
||||
SAFE_RELEASE(m_pLeviosoPJ_1);
|
||||
SAFE_RELEASE(m_pLeviosoTrail);
|
||||
SAFE_RELEASE(m_pTrail_PT_0);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CLevioso::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CLevioso::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
#include "Protego.h"
|
||||
#include "EffectPool.h"
|
||||
#include "Revelio.h"
|
||||
|
||||
#include "Levioso.h"
|
||||
#pragma endregion
|
||||
|
||||
#pragma region PHYSX_HEADER
|
||||
@@ -941,6 +941,9 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRevelio>(ENUM_CLASS(LEVEL::EFFECT), CRevelio::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLevioso>(ENUM_CLASS(LEVEL::EFFECT), CLevioso::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
/* For.Prototype_GameObject_Wand */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CWand>(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#pragma endregion
|
||||
|
||||
#include "EffectPool.h"
|
||||
#include "Protego.h"
|
||||
|
||||
#pragma region States
|
||||
void CPlayer::TestKeyInput(_float fTimeDelta)
|
||||
@@ -459,6 +458,10 @@ void CPlayer::Behavior_CombatEnter()
|
||||
case STATEANIM::DEPULSO:
|
||||
pairAnimInfo = m_Animation[STATEANIM::DEPULSO];
|
||||
m_eSpell = STATEANIM::END;
|
||||
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this);
|
||||
|
||||
break;
|
||||
case STATEANIM::DIFFINDO:
|
||||
pairAnimInfo = m_Animation[STATEANIM::DIFFINDO];
|
||||
|
||||
@@ -47,7 +47,7 @@ HRESULT CRevelio::Initialize(void* pArg)
|
||||
|
||||
|
||||
|
||||
m_fDuration = 1.5f;
|
||||
m_fDuration = 3.f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -67,16 +67,18 @@ void CRevelio::Update(_float fTimeDelta)
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
CPlayer* pPlayer = static_cast<CPlayer*>(m_pOwner);
|
||||
CPlayer* pPlayer = static_cast<CPlayer*>(m_pOwner);
|
||||
|
||||
if (pPlayer == nullptr)
|
||||
return;
|
||||
|
||||
_vector pPos = pPlayer->Get_WandPos().r[3];
|
||||
_matrix WandWorld = pPlayer->Get_WandPos();
|
||||
|
||||
m_pRevelioPT_Y->Get_Component<CTransform>()->Set_State(STATE::POSITION, pPos);
|
||||
m_pRevelioPT_R->Get_Component<CTransform>()->Set_State(STATE::POSITION, pPos);
|
||||
m_pRevelioPT_B->Get_Component<CTransform>()->Set_State(STATE::POSITION, pPos);
|
||||
/*_vector pPos = pPlayer->Get_WandPos().r[3];*/
|
||||
|
||||
m_pRevelioPT_Y->Get_Component<CTransform>()->Set_WorldMatrix(WandWorld);
|
||||
m_pRevelioPT_R->Get_Component<CTransform>()->Set_WorldMatrix(WandWorld);
|
||||
m_pRevelioPT_B->Get_Component<CTransform>()->Set_WorldMatrix(WandWorld);
|
||||
|
||||
}
|
||||
|
||||
@@ -97,6 +99,7 @@ HRESULT CRevelio::Pre_Setting(CGameObject* pObject)
|
||||
|
||||
m_pOwner = pObject;
|
||||
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
@@ -109,16 +112,22 @@ HRESULT CRevelio::Pre_Setting(CGameObject* pObject)
|
||||
if (pPlayer == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
_vector pPos = pPlayer->Get_WandPos().r[3];
|
||||
_matrix WandWorld = pPlayer->Get_WandPos();
|
||||
|
||||
m_pRevelioPT_Y->Get_Component<CTransform>()->Set_State(STATE::POSITION, pPos);
|
||||
m_pRevelioPT_R->Get_Component<CTransform>()->Set_State(STATE::POSITION, pPos);
|
||||
m_pRevelioPT_B->Get_Component<CTransform>()->Set_State(STATE::POSITION, pPos);
|
||||
/*_vector pPos = pPlayer->Get_WandPos().r[3];*/
|
||||
|
||||
m_pRevelioPT_Y->Get_Component<CTransform>()->Set_WorldMatrix(WandWorld);
|
||||
m_pRevelioPT_R->Get_Component<CTransform>()->Set_WorldMatrix(WandWorld);
|
||||
m_pRevelioPT_B->Get_Component<CTransform>()->Set_WorldMatrix(WandWorld);
|
||||
|
||||
m_pRevelioPT_Y->Set_Visible(true);
|
||||
m_pRevelioPT_R->Set_Visible(true);
|
||||
m_pRevelioPT_B->Set_Visible(true);
|
||||
|
||||
|
||||
Get_PartObject<CEditEffect>("Revelio_Ring")->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
Get_PartObject<CEditEffect>("Revelio_Ring")->Set_Visible(true);
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Editor
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END };
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
enum class SKILL_TYPE{ JAP , BOMBARD , DECENDO , PROTEGO , REVELIO ,END };
|
||||
enum class SKILL_TYPE{ JAP , BOMBARD , DECENDO , PROTEGO , REVELIO , LEVIOSO ,END };
|
||||
enum class BLOOM_TYPE { NONE , BASIC , MULTIPLY , END};
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ class CEffectPool final : public CGameObject
|
||||
public:
|
||||
HRESULT Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel , function<class CEffect_Container*(_uint , _uint)> AddPrototypeEvent);
|
||||
HRESULT Use_Skill(SKILL_TYPE eType , CGameObject* pOwner);
|
||||
public:
|
||||
#ifdef _DEBUG
|
||||
HRESULT Reset_Pool();
|
||||
#endif
|
||||
private:
|
||||
list<class CEffect_Container*> m_EffectList[ENUM_CLASS(SKILL_TYPE::END)] = {};
|
||||
list<class CEffect_Container*> m_ActiveEffectList = {};
|
||||
|
||||
@@ -54,6 +54,9 @@ class CEffect_Editor final : public CEffect_Container
|
||||
_string m_strTrailSavePath = {};
|
||||
_string m_strPackageSavePath = {};
|
||||
|
||||
private:
|
||||
class CEffectPool* m_pEffectPool = nullptr;
|
||||
|
||||
public:
|
||||
static CEffect_Editor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CLevioso final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CLevioso(const CLevioso& rhs);
|
||||
virtual ~CLevioso() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPlayer* m_pPlayer = {};
|
||||
|
||||
class CEditEffect* m_pLeviosoPJ_0 = { nullptr };
|
||||
class CEditEffect* m_pLeviosoPJ_1 = { nullptr };
|
||||
class CTrailObject* m_pLeviosoTrail = { nullptr };
|
||||
class CEditEffect* m_pTrail_PT_0 = { nullptr };
|
||||
|
||||
_vector m_vOwnerLook = {};
|
||||
public:
|
||||
static CLevioso* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -102,7 +102,7 @@ void CS_MAIN(
|
||||
{
|
||||
if (isNoWorld)
|
||||
{
|
||||
float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation };
|
||||
row_major float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation };
|
||||
|
||||
|
||||
CurMat = mul(CurMat, WorldMatrix);
|
||||
@@ -153,21 +153,26 @@ void CS_MAIN(
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 1.f);
|
||||
float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 0.f);
|
||||
|
||||
particle.vTranslation += vVelocity * fTimeDelta * fDrag;
|
||||
}
|
||||
|
||||
if (isPivotMove)
|
||||
{
|
||||
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
|
||||
|
||||
float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz);
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
float fRatio = (1 - fTime * fTime);
|
||||
|
||||
float fDrag = particleValue.fDrag * fRatio;
|
||||
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
float4 vVelocity = vector(vDir * particleValue.fSpeed, 1.f);
|
||||
float4 vVelocity = vector(vDir * particleValue.fSpeed , 0.f);
|
||||
|
||||
particle.vTranslation += vVelocity * fTimeDelta * fDrag;
|
||||
|
||||
|
||||
@@ -149,6 +149,18 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix)
|
||||
|
||||
}
|
||||
|
||||
if (m_isFixedTrail == true)
|
||||
{
|
||||
//만약 고정된 트레일을 켰다면 가장 첫번째 부분을 항상 내 위치로 고정함
|
||||
|
||||
_vector vLow = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vLow), m_FixedMat);
|
||||
_vector vHigh = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vHigh), m_FixedMat);
|
||||
|
||||
XMStoreFloat3(&m_pVertices[m_iNumCount - 2].vPosition, vLow);
|
||||
XMStoreFloat3(&m_pVertices[m_iNumCount -1].vPosition, vHigh);
|
||||
|
||||
}
|
||||
|
||||
//XMStoreFloat3(&m_pVertices[0].vPosition, vLow);
|
||||
//XMStoreFloat3(&m_pVertices[1].vPosition, vHigh);
|
||||
|
||||
@@ -211,6 +223,14 @@ HRESULT CTrail::Load_Trail(HANDLE hFile)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTrail::Fixed_Trail(_fmatrix WorldMatrix)
|
||||
{
|
||||
m_isFixedTrail = true;
|
||||
m_FixedMat = WorldMatrix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CTrail::Render()
|
||||
{
|
||||
if (m_iNumCount < 4)
|
||||
|
||||
@@ -26,6 +26,9 @@ class ENGINE_DLL CTrail final :
|
||||
#endif
|
||||
HRESULT Load_Trail(HANDLE hFile);
|
||||
|
||||
public:
|
||||
void Fixed_Trail(_fmatrix WorldMatrix);
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
@@ -52,6 +55,9 @@ class ENGINE_DLL CTrail final :
|
||||
_float m_fTrailUpdateTime = {};
|
||||
|
||||
_uint m_iNumVerticesPerInstance = {};
|
||||
|
||||
_matrix m_FixedMat = {};
|
||||
_bool m_isFixedTrail = {};
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
Reference in New Issue
Block a user