diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/KeyFrame.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/KeyFrame.bin deleted file mode 100644 index a19061885..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/KeyFrame.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d32b8b61a6e5ed2b2c1d6472c01c06b85e86dd6edabe007a56990287dd52af18 -size 52 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/KeyFrame.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/KeyFrame.bin index 2993a3d52..12f29295b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/KeyFrame.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/KeyFrame.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:255aeed0c2ead35c236f29d46934403a18286b1ba545673576769952fe58ae90 +oid sha256:3f0e6a868bc07861d4cb0e0cd80ab163ac81805701331463b5401bf74c71e86d size 29 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/NFC_Broom.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/NFC_Broom.bin new file mode 100644 index 000000000..8e9877109 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/NFC_Broom.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:def7cba77513dd9a10ad40cd962fbb0678c343e91d251b748184520b5a94104f +size 12940862 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Npc_Broom.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Npc_Broom.fbx new file mode 100644 index 000000000..f9c6dbc12 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Npc_Broom.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e59bb5c07f3550596b5a4da0dd248027d19bb96bed84a1019849be6f77df174a +size 35534748 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 8c9469e55..760622fc7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -191,6 +191,28 @@ PS_OUT PS_Key_Hold_Rotation(PS_IN In) return Out; } +PS_OUT PS_Mission(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 Color = float4(0.f, 0.f, 0.f, 0.f); + + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + + tex1.a *= 0.5f; + + if (tex1.a >= 0.f) + Color = tex1; + + Color = lerp(Color, tex2, tex2.a); + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + PS_OUT PS_Sptire_Sheet(PS_IN In) { PS_OUT Out; @@ -320,13 +342,12 @@ PS_OUT PS_Rotation(PS_IN In) Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle); Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle); Rotation += center; - - float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); - float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); - float3 BGColor = float3(1.f, 1.f, 1.f); - + if (g_iSpellType == 0) { + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + tex1.rgb *= 0.4f; color = tex1; tex2.rgb *= 0.3f; @@ -337,9 +358,8 @@ PS_OUT PS_Rotation(PS_IN In) color.a *= Alpha; Out.vColor = color; + return Out; } - else - { //int iTotalFrame = g_iImageCountX * g_iImageCountY; //int iCurrentFrame = int(floor(g_fTime / g_fFrame)) % iTotalFrame; //int iFrameX = iCurrentFrame % g_iImageCountX; @@ -354,63 +374,50 @@ PS_OUT PS_Rotation(PS_IN In) //float4 tex3 = g_Texture2.Sample(DefaultSampler, UV); //if (tex3.r <= 0.5f) // discard; - switch (g_iSpellType) - { - case 1: - BGColor = float3(208.f, 179.f, 54.f) / 255.f; - tex1.rgb *= BGColor; - break; - - case 2: - BGColor = float3(89.f, 32.f, 215.f) / 255.f; - tex1.rgb *= BGColor; - break; - - case 3: - BGColor = float3(190.f, 46., 34.f) / 255.f; - tex1.rgb *= BGColor; - break; - - case 4: - BGColor = float3(37.f, 129.f, 162.f) / 255.f; - tex1.rgb *= BGColor; - break; - - case 5: - BGColor = float3(134.f, 171.f, 78.f) / 255.f; - tex1.rgb *= BGColor; - break; - - case 6: - BGColor = float3(0.f, 80.f, 55.f) / 255.f; - tex1.rgb *= BGColor; - break; - - case 7: - BGColor = float3(0.f, 0.f, 0.f); - tex1.rgb *= BGColor; - break; - } - - color = tex1; + float3 BGColor = float3(1.f, 1.f, 1.f); - //color = tex3; - - if (tex2.a >= 0.9f) - color = tex2; - - float CoolTime = 1.f - g_fDeltaV; - - if (In.vTexcoord.y <= CoolTime) - { - color.a = 0.f; - } - - color.a *= Alpha; - - Out.vColor = color; + switch (g_iSpellType) + { + case 1: + BGColor = float3(208.f, 179.f, 54.f) / 255.f; + break; + case 2: + BGColor = float3(89.f, 32.f, 215.f) / 255.f; + break; + case 3: + BGColor = float3(190.f, 46., 34.f) / 255.f; + break; + case 4: + BGColor = float3(37.f, 129.f, 162.f) / 255.f; + break; + case 5: + BGColor = float3(134.f, 171.f, 78.f) / 255.f; + break; + case 6: + BGColor = float3(0.f, 80.f, 55.f) / 255.f; + break; + case 7: + BGColor = float3(0.f, 0.f, 0.f); + break; } - + + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + tex1.rgb *= BGColor; + float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); + if (tex2.a >= 0.9f) + tex1 = tex2; + color = tex1; + //color = tex3; + + float CoolTime = 1.f - g_fDeltaV; + if (In.vTexcoord.y <= CoolTime) + { + color.a = 0.f; + } + + + color.a *= Alpha; + Out.vColor = color; return Out; } @@ -520,6 +527,16 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Key_Hold_Rotation(); } + pass Mission + { + 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_Mission(); + } + pass QuestType { SetRasterizerState(RS_Default); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_ConjurationHUDPanelBack.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_ConjurationHUDPanelBack.png index f38c19ae2..fe98a8774 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_ConjurationHUDPanelBack.png and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Action/UI_T_ConjurationHUDPanelBack.png differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index c13a4f901..5ed316e18 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -166,6 +166,7 @@ + @@ -225,11 +226,14 @@ + + + @@ -277,6 +281,7 @@ + @@ -336,11 +341,14 @@ + + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index db22f9b55..c149e7351 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -301,6 +301,18 @@ {b017e167-f48d-4417-a924-765ab802cff5} + + {3614836d-9988-4ec0-95a8-f8ebc25a9a13} + + + {98f012a4-2f13-456f-85ba-6929b1535de6} + + + {3ad2f4c4-95e6-47fa-9f4c-b9fcdbd77277} + + + {a9862861-6eaa-4e04-b7f6-217a32db7db4} + @@ -591,6 +603,18 @@ 80.State\State_Combat + + 80.State\State_Combat\State_Skill2 + + + 80.State\State_Idle\State_Idle_Turn + + + 80.State\State_Move\State_Jog + + + 02.GameObjects\Broom + @@ -877,6 +901,18 @@ 80.State\State_Combat + + 80.State\State_Combat\State_Skill2 + + + 80.State\State_Idle\State_Idle_Turn + + + 80.State\State_Move\State_Jog + + + 02.GameObjects\Broom + diff --git a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp index b7f3e6005..c58f2101c 100644 --- a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp @@ -6,12 +6,12 @@ #include "Spell_Overlay.h" CAction_Panel::CAction_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CPanelObject(pDevice, pContext) + :CPanelObject(pDevice, pContext) { } CAction_Panel::CAction_Panel(const CAction_Panel& rhs) - :CPanelObject(rhs) + :CPanelObject(rhs) { } @@ -74,8 +74,7 @@ void CAction_Panel::Late_Update(_float fTimeDelta) } if (m_bVisible) { - _float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]); - m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } __super::Late_Update(fTimeDelta); diff --git a/Jusin154_Team3D/Editor/Private/Broom.cpp b/Jusin154_Team3D/Editor/Private/Broom.cpp new file mode 100644 index 000000000..24541bd2b --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Broom.cpp @@ -0,0 +1,166 @@ +#include "pch.h" +#include "Broom.h" + +#include "GameInstance.h" + +CBroom::CBroom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CGameObject(pDevice, pContext) +{ +} + +CBroom::CBroom(const CBroom& Prototype) + : CGameObject(Prototype) +{ +} + +HRESULT CBroom::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CBroom::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + + if (FAILED(Ready_Components())) + return E_FAIL; + + m_pModelCom->Set_AnimationIndex(5); + + return S_OK; +} + +void CBroom::Priority_Update(_float fTimeDelta) +{ +} + +void CBroom::Update(_float fTimeDelta) +{ + m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); +} + +void CBroom::Late_Update(_float fTimeDelta) +{ + m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this); +} + +HRESULT CBroom::Render() +{ + if (!m_pModelCom) + return S_OK; + + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + + _uint iNumMeshes = m_pModelCom->Get_NumMeshes(); + + for (_uint i = 0; i < iNumMeshes; i++) + { + if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) { + return E_FAIL; + } + + if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) { + return E_FAIL; + } + if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) { + return E_FAIL; + } + + if (FAILED(m_pModelCom->Render(i))) { + return E_FAIL; + } + } + + return S_OK; +} + +HRESULT CBroom::Ready_Components() +{ + CTransform::TRANSFORM_DESC Desc = {}; + + Desc.fSpeedPerSec = 10.f; + Desc.fRotationPerSec = XMConvertToRadians(180.0f); + Desc.fRadius = 10.f; + + __super::Ready_Components(&Desc); + + /* Com_Model */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Broom_Model"), + reinterpret_cast(&m_pModelCom)))) + return E_FAIL; + + /* Com_Shader */ + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH, + reinterpret_cast(&m_pShaderCom)))) + return E_FAIL; + + return S_OK; +} + +HRESULT CBroom::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { + return E_FAIL; + } + + return S_OK; +} + +CBroom* CBroom::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CBroom* pInstance = new CBroom(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CBroom"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CBroom::Clone(void* pArg, CGameObject* pOwner) +{ + CBroom* pInstance = new CBroom(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CBroom"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CBroom::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pModelCom); + + +} + +void CBroom::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/DebugCamera.cpp b/Jusin154_Team3D/Editor/Private/DebugCamera.cpp index 803bda53a..2952b68c6 100644 --- a/Jusin154_Team3D/Editor/Private/DebugCamera.cpp +++ b/Jusin154_Team3D/Editor/Private/DebugCamera.cpp @@ -18,6 +18,7 @@ void CDebugCamera::Priority_Update(_float fTimeDelta) void CDebugCamera::Update(_float fTimeDelta) { + Transition(fTimeDelta); _float3 vCamPos = {}; XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION)); GUI::Text("Cam Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z); diff --git a/Jusin154_Team3D/Editor/Private/Goblin.cpp b/Jusin154_Team3D/Editor/Private/Goblin.cpp index e013c8b73..a444dbf36 100644 --- a/Jusin154_Team3D/Editor/Private/Goblin.cpp +++ b/Jusin154_Team3D/Editor/Private/Goblin.cpp @@ -145,6 +145,7 @@ CGameObject* CGoblin::Clone(void* pArg, CGameObject* pOwner) void CGoblin::Free() { __super::Free(); + } void CGoblin::Describe_Entity() diff --git a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp index 96c5b8014..2ae091489 100644 --- a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp @@ -17,7 +17,7 @@ #include "Terrain.h" #include "Player.h" #include "Goblin.h" - +#include "Broom.h" CLevel_ObjectViewer::CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } { @@ -368,9 +368,12 @@ void CLevel_ObjectViewer::Dummy_Object_Setting() GUI::Begin("Object_Info"); if (!m_Objects.empty()) { - _float3 Pos; - XMStoreFloat3(&Pos, m_Objects[m_iObjectIndex]->Get_Component()->Get_State(STATE::POSITION)); - GUI::DragFloat3("Pos", (_float*)&Pos); + _float4 Pos; + XMStoreFloat4(&Pos, m_Objects[m_iObjectIndex]->Get_Component()->Get_State(STATE::POSITION)); + if (GUI::DragFloat3("Pos", (_float*)&Pos)) + { + m_Objects[m_iObjectIndex]->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&Pos)); + } Show_ObjectList(); @@ -700,6 +703,9 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag) if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) + return E_FAIL; + return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 67838c4a6..ed87c6717 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -22,6 +22,7 @@ #include "DummyObject.h" #include "Player.h" #include "Goblin.h" +#include "Broom.h" #include #pragma endregion @@ -1149,6 +1150,11 @@ HRESULT CLoader::Loading_For_ObjectViewer() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin::Create(m_pDevice, m_pContext)))) return E_FAIL; + + /* For.Prototype_GameObject_Broom */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBroom::Create(m_pDevice, m_pContext)))) + return E_FAIL; + m_strMessage = TEXT("Loading Success!"); m_isFinished = true; diff --git a/Jusin154_Team3D/Editor/Private/MissionBanner_Border.cpp b/Jusin154_Team3D/Editor/Private/MissionBanner_Border.cpp index 7db4ad29f..e09d48b4e 100644 --- a/Jusin154_Team3D/Editor/Private/MissionBanner_Border.cpp +++ b/Jusin154_Team3D/Editor/Private/MissionBanner_Border.cpp @@ -21,8 +21,8 @@ HRESULT CMissionBanner_Border::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -248.f; - Desc.fY = 100.f; + Desc.fX = -207.f; + Desc.fY = 150.f; Desc.fSizeX = 256.f; Desc.fSizeY = 128.f; @@ -38,11 +38,16 @@ HRESULT CMissionBanner_Border::Initialize(void* pArg) } m_fTimeMult = 3.f; - m_fAlpha = 1.f; - m_fAlphaTime = 3.f; - - m_vUVScale = _float2(1.f,1.f); - + m_fAlpha = 0.f; + m_fAlphaTime = 5.f; + m_fMoveSpeed = 5.f; + m_fLerpX = m_fX; + m_fSortZ = 0.11f; + m_vUVScale = _float2(1.f, 1.f); + static_cast(m_pOwner)->Add_Function(TEXT("Missiom_On"), [this]() {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("Missiom_On"), [this]() {this->LerpOn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("Missiom_Off"), [this]() {this->Set_FadeOut(); }); + static_cast(m_pOwner)->Add_Function(TEXT("Missiom_Off"), [this]() {this->LerpOff(); }); return S_OK; } @@ -64,8 +69,11 @@ void CMissionBanner_Border::Update(_float fTimeDelta) if (m_bFadeIn == true) { + if (m_fAlpha <= 1.f) + { m_fAlpha += fTimeDelta * m_fAlphaTime; + } if (m_fAlpha >= 1.f) { @@ -76,8 +84,9 @@ void CMissionBanner_Border::Update(_float fTimeDelta) if (m_bFadeOut == true) { + if (m_fAlpha >= 0.f) - m_fAlpha -= fTimeDelta; + m_fAlpha -= fTimeDelta * m_fAlphaTime; if (m_fAlpha <= 0.f) { @@ -86,6 +95,17 @@ void CMissionBanner_Border::Update(_float fTimeDelta) } } + if (m_bLerpOn == true) + { + + Start_Lerp(m_fMoveSpeed); + } + + if (m_bLerpOff == true) + { + Reset_Pos(m_fMoveSpeed); + } + m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -109,7 +129,7 @@ HRESULT CMissionBanner_Border::Render() if (FAILED(Bind_ShaderResources())) { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::MISSION)))) { return E_FAIL; } if (FAILED(m_pVIBufferCom->Bind_Resources())) { @@ -141,7 +161,11 @@ HRESULT CMissionBanner_Border::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) { return E_FAIL; } @@ -165,10 +189,6 @@ HRESULT CMissionBanner_Border::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaV", &m_vUVScale.y, sizeof(_float)))) - { - return E_FAIL; - } if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4)))) { return E_FAIL; @@ -177,10 +197,7 @@ HRESULT CMissionBanner_Border::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_fCurrent_Position, sizeof(_float2)))) - { - return E_FAIL; - } + return S_OK; } @@ -194,6 +211,10 @@ HRESULT CMissionBanner_Border::Ready_Components(void* pArg) { return E_FAIL; } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ConjurationHUDPanelBack"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) { return E_FAIL; @@ -232,6 +253,7 @@ void CMissionBanner_Border::Free() { __super::Free(); + SAFE_RELEASE(m_pDiffuse_TextureCom1); SAFE_RELEASE(m_pDiffuse_TextureCom); SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); diff --git a/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp b/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp index e608c34d2..cd52289cb 100644 --- a/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp +++ b/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp @@ -21,8 +21,8 @@ HRESULT CMission_Icon::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -290.f; - Desc.fY = 103.f; + Desc.fX = -275.f; + Desc.fY = 145.f; Desc.fSizeX = 60.f; Desc.fSizeY = 60.f; @@ -38,9 +38,16 @@ HRESULT CMission_Icon::Initialize(void* pArg) } m_fTimeMult = 3.f; - m_fAlpha = 1.f; + m_fAlpha = 0.f; m_fAlphaTime = 3.f; + m_fMoveSpeed = 5.f; + m_fLerpX = m_fX; + m_fSortZ = 0.1f; m_eQuestType = QUESTYPE::MAIN; + static_cast(m_pOwner)->Add_Function(TEXT("Missiom_On"), [this]() {this->Set_FadeIn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("Missiom_On"), [this]() {this->LerpOn(); }); + static_cast(m_pOwner)->Add_Function(TEXT("Missiom_Off"), [this]() {this->Set_FadeOut(); }); + static_cast(m_pOwner)->Add_Function(TEXT("Missiom_Off"), [this]() {this->LerpOff(); }); m_iType = ENUM_CLASS(m_eQuestType); return S_OK; } @@ -89,6 +96,16 @@ void CMission_Icon::Update(_float fTimeDelta) m_fAlpha = 0.f; } } + if (m_bLerpOn == true) + { + + Start_Lerp(m_fMoveSpeed); + } + + if (m_bLerpOff == true) + { + Reset_Pos(m_fMoveSpeed); + } m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); @@ -144,7 +161,7 @@ HRESULT CMission_Icon::Bind_ShaderResources() 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_iType))) { return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/Mission_KeyHold.cpp b/Jusin154_Team3D/Editor/Private/Mission_KeyHold.cpp index 3c3023a3a..8df1c44c9 100644 --- a/Jusin154_Team3D/Editor/Private/Mission_KeyHold.cpp +++ b/Jusin154_Team3D/Editor/Private/Mission_KeyHold.cpp @@ -3,12 +3,12 @@ #include "GameInstance.h" CMission_KeyHold::CMission_KeyHold(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CElementObject(pDevice, pContext) + :CElementObject(pDevice, pContext) { } CMission_KeyHold::CMission_KeyHold(const CMission_KeyHold& rhs) - :CElementObject(rhs) + :CElementObject(rhs) { } @@ -84,13 +84,39 @@ void CMission_KeyHold::Update(_float fTimeDelta) } } - if (m_pGameInstance->Key_Pressing(DIK_V)) + + if (m_bKeyHold == false) { - m_fTime += fTimeDelta * m_fTimeMult; + if (m_pGameInstance->Key_Pressing(DIK_V)) + { + m_fTime += fTimeDelta * m_fTimeMult; + } + else + { + m_fTime = 0.f; + m_bKeyHold = false; + } + } + + if (m_pGameInstance->Key_Up(DIK_V)) + { + m_bKeyHold = false; + } + + if (m_fTimeMult <= m_fTime) + { + m_fTime = 0.f; + m_bisHoldOn = !m_bisHoldOn; + m_bKeyHold = true; + } + + if (m_bisHoldOn) + { + static_cast(m_pOwner)->Function_Callback(TEXT("Missiom_On")); } else { - m_fTime = 0.f; + static_cast(m_pOwner)->Function_Callback(TEXT("Missiom_Off")); } __super::Update(fTimeDelta); diff --git a/Jusin154_Team3D/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp index 7a97db996..7e4df71e1 100644 --- a/Jusin154_Team3D/Editor/Private/Player.cpp +++ b/Jusin154_Team3D/Editor/Private/Player.cpp @@ -7,15 +7,18 @@ #pragma region STATE #include "State_Idle.h" #include "State_Walk.h" -#include "State_Dodge.h" +#include "State_Jog.h" #include "State_Sprint.h" +#include "State_Dodge.h" #include "State_Jump.h" #include "State_Skill.h" +#include "State_Skill2.h" #include "State_LightAttack.h" #include "State_Land.h" #include "State_Cast.h" #include "State_Move.h" #include "State_Combat.h" +#include "State_Idle_Turn.h" #pragma endregion CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -155,17 +158,19 @@ void CPlayer::Setup_InputConditions() { m_InputConditions = { - { FSMSTATE::MOVE, [&]() {return Check(FSMSTATE::WALK) && Check(FSMSTATE::SPRINT) && Check(FSMSTATE::JOG); }}, + { FSMSTATE::IDLE_TURN, [&]() { return m_pGameInstance->Key_Down(DIK_LEFT) || m_pGameInstance->Key_Down(DIK_RIGHT) || m_pGameInstance->Key_Down(DIK_DOWN); }}, + { FSMSTATE::MOVE, [&]() { return Check(FSMSTATE::WALK) || Check(FSMSTATE::SPRINT) || Check(FSMSTATE::JOG) || Check(FSMSTATE::DODGE); }}, { FSMSTATE::WALK, [&]() { return m_pGameInstance->Key_Pressing(DIK_UP) - || m_pGameInstance->Key_Pressing(DIK_DOWN); }}, + /*|| m_pGameInstance->Key_Pressing(DIK_DOWN)*/; }}, { FSMSTATE::WALK_FWD, [&]() { return m_pGameInstance->Key_Pressing(DIK_UP); }}, { FSMSTATE::WALK_BWD, [&]() { return m_pGameInstance->Key_Pressing(DIK_DOWN); }}, - { FSMSTATE::SPRINT, [&]() { return m_pGameInstance->Key_Pressing(DIK_LSHIFT) + { FSMSTATE::SPRINT, [&]() { return m_bSprintToggle && m_pGameInstance->Key_Pressing(DIK_UP); }}, - - { FSMSTATE::COMBAT, [&]() {return Check(FSMSTATE::DODGE) && Check(FSMSTATE::SKILL) && Check(FSMSTATE::LIGHT_ATTACK) && Check(FSMSTATE::CAST); }}, { FSMSTATE::DODGE, [&]() { return m_pGameInstance->Key_Down(DIK_LCONTROL); }}, + + { FSMSTATE::COMBAT, [&]() { return Check(FSMSTATE::SKILL) || Check(FSMSTATE::LIGHT_ATTACK) || Check(FSMSTATE::CAST) || Check(FSMSTATE::SKILL2); }}, { FSMSTATE::SKILL, [&]() { return m_pGameInstance->Key_Down(DIK_R); }}, + { FSMSTATE::SKILL2, [&]() { return m_pGameInstance->Key_Down(DIK_Q); }}, { FSMSTATE::LIGHT_ATTACK,[&]() { return m_pGameInstance->Mouse_Up(ENUM_CLASS(MOUSEKEYSTATE::LBUTTON)); }}, { FSMSTATE::CAST, [&]() { return m_pGameInstance->Key_Down(DIK_1); }}, @@ -185,6 +190,8 @@ void CPlayer::Key_Input(_float fTimeDelta) if (m_pGameInstance->Key_Pressing(DIK_RIGHT)) m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); } + + IsSprint(); } void CPlayer::Add_FSM() @@ -192,17 +199,20 @@ void CPlayer::Add_FSM() #pragma region MOVE m_pFSM->Add_State(FSMSTATE::MOVE, new CState_Move()); m_pFSM->Add_State(FSMSTATE::WALK, new CState_Walk()); + m_pFSM->Add_State(FSMSTATE::JOG, new CState_Jog()); m_pFSM->Add_State(FSMSTATE::SPRINT, new CState_Sprint()); + m_pFSM->Add_State(FSMSTATE::DODGE, new CState_Dodge()); #pragma endregion #pragma region COMBAT m_pFSM->Add_State(FSMSTATE::COMBAT, new CState_Combat()); m_pFSM->Add_State(FSMSTATE::SKILL, new CState_Skill()); + m_pFSM->Add_State(FSMSTATE::SKILL2, new CState_Skill2()); m_pFSM->Add_State(FSMSTATE::LIGHT_ATTACK, new CState_LightAttack()); m_pFSM->Add_State(FSMSTATE::CAST, new CState_Cast()); - m_pFSM->Add_State(FSMSTATE::DODGE, new CState_Dodge()); #pragma endregion m_pFSM->Add_State(FSMSTATE::IDLE, new CState_Idle()); + m_pFSM->Add_State(FSMSTATE::IDLE_TURN, new CState_Idle_Turn()); m_pFSM->Add_State(FSMSTATE::JUMP, new CState_Jump()); m_pFSM->Add_State(FSMSTATE::LAND, new CState_Land()); @@ -216,28 +226,44 @@ void CPlayer::Set_FSM() m_pFSM->Set_Parent(FSMSTATE::WALK_FWD, FSMSTATE::MOVE); m_pFSM->Set_Parent(FSMSTATE::JOG, FSMSTATE::MOVE); m_pFSM->Set_Parent(FSMSTATE::SPRINT, FSMSTATE::MOVE); + m_pFSM->Set_Parent(FSMSTATE::DODGE, FSMSTATE::MOVE); #pragma endregion #pragma region COMBAT m_pFSM->Set_Parent(FSMSTATE::SKILL, FSMSTATE::COMBAT); + m_pFSM->Set_Parent(FSMSTATE::SKILL2, FSMSTATE::COMBAT); m_pFSM->Set_Parent(FSMSTATE::LIGHT_ATTACK, FSMSTATE::COMBAT); m_pFSM->Set_Parent(FSMSTATE::CAST, FSMSTATE::COMBAT); - m_pFSM->Set_Parent(FSMSTATE::DODGE, FSMSTATE::COMBAT); #pragma endregion } void CPlayer::Set_Anim() { - m_Animation[FSMSTATE::IDLE] = { 266,true }; - m_Animation[FSMSTATE::DODGE] = { 802,false }; - m_Animation[FSMSTATE::WALK_FWD] = { 167,true }; - m_Animation[FSMSTATE::WALK_BWD] = { 166,true }; - m_Animation[FSMSTATE::SPRINT] = { 599,true }; - m_Animation[FSMSTATE::JUMP] = { 205,false }; - m_Animation[FSMSTATE::SKILL] = { 593,false }; - m_Animation[FSMSTATE::LIGHT_ATTACK] = { 413,false }; - m_Animation[FSMSTATE::LAND] = { 259,false }; - m_Animation[FSMSTATE::CAST] = { 696,false }; + + m_Animation[STATEANIM::DODGE] = { 802,false }; + + m_Animation[STATEANIM::JOG] = { 166,true }; + + m_Animation[STATEANIM::SKILL] = { 593,false }; + m_Animation[STATEANIM::SKILL2] = { 915,false }; + m_Animation[STATEANIM::LIGHT_ATTACK] = { 413,false }; + m_Animation[STATEANIM::LAND] = { 259,false }; + m_Animation[STATEANIM::CAST] = { 696,false }; + + m_Animation[STATEANIM::IDLE] = { 266,true }; + m_Animation[STATEANIM::IDLE_TURN_L] = { 270,false }; + m_Animation[STATEANIM::IDLE_TURN_R] = { 430,false }; + m_Animation[STATEANIM::IDLE_TURN_BWD] = { 268,false }; + + m_Animation[STATEANIM::WALK_FWD] = { 167,true }; + m_Animation[STATEANIM::WALK_BWD] = { 166,true }; + m_Animation[STATEANIM::WALK_STOP] = { 289,false }; + + m_Animation[STATEANIM::JUMP] = { 205,false }; + m_Animation[STATEANIM::JUMP_WALK] = { 203,false }; + m_Animation[STATEANIM::JUMP_SPRINT] = { 207,false }; + + m_Animation[STATEANIM::SPRINT] = { 599,true }; } CPlayer* CPlayer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -279,6 +305,21 @@ void CPlayer::Describe_Entity() GUI::Text(label); } + _float3 Pos; + XMStoreFloat3(&Pos, Get_WorldPostion()); + + float Pos3[3] = { Pos.x, Pos.y, Pos.z }; + GUI::DragFloat3("Pos", Pos3); + + + _float RotR,RotU,RotL; + RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT)); + RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP)); + RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK)); + + float Rot3[3] = { RotR, RotU,RotL }; + GUI::DragFloat3("Rot", Rot3); + } _bool CPlayer::Check(FSMSTATE::ESTATE state) @@ -290,3 +331,12 @@ _bool CPlayer::Check(FSMSTATE::ESTATE state) } return false; } + +_bool CPlayer::IsSprint() +{ + if (m_pGameInstance->Key_Down(DIK_LSHIFT)) + { + return m_bSprintToggle = !m_bSprintToggle; + } + return false; +} diff --git a/Jusin154_Team3D/Editor/Private/Spell_Image.cpp b/Jusin154_Team3D/Editor/Private/Spell_Image.cpp index c5a7aa9f4..2fb1a9823 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Image.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Image.cpp @@ -23,8 +23,8 @@ HRESULT CSpell_Image::Initialize(void* pArg) Desc.fX = -160.f; Desc.fY = 50.f; - Desc.fSizeX = 130.f; - Desc.fSizeY = 130.f; + Desc.fSizeX = 140.f; + Desc.fSizeY = 140.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) }; @@ -41,12 +41,14 @@ HRESULT CSpell_Image::Initialize(void* pArg) m_fAngle = XMConvertToRadians(-135.f); m_fAlpha = 1.f; m_fAlphaTime = 1.f; + m_fSortZ = 1.f; m_iSkillType = ENUM_CLASS(SKILLTYPE::SHADOW); return S_OK; } void CSpell_Image::Priority_Update(_float fTimeDelta) -{if (!__super::Chack_Visible()) +{ + if (!__super::Chack_Visible()) { return; } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp b/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp index 05c6ae259..9c7d3c578 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp @@ -23,8 +23,8 @@ HRESULT CSpell_Overlay::Initialize(void* pArg) Desc.fX = -160.f; Desc.fY = 50.f; - Desc.fSizeX = 130.f; - Desc.fSizeY = 130.f; + Desc.fSizeX = 140.f; + Desc.fSizeY = 140.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) }; @@ -44,8 +44,9 @@ HRESULT CSpell_Overlay::Initialize(void* pArg) m_fAngle = XMConvertToRadians(-135.f); m_fAlpha = 1.f; m_fAlphaTime = 1.f; - m_vUVScale.y = 1.f; + m_vUVScale.y = 1.f; m_fCoolTime = 5.f; + m_fSortZ = 1.f; m_iSkillType = ENUM_CLASS(SKILLTYPE::CONTROL); return S_OK; } @@ -182,7 +183,7 @@ HRESULT CSpell_Overlay::Bind_ShaderResources() if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) { return E_FAIL; - } + } if (FAILED(m_pShaderCom->Bind_RawValue("g_fFrame", &m_fFrame, sizeof(_float)))) { return E_FAIL; @@ -196,7 +197,7 @@ HRESULT CSpell_Overlay::Bind_ShaderResources() return E_FAIL; } if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSkillType, sizeof(_float)))) - { + { return E_FAIL; } if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) @@ -214,7 +215,7 @@ HRESULT CSpell_Overlay::Bind_ShaderResources() if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountY", &m_iImageFrameY, sizeof(_int)))) { return E_FAIL; - } + } if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaV", &m_vUVScale.y, sizeof(_float)))) { return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/Spell_Slot.cpp b/Jusin154_Team3D/Editor/Private/Spell_Slot.cpp index f5a2fcff9..13a2b9e6b 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Slot.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Slot.cpp @@ -84,7 +84,6 @@ void CSpell_Slot::Update(_float fTimeDelta) } } m_fTime += fTimeDelta * m_fTimeMult; - __super::Update(fTimeDelta); } @@ -95,11 +94,14 @@ void CSpell_Slot::Late_Update(_float fTimeDelta) { return; } - if (m_bVisible) { - if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) { + if (m_bVisible) + { + if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) + { m_pGameInstance->Add_RenderGroup(RENDER::UI, this); } } + __super::Late_Update(fTimeDelta); } HRESULT CSpell_Slot::Render() @@ -112,11 +114,11 @@ HRESULT CSpell_Slot::Render() { return E_FAIL; } - if (FAILED(m_pVIBufferCom->Bind_Resources())) + if (FAILED(m_pVIBufferCom->Bind_Resources())) { return E_FAIL; } - if (FAILED(m_pVIBufferCom->Render())) + if (FAILED(m_pVIBufferCom->Render())) { return E_FAIL; } @@ -176,7 +178,7 @@ HRESULT CSpell_Slot::Ready_Components(void* pArg) { return E_FAIL; } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_MeterIconBack_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Private/State_Cast.cpp b/Jusin154_Team3D/Editor/Private/State_Cast.cpp index f736fab28..3915da0eb 100644 --- a/Jusin154_Team3D/Editor/Private/State_Cast.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Cast.cpp @@ -13,7 +13,7 @@ void CState_Cast::Enter() if (m_pFSM->Get_PrevState() == FSMSTATE::CAST) return; - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::CAST); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::CAST); m_pModel->Set_AnimationIndex(anim.first, anim.second); } @@ -29,13 +29,6 @@ void CState_Cast::Exit() _bool CState_Cast::CheckExitState() { - if (m_pOwner->Check(FSMSTATE::WALK)) - { - m_pOwner->Reset_LightCombo(); - m_pFSM->Change_State(FSMSTATE::WALK); - return true; - } - if (m_pModel->IsFinishedAnim()) { m_pOwner->Reset_LightCombo(); @@ -54,7 +47,7 @@ _bool CState_Cast::CheckExitState() return true; } - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::CAST); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::CAST); m_pModel->Set_AnimationIndex(anim.first + combo, anim.second); m_pFSM->Change_State(FSMSTATE::CAST); @@ -62,6 +55,13 @@ _bool CState_Cast::CheckExitState() return true; } + if (m_pOwner->Check(FSMSTATE::SKILL2)) + { + m_pOwner->Reset_LightCombo(); + m_pFSM->Change_State(FSMSTATE::SKILL2); + return true; + } + return false; } diff --git a/Jusin154_Team3D/Editor/Private/State_Combat.cpp b/Jusin154_Team3D/Editor/Private/State_Combat.cpp index 616dec433..932fe1f57 100644 --- a/Jusin154_Team3D/Editor/Private/State_Combat.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Combat.cpp @@ -25,11 +25,23 @@ void CState_Combat::Exit() _bool CState_Combat::CheckExitState() { - if (m_pOwner->Check(FSMSTATE::MOVE)) + if (m_pOwner->Check(FSMSTATE::MOVE) && + !m_pOwner->Check(FSMSTATE::COMBAT)) { m_pFSM->Change_State(FSMSTATE::MOVE); + + if (m_pOwner->Check(FSMSTATE::WALK)) + m_pFSM->Change_State(FSMSTATE::WALK); + + if (m_pOwner->Check(FSMSTATE::SPRINT)) + m_pFSM->Change_State(FSMSTATE::SPRINT); + + if (m_pOwner->Check(FSMSTATE::DODGE)) + m_pFSM->Change_State(FSMSTATE::DODGE); + return true; } + return false; } diff --git a/Jusin154_Team3D/Editor/Private/State_Dodge.cpp b/Jusin154_Team3D/Editor/Private/State_Dodge.cpp index 53925868c..e2052ad0b 100644 --- a/Jusin154_Team3D/Editor/Private/State_Dodge.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Dodge.cpp @@ -10,7 +10,7 @@ CState_Dodge::CState_Dodge() void CState_Dodge::Enter() { - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::DODGE); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::DODGE); m_pModel->Set_AnimationIndex(anim.first, anim.second); } diff --git a/Jusin154_Team3D/Editor/Private/State_Idle.cpp b/Jusin154_Team3D/Editor/Private/State_Idle.cpp index c66342a9d..fc24940e1 100644 --- a/Jusin154_Team3D/Editor/Private/State_Idle.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Idle.cpp @@ -9,8 +9,17 @@ CState_Idle::CState_Idle() void CState_Idle::Enter() { - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::IDLE); - m_pModel->Set_AnimationIndex(anim.first, anim.second); + if (m_pFSM->Get_PrevState() == FSMSTATE::WALK) + { + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::WALK_STOP); + m_pModel->Set_AnimationIndex(anim.first, anim.second); + return; + } + else + { + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::IDLE); + m_pModel->Set_AnimationIndex(anim.first, anim.second); + } } void CState_Idle::Update(_float fTimeDelta) @@ -25,27 +34,43 @@ void CState_Idle::Exit() _bool CState_Idle::CheckExitState() { - if (m_pOwner->Check(FSMSTATE::WALK)) - m_pFSM->Change_State(FSMSTATE::WALK); + if (m_pOwner->Check(FSMSTATE::MOVE)) + { + m_pFSM->Change_State(FSMSTATE::MOVE); - if (m_pOwner->Check(FSMSTATE::DODGE)) - m_pFSM->Change_State(FSMSTATE::DODGE); + if (m_pOwner->Check(FSMSTATE::WALK)) + m_pFSM->Change_State(FSMSTATE::WALK); - if (m_pOwner->Check(FSMSTATE::SPRINT)) - m_pFSM->Change_State(FSMSTATE::SPRINT); + if (m_pOwner->Check(FSMSTATE::SPRINT)) + m_pFSM->Change_State(FSMSTATE::SPRINT); + + if (m_pOwner->Check(FSMSTATE::DODGE)) + m_pFSM->Change_State(FSMSTATE::DODGE); + } + + if (m_pOwner->Check(FSMSTATE::COMBAT)) + { + m_pFSM->Change_State(FSMSTATE::COMBAT); + + if (m_pOwner->Check(FSMSTATE::SKILL)) + m_pFSM->Change_State(FSMSTATE::SKILL); + + if (m_pOwner->Check(FSMSTATE::SKILL2)) + m_pFSM->Change_State(FSMSTATE::SKILL2); + + if (m_pOwner->Check(FSMSTATE::LIGHT_ATTACK)) + m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); + + if (m_pOwner->Check(FSMSTATE::CAST)) + m_pFSM->Change_State(FSMSTATE::CAST); + } + + if (m_pOwner->Check(FSMSTATE::IDLE_TURN)) + m_pFSM->Change_State(FSMSTATE::IDLE_TURN); if (m_pOwner->Check(FSMSTATE::JUMP)) m_pFSM->Change_State(FSMSTATE::JUMP); - if (m_pOwner->Check(FSMSTATE::SKILL)) - m_pFSM->Change_State(FSMSTATE::SKILL); - - if (m_pOwner->Check(FSMSTATE::LIGHT_ATTACK)) - m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); - - if (m_pOwner->Check(FSMSTATE::CAST)) - m_pFSM->Change_State(FSMSTATE::CAST); - return false; } diff --git a/Jusin154_Team3D/Editor/Private/State_Idle_Turn.cpp b/Jusin154_Team3D/Editor/Private/State_Idle_Turn.cpp new file mode 100644 index 000000000..d0b9f1712 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/State_Idle_Turn.cpp @@ -0,0 +1,88 @@ +#include "pch.h" +#include "State_Idle_Turn.h" +#include "Unit.h" + +CState_Idle_Turn::CState_Idle_Turn() + :CState() +{ +} + +void CState_Idle_Turn::Enter() +{ + if (m_pGameInstance->Key_Down(DIK_LEFT)) + { + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::IDLE_TURN_L); + m_pModel->Set_AnimationIndex(anim.first, anim.second); + } + if (m_pGameInstance->Key_Down(DIK_RIGHT)) + { + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::IDLE_TURN_R); + m_pModel->Set_AnimationIndex(anim.first, anim.second); + } + if (m_pGameInstance->Key_Down(DIK_DOWN)) + { + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::IDLE_TURN_BWD); + m_pModel->Set_AnimationIndex(anim.first, anim.second); + } +} + +void CState_Idle_Turn::Update(_float fTimeDelta) +{ + if (CheckExitState()) + return; +} + +void CState_Idle_Turn::Exit() +{ +} + +_bool CState_Idle_Turn::CheckExitState() +{ + if (m_pOwner->Check(FSMSTATE::MOVE)) + { + m_pFSM->Change_State(FSMSTATE::MOVE); + + if (m_pOwner->Check(FSMSTATE::WALK)) + m_pFSM->Change_State(FSMSTATE::WALK); + + if (m_pOwner->Check(FSMSTATE::SPRINT)) + m_pFSM->Change_State(FSMSTATE::SPRINT); + + if (m_pOwner->Check(FSMSTATE::DODGE)) + m_pFSM->Change_State(FSMSTATE::DODGE); + } + + if (m_pOwner->Check(FSMSTATE::COMBAT)) + { + m_pFSM->Change_State(FSMSTATE::COMBAT); + + if (m_pOwner->Check(FSMSTATE::SKILL)) + m_pFSM->Change_State(FSMSTATE::SKILL); + + if (m_pOwner->Check(FSMSTATE::SKILL2)) + m_pFSM->Change_State(FSMSTATE::SKILL2); + + if (m_pOwner->Check(FSMSTATE::LIGHT_ATTACK)) + m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); + + if (m_pOwner->Check(FSMSTATE::CAST)) + m_pFSM->Change_State(FSMSTATE::CAST); + } + + if (m_pModel->IsFinishedAnim()) + m_pFSM->Change_State(FSMSTATE::IDLE); + + if (m_pOwner->Check(FSMSTATE::JUMP)) + m_pFSM->Change_State(FSMSTATE::JUMP); + + return false; +} + +void CState_Idle_Turn::Free() +{ + __super::Free(); +} + +void CState_Idle_Turn::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/State_Jog.cpp b/Jusin154_Team3D/Editor/Private/State_Jog.cpp new file mode 100644 index 000000000..3831f9943 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/State_Jog.cpp @@ -0,0 +1,56 @@ +#include "pch.h" +#include "State_Jog.h" +#include "Unit.h" + +CState_Jog::CState_Jog() + :CState() +{ +} + +void CState_Jog::Enter() +{ + if (m_pOwner->Check(FSMSTATE::WALK_FWD)) + { + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::WALK_FWD); + m_pModel->Set_AnimationIndex(anim.first, anim.second); + } + + if (m_pOwner->Check(FSMSTATE::WALK_BWD)) + { + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::WALK_BWD); + m_pModel->Set_AnimationIndex(anim.first, anim.second); + } +} + +void CState_Jog::Update(_float fTimeDelta) +{ + if (CheckExitState()) + return; +} + +void CState_Jog::Exit() +{ +} + +_bool CState_Jog::CheckExitState() +{ + if (m_pOwner->Check(FSMSTATE::SPRINT)) + m_pFSM->Change_State(FSMSTATE::SPRINT); + + else if (m_pOwner->Check(FSMSTATE::DODGE)) + m_pFSM->Change_State(FSMSTATE::DODGE); + + else if (!m_pOwner->Check(FSMSTATE::JOG)) + m_pFSM->Change_State(FSMSTATE::IDLE); + + return false; +} + +void CState_Jog::Free() +{ + __super::Free(); +} + +void CState_Jog::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/State_Jump.cpp b/Jusin154_Team3D/Editor/Private/State_Jump.cpp index dd4b58487..c2c175863 100644 --- a/Jusin154_Team3D/Editor/Private/State_Jump.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Jump.cpp @@ -10,7 +10,20 @@ CState_Jump::CState_Jump() void CState_Jump::Enter() { - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::JUMP); + if (m_pOwner->Check(FSMSTATE::SPRINT)) + { + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::JUMP_SPRINT); + m_pModel->Set_AnimationIndex(anim.first, anim.second); + return; + } + if (m_pOwner->Check(FSMSTATE::WALK)) + { + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::JUMP_WALK); + m_pModel->Set_AnimationIndex(anim.first, anim.second); + return; + } + + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::JUMP); m_pModel->Set_AnimationIndex(anim.first, anim.second); } diff --git a/Jusin154_Team3D/Editor/Private/State_Land.cpp b/Jusin154_Team3D/Editor/Private/State_Land.cpp index 86ff832d0..d6fb4ea3c 100644 --- a/Jusin154_Team3D/Editor/Private/State_Land.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Land.cpp @@ -10,7 +10,7 @@ CState_Land::CState_Land() void CState_Land::Enter() { - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::LAND); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::LAND); m_pModel->Set_AnimationIndex(anim.first, anim.second); } diff --git a/Jusin154_Team3D/Editor/Private/State_LightAttack.cpp b/Jusin154_Team3D/Editor/Private/State_LightAttack.cpp index bed197938..ed27639b4 100644 --- a/Jusin154_Team3D/Editor/Private/State_LightAttack.cpp +++ b/Jusin154_Team3D/Editor/Private/State_LightAttack.cpp @@ -13,7 +13,7 @@ void CState_LightAttack::Enter() if (m_pFSM->Get_PrevState() == FSMSTATE::LIGHT_ATTACK) return; - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::LIGHT_ATTACK); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::LIGHT_ATTACK); m_pModel->Set_AnimationIndex(anim.first, anim.second); } @@ -29,12 +29,6 @@ void CState_LightAttack::Exit() _bool CState_LightAttack::CheckExitState() { - if (m_pOwner->Check(FSMSTATE::WALK)) - { - m_pOwner->Reset_LightCombo(); - m_pFSM->Change_State(FSMSTATE::WALK); - return true; - } if (m_pModel->IsFinishedAnim()) { m_pOwner->Reset_LightCombo(); @@ -53,7 +47,7 @@ _bool CState_LightAttack::CheckExitState() return true; } - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::LIGHT_ATTACK); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::LIGHT_ATTACK); m_pModel->Set_AnimationIndex(anim.first + combo, anim.second); m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); @@ -62,6 +56,13 @@ _bool CState_LightAttack::CheckExitState() } + if (m_pOwner->Check(FSMSTATE::SKILL2)) + { + m_pOwner->Reset_LightCombo(); + m_pFSM->Change_State(FSMSTATE::SKILL2); + return true; + } + return false; } diff --git a/Jusin154_Team3D/Editor/Private/State_Move.cpp b/Jusin154_Team3D/Editor/Private/State_Move.cpp index 8b9956607..351df59db 100644 --- a/Jusin154_Team3D/Editor/Private/State_Move.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Move.cpp @@ -25,11 +25,26 @@ void CState_Move::Exit() _bool CState_Move::CheckExitState() { - if (m_pOwner->Check(FSMSTATE::COMBAT)) + if (m_pOwner->Check(FSMSTATE::COMBAT) && + !m_pOwner->Check(FSMSTATE::MOVE)) { m_pFSM->Change_State(FSMSTATE::COMBAT); + + if (m_pOwner->Check(FSMSTATE::SKILL)) + m_pFSM->Change_State(FSMSTATE::SKILL); + + if (m_pOwner->Check(FSMSTATE::SKILL2)) + m_pFSM->Change_State(FSMSTATE::SKILL2); + + if (m_pOwner->Check(FSMSTATE::LIGHT_ATTACK)) + m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); + + if (m_pOwner->Check(FSMSTATE::CAST)) + m_pFSM->Change_State(FSMSTATE::CAST); + return true; } + return false; } diff --git a/Jusin154_Team3D/Editor/Private/State_Skill.cpp b/Jusin154_Team3D/Editor/Private/State_Skill.cpp index 6b0e9e175..d842e203d 100644 --- a/Jusin154_Team3D/Editor/Private/State_Skill.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Skill.cpp @@ -10,7 +10,7 @@ CState_Skill::CState_Skill() void CState_Skill::Enter() { - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::SKILL); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::SKILL); m_pModel->Set_AnimationIndex(anim.first, anim.second); } diff --git a/Jusin154_Team3D/Editor/Private/State_Skill2.cpp b/Jusin154_Team3D/Editor/Private/State_Skill2.cpp new file mode 100644 index 000000000..03704ac90 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/State_Skill2.cpp @@ -0,0 +1,42 @@ +#include "pch.h" +#include "State_Skill2.h" +#include "Unit.h" + + +CState_Skill2::CState_Skill2() + :CState() +{ +} + +void CState_Skill2::Enter() +{ + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::SKILL2); + m_pModel->Set_AnimationIndex(anim.first, anim.second); +} + +void CState_Skill2::Update(_float fTimeDelta) +{ + if (CheckExitState()) + return; +} + +void CState_Skill2::Exit() +{ +} + +_bool CState_Skill2::CheckExitState() +{ + if (m_pModel->IsFinishedAnim()) + m_pFSM->Change_State(FSMSTATE::IDLE); + + return false; +} + +void CState_Skill2::Free() +{ + __super::Free(); +} + +void CState_Skill2::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/State_Sprint.cpp b/Jusin154_Team3D/Editor/Private/State_Sprint.cpp index e279f6fc8..eccc2dd30 100644 --- a/Jusin154_Team3D/Editor/Private/State_Sprint.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Sprint.cpp @@ -9,7 +9,7 @@ CState_Sprint::CState_Sprint() void CState_Sprint::Enter() { - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::SPRINT); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::SPRINT); m_pModel->Set_AnimationIndex(anim.first, anim.second); } @@ -27,10 +27,16 @@ void CState_Sprint::Exit() _bool CState_Sprint::CheckExitState() { if (!m_pOwner->Check(FSMSTATE::SPRINT)) + { + m_pOwner->Reset_Sprint(); m_pFSM->Change_State(FSMSTATE::WALK); - - else if (!m_pOwner->Check(FSMSTATE::WALK)) - m_pFSM->Change_State(FSMSTATE::IDLE); + } + + else if (m_pOwner->Check(FSMSTATE::DODGE)) + m_pFSM->Change_State(FSMSTATE::DODGE); + + if (m_pOwner->Check(FSMSTATE::JUMP)) + m_pFSM->Change_State(FSMSTATE::JUMP); return false; } diff --git a/Jusin154_Team3D/Editor/Private/State_Walk.cpp b/Jusin154_Team3D/Editor/Private/State_Walk.cpp index 104be8f59..967bbbeba 100644 --- a/Jusin154_Team3D/Editor/Private/State_Walk.cpp +++ b/Jusin154_Team3D/Editor/Private/State_Walk.cpp @@ -11,13 +11,13 @@ void CState_Walk::Enter() { if(m_pOwner->Check(FSMSTATE::WALK_FWD)) { - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::WALK_FWD); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::WALK_FWD); m_pModel->Set_AnimationIndex(anim.first, anim.second); } if (m_pOwner->Check(FSMSTATE::WALK_BWD)) { - auto anim = m_pOwner->Get_AnimInfo(FSMSTATE::WALK_BWD); + auto anim = m_pOwner->Get_AnimInfo(STATEANIM::WALK_BWD); m_pModel->Set_AnimationIndex(anim.first, anim.second); } } @@ -43,6 +43,9 @@ _bool CState_Walk::CheckExitState() else if (!m_pOwner->Check(FSMSTATE::WALK)) m_pFSM->Change_State(FSMSTATE::IDLE); + if (m_pOwner->Check(FSMSTATE::JUMP)) + m_pFSM->Change_State(FSMSTATE::JUMP); + return false; } diff --git a/Jusin154_Team3D/Editor/Public/Broom.h b/Jusin154_Team3D/Editor/Public/Broom.h new file mode 100644 index 000000000..caebcc248 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Broom.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Editor_Define.h" +#include "PartObject.h" + +NS_BEGIN(Engine) +class CShader; +class CModel; +NS_END + +NS_BEGIN(Editor) + +class CBroom final : public CGameObject +{ +private: + CBroom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CBroom(const CBroom& Prototype); + virtual ~CBroom() = default; + +public: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual HRESULT Render() override; + +private: + CShader* m_pShaderCom = { nullptr }; + CModel* m_pModelCom = { nullptr }; + + _bool m_bRimLight = { true }; + _float m_fRimLightPower = { 3.2f }; + _float m_fRimLightStrength = { 3.04f }; + _float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f }; + +private: + HRESULT Ready_Components(); + HRESULT Bind_ShaderResources(); + +public: + static CBroom* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override; + virtual void Free() override; + virtual void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index bfb365bca..337f65f8b 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -24,7 +24,7 @@ namespace Editor enum class SHADER_PASS_PARTICLE { EXPLOSION, END }; enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, END }; - enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, END }; + enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, END }; } using namespace Editor; diff --git a/Jusin154_Team3D/Editor/Public/MissionBanner_Border.h b/Jusin154_Team3D/Editor/Public/MissionBanner_Border.h index 0f479c731..b85bdb006 100644 --- a/Jusin154_Team3D/Editor/Public/MissionBanner_Border.h +++ b/Jusin154_Team3D/Editor/Public/MissionBanner_Border.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Editor_Define.h" #include "ElementObject.h" @@ -28,6 +28,7 @@ class CMissionBanner_Border final : public CElementObject private: CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; @@ -39,4 +40,4 @@ class CMissionBanner_Border final : public CElementObject void Describe_Entity() override; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Mission_KeyHold.h b/Jusin154_Team3D/Editor/Public/Mission_KeyHold.h index d63d76fa6..360e4af86 100644 --- a/Jusin154_Team3D/Editor/Public/Mission_KeyHold.h +++ b/Jusin154_Team3D/Editor/Public/Mission_KeyHold.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Editor_Define.h" #include "ElementObject.h" @@ -31,8 +31,9 @@ class CMission_KeyHold final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - _float m_fPI{}; - + _float m_fPI{}; + _bool m_bisHoldOn = { false }; + _bool m_bKeyHold = { false }; public: static CMission_KeyHold* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; @@ -40,4 +41,4 @@ class CMission_KeyHold final : public CElementObject void Describe_Entity() override; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Player.h b/Jusin154_Team3D/Editor/Public/Player.h index 3f33274d5..66b3edc6c 100644 --- a/Jusin154_Team3D/Editor/Public/Player.h +++ b/Jusin154_Team3D/Editor/Public/Player.h @@ -26,9 +26,10 @@ class CPlayer final : public CUnit virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; - + _bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; } private: vector m_InputConditions; + _bool m_bSprintToggle = { false }; private: HRESULT Ready_Components(); @@ -48,7 +49,9 @@ class CPlayer final : public CUnit virtual void Set_FSM(); virtual void Set_Anim(); _bool Check(FSMSTATE::ESTATE state); - + _bool IsSprint(); +public: + virtual void Reset_Sprint() { m_bSprintToggle = false; } #pragma endregion diff --git a/Jusin154_Team3D/Editor/Public/State_Idle_Turn.h b/Jusin154_Team3D/Editor/Public/State_Idle_Turn.h new file mode 100644 index 000000000..c39f90ee8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/State_Idle_Turn.h @@ -0,0 +1,21 @@ +#pragma once +#include "Editor_Define.h" +#include "State.h" + +class CState_Idle_Turn final : public CState +{ +public: + CState_Idle_Turn(); + virtual ~CState_Idle_Turn() = default; + +public: + virtual void Enter(); + virtual void Update(_float fTimeDelta); + virtual void Exit(); + virtual _bool CheckExitState(); + +public: + virtual void Free() override; + virtual void Describe_Entity(); +}; + diff --git a/Jusin154_Team3D/Editor/Public/State_Jog.h b/Jusin154_Team3D/Editor/Public/State_Jog.h new file mode 100644 index 000000000..5fa7c5008 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/State_Jog.h @@ -0,0 +1,21 @@ +#pragma once +#include "Editor_Define.h" +#include "State.h" + + +class CState_Jog final : public CState +{ +public: + CState_Jog(); + virtual ~CState_Jog() = default; + +public: + virtual void Enter(); + virtual void Update(_float fTimeDelta); + virtual void Exit(); + virtual _bool CheckExitState(); + +public: + virtual void Free() override; + virtual void Describe_Entity(); +}; diff --git a/Jusin154_Team3D/Editor/Public/State_Skill2.h b/Jusin154_Team3D/Editor/Public/State_Skill2.h new file mode 100644 index 000000000..652630d4b --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/State_Skill2.h @@ -0,0 +1,19 @@ +#pragma once +#include "Editor_Define.h" +#include "State.h" + +class CState_Skill2 final : public CState +{ +public: + CState_Skill2(); + virtual ~CState_Skill2() = default; + +public: + virtual void Enter(); + virtual void Update(_float fTimeDelta); + virtual void Exit(); + virtual _bool CheckExitState(); +public: + virtual void Free() override; + virtual void Describe_Entity(); +}; diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj index c51b7743d..2430cdce9 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj @@ -312,6 +312,7 @@ call Update_Lib.bat + @@ -552,6 +553,7 @@ call Update_Lib.bat + diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters index beb34c95e..918b88407 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters @@ -274,6 +274,9 @@ {869c0ee8-a853-40d4-90ea-3e1501fa8529} + + {dae29f0c-1727-4423-a3ca-9ef27460520b} + @@ -519,6 +522,9 @@ 02.Element\02.Component\07.RigidBody\20.Joint + + 02.Element\02.Component\02.VIBuffer\Trail + @@ -1130,6 +1136,9 @@ 02.Element\02.Component\07.RigidBody\20.Joint + + 02.Element\02.Component\02.VIBuffer\Trail + diff --git a/Jusin154_Team3D/Engine/Private/Animation.cpp b/Jusin154_Team3D/Engine/Private/Animation.cpp index 9d4d13f26..91a1376ef 100644 --- a/Jusin154_Team3D/Engine/Private/Animation.cpp +++ b/Jusin154_Team3D/Engine/Private/Animation.cpp @@ -169,7 +169,7 @@ void CAnimation::InterpAnim(CAnimation* pPreAnim, vector& Bones, float f if (BoneName == "Reference") { - FinalPos = XMVectorZero(); + //FinalPos = XMVectorZero(); } _matrix FinalMat = XMMatrixAffineTransformation(FinalScale, XMVectorZero(), FinalRot, FinalPos); diff --git a/Jusin154_Team3D/Engine/Private/Channel.cpp b/Jusin154_Team3D/Engine/Private/Channel.cpp index 1f72faa3b..bc1043d15 100644 --- a/Jusin154_Team3D/Engine/Private/Channel.cpp +++ b/Jusin154_Team3D/Engine/Private/Channel.cpp @@ -164,7 +164,7 @@ void CChannel::Update_TransformationMatirx(const vector& Bones, _float f _float dy = XMVectorGetY(vDeltaAdjusted); _float dz = XMVectorGetZ(vDeltaAdjusted); - _vector vDeltaWorld = vRight * dx + (-vUp * dz) + vLook * dy; + _vector vDeltaWorld = vRight * dx + (-vUp * dz) + vLook * dy; vDeltaWorld *= 0.01f; @@ -175,6 +175,45 @@ void CChannel::Update_TransformationMatirx(const vector& Bones, _float f m_vPrevRootPos = vCurRootPos; vTranslation = XMVectorZero(); + + ///////////////////////////////////// + + _float4 curRotF4; + XMStoreFloat4(&curRotF4, vRotation); + _vector qCur = XMLoadFloat4(&curRotF4); + + if (!m_bInitialRootRotSaved) + { + m_vInitialRootRot = curRotF4; + m_vPrevRootRot = curRotF4; + m_bInitialRootRotSaved = true; + } + else + { + _vector qPrev = XMLoadFloat4(&m_vPrevRootRot); + + _vector qInvPrev = XMQuaternionInverse(qPrev); + _vector qDelta = XMQuaternionMultiply(qInvPrev, qCur); + + _vector axisLocal; + _float angle = 0.f; + XMQuaternionToAxisAngle(&axisLocal, &angle, qDelta); + + _vector axisWorld = XMVector3TransformNormal(axisLocal, pre); + axisWorld = XMVector3Normalize(axisWorld); + + _float4 axis; + XMStoreFloat4(&axis, axisWorld); + swap(axis.z, axis.y); + + + if (angle > 0 ) + pTransform->TurnAngle(XMLoadFloat4(&axis), -angle); + } + + XMStoreFloat4(&m_vPrevRootRot, qCur); + + vRotation = XMLoadFloat4(&m_vInitialRootRot); } m_BoneTransformationMatrix = XMMatrixAffineTransformation(vScale, XMVectorSet(0.f, 0.f, 0.f, 1.f), vRotation, vTranslation); @@ -182,7 +221,6 @@ void CChannel::Update_TransformationMatirx(const vector& Bones, _float f Bones[m_iBoneIndex]->Set_TransformationMatrix(m_BoneTransformationMatrix); } - KEYFRAME* CChannel::Get_Frame(_uint iIndex) { return &m_KeyFrames[iIndex]; diff --git a/Jusin154_Team3D/Engine/Private/ElementObject.cpp b/Jusin154_Team3D/Engine/Private/ElementObject.cpp index 965ac2e9c..ccb3036bd 100644 --- a/Jusin154_Team3D/Engine/Private/ElementObject.cpp +++ b/Jusin154_Team3D/Engine/Private/ElementObject.cpp @@ -40,7 +40,7 @@ void CElementObject::Update(_float fTimeDelta) m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet( m_fX + m_pOwner->Get_WorldPostion().m128_f32[0], -m_fY + m_pOwner->Get_WorldPostion().m128_f32[1], - 0.f, 1.f)); + m_fSortZ, 1.f)); m_fCurrent_Position = XMVectorSet(m_fX, m_fY, 0.f, 1.f); m_vNine_Slice = _float4(m_fLeft, m_fRight, m_fTop, m_fBottom); diff --git a/Jusin154_Team3D/Engine/Private/FSM.cpp b/Jusin154_Team3D/Engine/Private/FSM.cpp index f17e7dde1..f09d5d689 100644 --- a/Jusin154_Team3D/Engine/Private/FSM.cpp +++ b/Jusin154_Team3D/Engine/Private/FSM.cpp @@ -69,7 +69,9 @@ _uint CFSM::Get_CurrState() _uint CFSM::Get_PrevState() { - return m_pPrevious->Get_State(); + if (m_pPrevious) + return m_pPrevious->Get_State(); + return 0; } void CFSM::Set_Parent(FSMSTATE::ESTATE Child, FSMSTATE::ESTATE Parent) diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index 197e1c0ee..6f8bf8bfd 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -23,9 +23,7 @@ CModel::CModel(const CModel& rhs) m_Materials(rhs.m_Materials), m_iNumMaterials(rhs.m_iNumMaterials), m_iNumAnimations(rhs.m_iNumAnimations), - m_pLerpAnim(rhs.m_pLerpAnim), - m_fRadius{rhs.m_fRadius}, - m_vRadiusOffset{rhs.m_vRadiusOffset} + m_pLerpAnim(rhs.m_pLerpAnim) { _uint iNumBones = (_uint)(rhs.m_Bones.size()); m_Bones.reserve(iNumBones); @@ -481,28 +479,6 @@ HRESULT CModel::Ready_Materials_FromFile(const aiScene* pAIScene, const _char* p m_Materials.push_back(pMaterial); } m_Materials.shrink_to_fit(); - - while (true) - { - getline(file, strText); - if (string::npos != strText.find("Origin")) - { - size_t iXPos = strText.find_first_of("X"); - size_t iYPos = strText.find_first_of("Y"); - size_t iZPos = strText.find_first_of("Z"); - size_t iEndPos = strText.find_first_of("}"); - - m_vRadiusOffset.x = stof(strText.substr(iXPos + 2, iYPos - 2)) * 0.01f; - m_vRadiusOffset.z = stof(strText.substr(iYPos + 2, iZPos - 2)) * -0.01f; - m_vRadiusOffset.y = stof(strText.substr(iZPos + 2, iEndPos)) * 0.01f; - } - if (string::npos != strText.find("SphereRadius")) - { - size_t iBeginIndex = strText.find_first_of("="); - m_fRadius = stof(strText.substr(iBeginIndex + 1)) / 100.f; - break; - } - } return S_OK; } @@ -803,12 +779,6 @@ _bool CModel::SaveAssimpModel(const _char* filename) } } - if(MODEL::ENVIROMENT == m_eType) - { - fwrite(&m_fRadius, sizeof(_float), 1, fp); - fwrite(&m_vRadiusOffset, sizeof(_float3), 1, fp); - } - fclose(fp); return true; @@ -1109,11 +1079,6 @@ _bool CModel::LoadData(const _char* filename) NewModel.Materials.push_back(mat); } - if(MODEL::ENVIROMENT == m_eType) - { - fread(&m_fRadius, sizeof(_float), 1, fp); - fread(&m_vRadiusOffset, sizeof(_float3), 1, fp); - } fclose(fp); diff --git a/Jusin154_Team3D/Engine/Private/PanelObject.cpp b/Jusin154_Team3D/Engine/Private/PanelObject.cpp index 0d1dd1d7b..bc10f900e 100644 --- a/Jusin154_Team3D/Engine/Private/PanelObject.cpp +++ b/Jusin154_Team3D/Engine/Private/PanelObject.cpp @@ -76,10 +76,19 @@ void CPanelObject::Update(_float fTimeDelta) m_fAlpha = 0.f; } } + + for (auto& iter : m_Elements) + { + + } } void CPanelObject::Late_Update(_float fTimeDelta) { + for (size_t i = 0; i < m_Elements.size(); ++i) + { + + } } HRESULT CPanelObject::Render() @@ -129,9 +138,23 @@ void CPanelObject::ElementAllVisible(_bool bVisible) } } -void CPanelObject::Add_Element(wstring Name, CGameObject* pPanel) +void CPanelObject::Add_Function(wstring Name, functionEvent) { - if (pPanel == nullptr) + m_ElementFunction_map.emplace(Name, Event); +} + +void CPanelObject::Function_Callback(wstring Name) +{ + auto range = m_ElementFunction_map.equal_range(Name); + for (auto it = range.first; it != range.second; ++it) + { + it->second(); + } +} + +void CPanelObject::Add_Element(wstring Name, CGameObject* pElement) +{ + if (pElement == nullptr) { return; } @@ -141,9 +164,9 @@ void CPanelObject::Add_Element(wstring Name, CGameObject* pPanel) return; } - m_Elements.push_back(pPanel); + m_Elements.push_back(pElement); m_ElementName.push_back(Name); - m_Elements_map.emplace(Name, pPanel); + m_Elements_map.emplace(Name, pElement); m_iElements_Count++; } diff --git a/Jusin154_Team3D/Engine/Private/Trail.cpp b/Jusin154_Team3D/Engine/Private/Trail.cpp new file mode 100644 index 000000000..7a3078077 --- /dev/null +++ b/Jusin154_Team3D/Engine/Private/Trail.cpp @@ -0,0 +1,134 @@ +#include "pch.h" +#include "Trail.h" + +CTrail::CTrail(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CVIBuffer(pDevice, pContext) +{ +} + +CTrail::CTrail(const CTrail& rhs) + : CVIBuffer(rhs) +{ +} + +HRESULT CTrail::Initialize_Prototype() +{ + m_iNumVertexBuffers = 1; + m_iNumVertices = 4; + m_iVertexStride = sizeof(VTXPOSTEX); + + m_iNumIndices = 6; + m_iIndexStride = 4; + + m_eIndexFormat = DXGI_FORMAT_R32_UINT; + m_ePrimitive = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; + +#pragma region VTX_BUFFER + D3D11_BUFFER_DESC VBDesc{}; + VBDesc.ByteWidth = m_iVertexStride * m_iNumVertices; + VBDesc.Usage = D3D11_USAGE_DEFAULT; + VBDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER; + VBDesc.CPUAccessFlags = 0; + VBDesc.MiscFlags = 0; + VBDesc.StructureByteStride = m_iVertexStride; + + VTXPOSTEX* pVertices = new VTXPOSTEX[m_iNumVertices]{}; + m_pVertexPositions = new _float3[m_iNumIndices]{}; + + m_pVertexPositions[0] = pVertices[0].vPosition = _float3(-0.5f, 0.5f, 0.f); + pVertices[0].vTexcoord = _float2(0.0f, 0.0f); + + m_pVertexPositions[1] = pVertices[1].vPosition = _float3(0.5f, 0.5f, 0.f); + pVertices[1].vTexcoord = _float2(1.0f, 0.0f); + + m_pVertexPositions[2] = pVertices[2].vPosition = _float3(0.5f, -0.5f, 0.f); + pVertices[2].vTexcoord = _float2(1.0f, 1.0f); + + m_pVertexPositions[3] = pVertices[3].vPosition = _float3(-0.5f, -0.5f, 0.f); + pVertices[3].vTexcoord = _float2(0.0f, 1.0f); + + D3D11_SUBRESOURCE_DATA InitialVBDate{}; + InitialVBDate.pSysMem = pVertices; + + if (FAILED(m_pDevice->CreateBuffer(&VBDesc, &InitialVBDate, &m_pVB))) { + return E_FAIL; + } + Safe_Delete_Array(pVertices); + +#pragma endregion + +#pragma region IDX_BUFFER + D3D11_BUFFER_DESC IBDesc{}; + IBDesc.ByteWidth = m_iIndexStride * m_iNumIndices; + IBDesc.Usage = D3D11_USAGE_DEFAULT; + IBDesc.BindFlags = D3D11_BIND_INDEX_BUFFER; + IBDesc.CPUAccessFlags = 0; + IBDesc.MiscFlags = 0; + IBDesc.StructureByteStride = m_iIndexStride; + + + _uint* pIndices = new _uint[m_iNumIndices]{}; + + pIndices[0] = 0; + pIndices[1] = 1; + pIndices[2] = 2; + + pIndices[3] = 0; + pIndices[4] = 2; + pIndices[5] = 3; + + D3D11_SUBRESOURCE_DATA InitialIBDate{}; + InitialIBDate.pSysMem = pIndices; + + if (FAILED(m_pDevice->CreateBuffer(&IBDesc, &InitialIBDate, &m_pIB))) { + return E_FAIL; + } + Safe_Delete_Array(pIndices); +#pragma endregion + + + + return S_OK; +} + +HRESULT CTrail::Initialize(void* pArg) +{ + return S_OK; +} + +CTrail* CTrail::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CTrail* pInstance = new CTrail(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CTrail"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CTrail* CTrail::Clone(void* pArg, CGameObject* pOwner) +{ + CTrail* pInstance = new CTrail(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CTrail"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CTrail::Free() +{ + __super::Free(); + + +} + +void CTrail::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Engine/Private/Transform.cpp b/Jusin154_Team3D/Engine/Private/Transform.cpp index b6fe733ca..0585b946c 100644 --- a/Jusin154_Team3D/Engine/Private/Transform.cpp +++ b/Jusin154_Team3D/Engine/Private/Transform.cpp @@ -225,6 +225,32 @@ void CTransform::Turn(_fvector vAxis, _float fTimeDelta) Set_State(STATE::LOOK, vLook); } +void CTransform::TurnAngle(_vector vAxis, _float fAngle) +{ + _vector vRight = Get_State(STATE::RIGHT); + _vector vUp = Get_State(STATE::UP); + _vector vLook = Get_State(STATE::LOOK); + if (vAxis.m128_f32[0] == 0) + return; + if (vAxis.m128_f32[1] == 0) + return; + if (vAxis.m128_f32[2] == 0) + return; + + vAxis = XMVector3Normalize(vAxis); + + _matrix TurnMatrix = XMMatrixRotationAxis(vAxis, fAngle); + + vRight = XMVector3TransformNormal(vRight, TurnMatrix); + vUp = XMVector3TransformNormal(vUp, TurnMatrix); + vLook = XMVector3TransformNormal(vLook, TurnMatrix); + + Set_State(STATE::RIGHT, vRight); + Set_State(STATE::UP, vUp); + Set_State(STATE::LOOK, vLook); +} + + void CTransform::Rotation(_fvector vAxis, _float fRadian) { _float3 vScale = Get_Scale(); diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp index d4e51a76c..197fa9885 100644 --- a/Jusin154_Team3D/Engine/Private/UIObject.cpp +++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp @@ -71,7 +71,7 @@ HRESULT CUIObject::Initialize(void* pArg) m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet( pDesc->fX - ViewportDesc.Width * 0.5f, - pDesc->fY + ViewportDesc.Height * 0.5f, - 0.f, 1.f)); + m_fSortZ, 1.f)); m_fOrigin_Size = m_vScale; // 직교 투영을 하기 위해서 먼저 뷰 행렬을 항등 행렬로 바꿔준다. @@ -105,7 +105,7 @@ void CUIObject::Update(_float fTimeDelta) m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f, -m_fY + m_fWinSizeY * 0.5f, 0.f, 1.f)); - m_fCurrent_Position = XMVectorSet(m_fX, m_fY, 0.f, 1.f); + m_fCurrent_Position = XMVectorSet(m_fX, m_fY, m_fSortZ, 1.f); } @@ -442,6 +442,14 @@ _float CUIObject::Get_CoolTime() return m_fCoolTime; } +void CUIObject::Add_Function(wstring Name, function Evnet) +{ +} + +void CUIObject::Function_Callback(wstring Name) +{ +} + void CUIObject::Free() { __super::Free(); diff --git a/Jusin154_Team3D/Engine/Private/Unit.cpp b/Jusin154_Team3D/Engine/Private/Unit.cpp index c916579ef..1d4672861 100644 --- a/Jusin154_Team3D/Engine/Private/Unit.cpp +++ b/Jusin154_Team3D/Engine/Private/Unit.cpp @@ -23,7 +23,7 @@ HRESULT CUnit::Initialize(void* pArg) if (FAILED(__super::Initialize(pArg))) return E_FAIL; - m_Animation.resize(FSMSTATE::END); + m_Animation.resize(STATEANIM::END); return S_OK; } diff --git a/Jusin154_Team3D/Engine/Public/Channel.h b/Jusin154_Team3D/Engine/Public/Channel.h index 9a5590477..745a95f1c 100644 --- a/Jusin154_Team3D/Engine/Public/Channel.h +++ b/Jusin154_Team3D/Engine/Public/Channel.h @@ -22,7 +22,11 @@ class ENGINE_DLL CChannel : public CBase void Update_TransformationMatirx(const vector& Bones, _float fCurrentTrackPosition, _uint* pCurrentKeyFrameIndex,class CTransform* pTransform=nullptr); _int Get_BoneIndex() { return { m_iBoneIndex }; } void Set_BoneIndex(_int iBoneIndex) { m_iBoneIndex = iBoneIndex; } - void ResetRootMotion() { m_vPrevRootPos = { 0.f, 0.f, 0.f }; } + void ResetRootMotion() { + m_vPrevRootPos = { 0.f, 0.f, 0.f }; + m_vPrevRootRot = { 0.f,0.f,0.f,0.f }; + m_bInitialRootRotSaved = false; + } _matrix Get_BoneTransformationMatrix() { return m_BoneTransformationMatrix; } KEYFRAME* Get_Frame(_uint iIndex); @@ -38,7 +42,6 @@ class ENGINE_DLL CChannel : public CBase // HRESULT Initialize(const vector& Bones, _uint iIndex); - private: _char m_szName[MAX_PATH] = {}; // 영향을 받을 본의 이름 _int m_iBoneIndex = { -1 }; // 본 벡터에서 본의 인덱스 @@ -46,7 +49,11 @@ class ENGINE_DLL CChannel : public CBase _float4x4 m_PreTransformMatrix = {}; vector m_KeyFrames; // 키프레임 벡터 _float3 m_vPrevRootPos = { 0.f, 0.f, 0.f }; + _float4 m_vPrevRootRot = { 0.f, 0.f, 0.f,0.f }; _matrix m_BoneTransformationMatrix = {}; + _float m_fPrevYaw = 0.f; + _bool m_bInitialRootRotSaved = {false}; +_float4 m_vInitialRootRot = {}; public: static CChannel* Create(const vector& Bones, _uint iIndex); // 럴프전용 static CChannel* Create(HANDLE hFile, DWORD& dwByte); diff --git a/Jusin154_Team3D/Engine/Public/FSM.h b/Jusin154_Team3D/Engine/Public/FSM.h index af92dd6e7..736f2c6ca 100644 --- a/Jusin154_Team3D/Engine/Public/FSM.h +++ b/Jusin154_Team3D/Engine/Public/FSM.h @@ -3,17 +3,16 @@ NS_BEGIN(FSMSTATE) enum ESTATE { - IDLE, + IDLE,IDLE_TURN, MOVE, WALK, WALK_FWD, WALK_BWD, JOG, SPRINT, JUMP, LAND, DODGE, - COMBAT, LIGHT_ATTACK, CAST, SKILL, + COMBAT, LIGHT_ATTACK, CAST, SKILL,SKILL2, END }; NS_END - NS_BEGIN(Engine) class CState; diff --git a/Jusin154_Team3D/Engine/Public/PanelObject.h b/Jusin154_Team3D/Engine/Public/PanelObject.h index a21dddd36..4dc8c4deb 100644 --- a/Jusin154_Team3D/Engine/Public/PanelObject.h +++ b/Jusin154_Team3D/Engine/Public/PanelObject.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "UIObject.h" @@ -7,7 +7,7 @@ NS_BEGIN(Engine) class ENGINE_DLL CPanelObject abstract : public CUIObject { protected: - CPanelObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CPanelObject(ID3D11Device * pDevice, ID3D11DeviceContext * pContext); CPanelObject(const CPanelObject& rhs); virtual ~CPanelObject() = default; @@ -31,15 +31,20 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject virtual const vector Element_Name(); virtual void ElementAllVisible(_bool bVisible); + virtual void Add_Function(wstring Name, function Evnet) override; + virtual void Function_Callback(wstring Name) override; protected: - virtual void Add_Element(wstring Name, class CGameObject* pPanel); + virtual void Add_Element(wstring Name, class CGameObject* pElement); virtual _bool Chack_Visible() override; protected: - vector m_Elements; // ÆгÎÀÌ ¿¤¸®¸ÕÃ÷¸¦ °ü¸®Çϱâ À§ÇØ ¸¸µë - vector m_ElementName; // ¿¤¸®¸àƮµéÀÇ À̸§À» ÀüÇØÁֱâ À§Çؼ­ - map m_Elements_map; // ĵ¹ö½º¿¡¼­ ³»°¡ ¿øÇϴ ÆгÎÀ» ã±â À§Çؼ­ - _int m_iElements_Count{}; // Àüü ¿¤¸®¸àƮÀÇ °¹¼ö + vector m_Elements; // 패널이 엘리먼츠를 관리하기 위해 만듬 + vector m_ElementName; // 엘리멘트들의 이름을 전해주기 위해서 + map m_Elements_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서 + + multimap> m_ElementFunction_map; + + _int m_iElements_Count{}; // 전체 엘리멘트의 갯수 private: virtual class CGameObject* Find_Element(const wstring& Name); @@ -48,4 +53,4 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h index df29cf0e7..13abe1d97 100644 --- a/Jusin154_Team3D/Engine/Public/State.h +++ b/Jusin154_Team3D/Engine/Public/State.h @@ -1,6 +1,22 @@ #pragma once #include "Base.h" +NS_BEGIN(STATEANIM) +enum ESTATE +{ + IDLE, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, + MOVE, + WALK, WALK_FWD, WALK_BWD, WALK_STOP, + JOG, + SPRINT, + JUMP,JUMP_WALK,JUMP_SPRINT, + LAND, + DODGE, + COMBAT, LIGHT_ATTACK, CAST, SKILL, SKILL2, + END +}; +NS_END + NS_BEGIN(Engine) class CUnit; class CModel; diff --git a/Jusin154_Team3D/Engine/Public/Trail.h b/Jusin154_Team3D/Engine/Public/Trail.h new file mode 100644 index 000000000..1a53f5315 --- /dev/null +++ b/Jusin154_Team3D/Engine/Public/Trail.h @@ -0,0 +1,25 @@ +#pragma once +#include "VIBuffer.h" + +NS_BEGIN(Engine) + +class ENGINE_DLL CTrail final : + public CVIBuffer +{ +protected: + CTrail(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CTrail(const CTrail& rhs); + virtual ~CTrail() = default; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +public: + static CTrail* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CTrail* Clone(void* pArg, class CGameObject* pOwner = nullptr) override; + virtual void Free() override; + virtual void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Engine/Public/Transform.h b/Jusin154_Team3D/Engine/Public/Transform.h index 2f352efbe..690439bbe 100644 --- a/Jusin154_Team3D/Engine/Public/Transform.h +++ b/Jusin154_Team3D/Engine/Public/Transform.h @@ -57,6 +57,7 @@ class ENGINE_DLL CTransform final : void BookMomentum(_fvector vMomentum); void Turn(_fvector vAxis, _float fTimeDelta); + void TurnAngle(_vector vAxis, _float fAngle); void Rotation(_fvector vAxis, _float fRadian); void Rotation(_float fRadianX, _float fRadianY, _float fRadianZ); void Rotation(_float3& vRadian); diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h index 239a1374b..741437e22 100644 --- a/Jusin154_Team3D/Engine/Public/UIObject.h +++ b/Jusin154_Team3D/Engine/Public/UIObject.h @@ -7,14 +7,15 @@ NS_BEGIN(Engine) class ENGINE_DLL CUIObject abstract : public CGameObject { public: - enum class SKILLTYPE { SHADOW, CONTROL, POWER, DAMAGE, - UTILITY ,TRANSFORM, CURSE, ESSENTIAL - }; - typedef struct tagUIObjectDesc - { - _float fX, fY = {}; - _float fSizeX, fSizeY = {}; - }UIOBJECT_DESC; + enum class SKILLTYPE { + SHADOW, CONTROL, POWER, DAMAGE, +UTILITY ,TRANSFORM, CURSE, ESSENTIAL +}; +typedef struct tagUIObjectDesc +{ + _float fX, fY = {}; + _float fSizeX, fSizeY = {}; +}UIOBJECT_DESC; protected: CUIObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); @@ -99,6 +100,9 @@ class ENGINE_DLL CUIObject abstract : public CGameObject virtual void Set_CoolTime(_float CoolTime); virtual _float Get_CoolTime(); + + virtual void Add_Function(wstring Name, function Evnet); + virtual void Function_Callback(wstring Name); protected: _vector m_fOrigin_Position_vector{}; _float2 m_fOrigin_Position{}; @@ -122,6 +126,7 @@ class ENGINE_DLL CUIObject abstract : public CGameObject _bool m_bOwnerFadeOut = { false }; _bool m_bLerpOn = { false }; _bool m_bLerpOff = { false }; + _bool m_bEventOn = { false }; _float m_fAlpha{}; // UI의 알파값을 조절해서 서서히 나오거나 서서히 사라지게 하기 위함 _float m_fOwnerAlpha{}; // 부모의 알파값인데 부모가 어두워지면 자식들도 어두워 져야해서 설정을 해준다. @@ -142,7 +147,7 @@ class ENGINE_DLL CUIObject abstract : public CGameObject RECT m_pRect{}; _int m_iSkillType{}; - + _float m_fSortZ{}; _float m_fMoveSpeed{}; _float4 m_vNine_Slice{}; diff --git a/Jusin154_Team3D/Engine/Public/Unit.h b/Jusin154_Team3D/Engine/Public/Unit.h index 7bd6ca6e8..45bc73380 100644 --- a/Jusin154_Team3D/Engine/Public/Unit.h +++ b/Jusin154_Team3D/Engine/Public/Unit.h @@ -39,6 +39,7 @@ class ENGINE_DLL CUnit abstract : public CGameObject void Set_LightCombo(_uint LightCombo) { m_iLightCombo = LightCombo; } _float Get_KeyFrame(_string FrameName); _bool IsCurrentKeyFrame(_string FrameName); + virtual void Reset_Sprint() {}; #pragma endregion protected: