diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index b22b67c15..ed7ed5a8f 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -163,6 +163,7 @@ call Update_Resources.bat
+
@@ -473,6 +474,7 @@ call Update_Resources.bat
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 37e8d62e8..341987b95 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -937,7 +937,7 @@
02.GameObjects\Effect\MonsterEffect\Troll_Self_Hit
-
+
02.GameObjects\Effect\MonsterEffect\Duelist_Protego\Duelist_ProtegoHit
@@ -949,10 +949,13 @@
02.GameObjects\Environment\03.MapElement\Cave
-
+
02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_SkillUI
+
+ 02.GameObjects\Effect\Effects\Reparo
+
@@ -1955,7 +1958,7 @@
{c276c050-7000-441e-bb53-30ec3c20c6f5}
-
+
{9263815e-9651-4ba2-813f-c2a7f207522d}
@@ -1964,10 +1967,13 @@
{5599bbbd-12f7-4b40-8e3d-24f869cce464}
-
+
{b28b8285-3d1a-49cf-bde2-c7ebc18e6389}
+
+ {88c3bc02-a51d-4cd8-87a2-197722d48f83}
+
@@ -2838,6 +2844,9 @@
02.GameObjects\Environment\03.MapElement\Cave
+
+ 02.GameObjects\Effect\Effects\Reparo
+
@@ -2867,13 +2876,13 @@
02.GameObjects\Effect\MonsterEffect\Troll_Self_Hit
-
+
02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate2D
02.GameObjects\NPC\Ally\Elf
-
+
02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel\Enemy_SkillUI
diff --git a/Jusin154_Team3D/Client/Private/BombardSide.cpp b/Jusin154_Team3D/Client/Private/BombardSide.cpp
index 70a4b8841..69f5ee42c 100644
--- a/Jusin154_Team3D/Client/Private/BombardSide.cpp
+++ b/Jusin154_Team3D/Client/Private/BombardSide.cpp
@@ -61,9 +61,7 @@ HRESULT CBombardSide::Initialize(void* pArg)
if (pWand == nullptr)
return;
- m_isTrailEnd = true;
-
- XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix());
+ m_pWandTrail->SetDissolve(true);
});
return S_OK;
@@ -99,7 +97,7 @@ void CBombardSide::Update(_float fTimeDelta)
// 트레일이 종료되면 위치를 고정함
_matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix();
- m_pWandTrail->Trail_Update(TrailMat, fTimeDelta);
+ m_pWandTrail->Oneside_Rope_Trail_Update(TrailMat, fTimeDelta);
}
diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp
index f577c9168..df7969a2c 100644
--- a/Jusin154_Team3D/Client/Private/Broom.cpp
+++ b/Jusin154_Team3D/Client/Private/Broom.cpp
@@ -6,6 +6,7 @@
#include "Unit.h"
#include "PartObject.h"
#include "EffectParts.h"
+#include "TrailObject.h"
CBroom::CBroom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CUnit(pDevice, pContext)
@@ -103,15 +104,6 @@ void CBroom::Update(_float fTimeDelta)
m_bHoverToggle = true;
m_fSpeed = 0.f;
- if (m_pWindEffect != nullptr)
- {
- if (m_pWindEffect->Get_Visible() == true) // 전 프레임에 트루였다면
- {
- m_pWindEffect->Set_Visible(false);
- m_pWindEffect->Get_Effect_Info()->fSoftMask = 1.f;
- }
- }
-
m_pFSM->Change_State(FSMSTATE::IDLE);
}
@@ -125,20 +117,45 @@ void CBroom::Update(_float fTimeDelta)
/* 윈드 이펙트 */
+
+
if (m_bRide == true && m_pWindEffect != nullptr)
{
+ _matrix BroomTail_Mat = XMLoadFloat4x4(m_pBroom_TailMat);
+
+ for (int i = 0; i < 3; ++i) {
+ BroomTail_Mat.r[i] = XMVector3Normalize(BroomTail_Mat.r[i]);
+ }
+
+ m_pBroomTrail->Oneside_Rope_Trail_Update(BroomTail_Mat * m_pTransformCom->Get_XMWorldMatrix(), fTimeDelta);
+
if (m_fSpeed <= 5.f)
{
- //m_pWindEffect->Set_Visible(false);
+ m_pWindEffect->Get_Component()->Set_Loop(false);
+ m_pWindEffect->Get_Effect_Info()->isDissolve = true;
+ m_pWindEffect->Get_Effect_Info()->fSoftMask = 1.f;
+
+ m_pBroomTrail->SetDissolve(true);
+
return;
}
+
+
+ m_pBroomTrail->SetDissolve(false);
+ m_pBroomTrail->Set_Visible(true);
+
+ /* 윈드 이펙트 루프 돌리도록 */
+ m_pWindEffect->Get_Component()->Set_Loop(true);
+ m_pWindEffect->Get_Effect_Info()->isDissolve = false;
m_pWindEffect->Set_Visible(true);
+
+ /* 윈드 이펙트 속도에 따라 강해지도록 */
m_pWindEffect->Get_Component()->Set_TimeMult(0.5f + m_fSpeed / 20.f);
m_pWindEffect->Get_Effect_Info()->fBlurIntensity = m_fSpeed / 30.f;
- }
+ }
}
void CBroom::Late_Update(_float fTimeDelta)
@@ -218,6 +235,27 @@ HRESULT CBroom::Ready_Child()
m_pWindEffect->Load("../Bin/Resources/Data/Effect/ScreenFX/Wind", static_cast(g_iStaticLevel));
+ ///
+
+ if (FAILED(Add_PartObject("Boost_Screen", g_iStaticLevel, &m_pBoostScreenFX, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+ m_pBoostScreenFX->Load("../Bin/Resources/Data/Effect/BroomEffect/Booster_ScreenFX", static_cast(g_iStaticLevel));
+
+
+ ///
+
+ if (FAILED(Add_PartObject("Broom_Trail", g_iStaticLevel, &m_pBroomTrail, &PartsDesc))) {
+ return E_FAIL;
+ }
+
+ m_pBroomTrail->Load_Trail("../Bin/Resources/Data/Effect/BroomEffect/Broom_Trail", static_cast(g_iStaticLevel));
+ m_pBroomTrail->Set_Visible(false);
+
+
+ m_pBroom_TailMat = m_pModelCom->Get_BoneMatrixPtr("thistleSocket");
+
return S_OK;
}
@@ -302,6 +340,17 @@ void CBroom::Update_CameraCoordinateSystem()
m_pInfoInstance->Update_CameraCoordinateSystem(m_vCameraLookDir, m_vRimLightColor);
}
+void CBroom::Boost_Effect_Visible(_bool isVisible)
+{
+ m_pBoostScreenFX->Get_Component()->Set_Loop(isVisible);
+
+ if (isVisible == true)
+ {
+
+ m_pBoostScreenFX->Set_Visible(true);
+ }
+}
+
void CBroom::PlayerInput(_float fTimeDelta)
{
@@ -391,7 +440,10 @@ void CBroom::Free()
{
__super::Free();
- SAFE_RELEASE(m_pWindEffect);
+ SAFE_RELEASE(m_pWindEffect);
+ SAFE_RELEASE(m_pBroomTrail);
+ SAFE_RELEASE(m_pBoostScreenFX);
+
}
#ifdef _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Broom_States.cpp b/Jusin154_Team3D/Client/Private/Broom_States.cpp
index e9d57c1dc..fd4383ae6 100644
--- a/Jusin154_Team3D/Client/Private/Broom_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Broom_States.cpp
@@ -2,6 +2,7 @@
#include "Broom.h"
#include "GameInstance.h"
+#include "TrailObject.h"
#pragma region STATE
#include "State_Idle.h"
@@ -119,6 +120,10 @@ void CBroom::Behavior_MoveEnter()
{
pair<_uint, _bool> pairAnimInfo = {};
m_pFSM->Enable_State(FSMSTATE::MOVE);
+
+
+ m_pBroomTrail->SetDissolve(false);
+ m_pBroomTrail->Get_Component()->Reset_Trail();
}
HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
@@ -563,6 +568,8 @@ void CBroom::Behavior_Broom_TurboFlyEnter()
m_bHoverToggle = false;
pairAnimInfo = pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+
+ Boost_Effect_Visible(true);
}
HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
@@ -749,6 +756,8 @@ void CBroom::Behavior_Broom_TurboFlyExit()
{
m_pFSM->Disable_State(FSMSTATE::TURBOFLY);
m_pModelCom->Set_BlendDuration(0.3f);
+
+ Boost_Effect_Visible(false);
}
diff --git a/Jusin154_Team3D/Client/Private/DecendoSide.cpp b/Jusin154_Team3D/Client/Private/DecendoSide.cpp
index eac181609..dd8d04b10 100644
--- a/Jusin154_Team3D/Client/Private/DecendoSide.cpp
+++ b/Jusin154_Team3D/Client/Private/DecendoSide.cpp
@@ -116,6 +116,7 @@ HRESULT CDecendoSide::Pre_Setting(CGameObject* pObject, void* pArg)
m_isTrailEnd = false;
m_isParticleEnd = false;
+ m_pWandTrail->SetDissolve(false);
m_pWandLight->Set_Visible(true);
m_pWand_Fire->Set_Visible(true);
diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp
index a39378b13..23c035ede 100644
--- a/Jusin154_Team3D/Client/Private/EffectObject.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp
@@ -720,6 +720,11 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel)
CloseHandle(hFile);
+ if (m_EffectInfo.isScreenFX == true)
+ {
+ XMStoreFloat4x4(&m_ScreenViewMatrix, XMMatrixIdentity());
+ XMStoreFloat4x4(&m_OrthographicMatrix, XMMatrixOrthographicLH(g_iWinSizeX, g_iWinSizeY, 0.f, 1.f));
+ }
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp
index 01ab839fb..c489367f8 100644
--- a/Jusin154_Team3D/Client/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp
@@ -53,6 +53,7 @@
#include "Blink.h"
#include "Transformation.h"
#include "Avadakedavra.h"
+#include "Reparo.h"
#include "Goblin_ProtegoHit.h"
#include "Duelist_ProtegoHit.h"
@@ -512,6 +513,16 @@ HRESULT CEffectPool::Ready_Effect()
return pEffect; }
))) return E_FAIL;
+ if (FAILED(Create_Effect(SKILL_TYPE::REPARO, 3, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CReparo* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Goblin_Attack.cpp b/Jusin154_Team3D/Client/Private/Goblin_Attack.cpp
index b5ad316d3..fb816afe3 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_Attack.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_Attack.cpp
@@ -6,6 +6,7 @@
#include "Wand.h"
#include "Player.h"
#include "Goblin_BattleAxe.h"
+#include "TrailObject.h"
CGoblin_Attack::CGoblin_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CEffect_Container{ pDevice, pContext }
@@ -44,7 +45,11 @@ HRESULT CGoblin_Attack::Initialize(void* pArg)
m_pPT1 = Get_PartObject("Goblin_Particle");
m_pPT2 = Get_PartObject("Goblin_Particle2");
+ m_pAttack_Trail = Get_PartObject();
+ SAFE_ADDREF(m_pPT1);
+ SAFE_ADDREF(m_pPT2);
+ SAFE_ADDREF(m_pAttack_Trail);
m_fDuration = 2.f;
return S_OK;
@@ -66,9 +71,14 @@ void CGoblin_Attack::Update(_float fTimeDelta)
Update_Event(fTimeDelta);
- m_pPT1->Get_Component()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
- m_pPT2->Get_Component()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
+ _matrix WorldMat = m_pOwner->Get_Owner()->Get_Component()->Get_XMWorldMatrix();
+ _matrix BoneMat = XMLoadFloat4x4(&m_vMat);
+
+ m_pPT1->Get_Component()->Set_WorldMatrix(BoneMat /* * WorldMat*/);
+ m_pPT2->Get_Component()->Set_WorldMatrix(BoneMat /* * WorldMat*/ );
+
+ m_pAttack_Trail->Trail_Update(BoneMat, fTimeDelta);
}
@@ -96,12 +106,14 @@ HRESULT CGoblin_Attack::Pre_Setting(CGameObject* pObject, void* pArg)
//m_pPT1->Get_Component()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
//m_pPT2->Get_Component()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
- m_pPT1->Get_Component()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
- m_pPT2->Get_Component()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
+ _matrix BoneMat = XMLoadFloat4x4(&m_vMat);
+
+ m_pPT1->Get_Component()->Set_WorldMatrix(BoneMat);
+ m_pPT2->Get_Component()->Set_WorldMatrix(BoneMat);
m_pPT1->Set_Visible(true);
m_pPT2->Set_Visible(true);
-
+ m_pAttack_Trail->Set_Visible(true);
return S_OK;
}
@@ -174,6 +186,10 @@ void CGoblin_Attack::Free()
{
__super::Free();
+ SAFE_RELEASE(m_pPT1);
+ SAFE_RELEASE(m_pPT2);
+ SAFE_RELEASE(m_pAttack_Trail);
+
}
#ifdef _DEBUG
void CGoblin_Attack::Describe_Entity()
diff --git a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp
index db38f0cc6..8d77f55ab 100644
--- a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp
+++ b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp
@@ -44,6 +44,7 @@ HRESULT CGoblin_BattleAxe::Initialize(void* pArg)
void CGoblin_BattleAxe::Priority_Update(_float fTimeDelta)
{
+
if (m_bVisible) {
XMStoreFloat4(&m_vStartAxePos, Get_WorldPostion());
XMStoreFloat4(&m_vStartGripPos, Get_WorldPostion());
@@ -58,7 +59,14 @@ void CGoblin_BattleAxe::Priority_Update(_float fTimeDelta)
}
m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
- XMStoreFloat4x4(&m_vAxeMat, XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone")) * m_pTransformCom->Get_XMWorldMatrix());
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone"));
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ XMStoreFloat4x4(&m_vAxeMat, BoneMat * m_pTransformCom->Get_XMWorldMatrix());
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/LeviosoSide.cpp b/Jusin154_Team3D/Client/Private/LeviosoSide.cpp
index 9c0bbddcf..2f233c1da 100644
--- a/Jusin154_Team3D/Client/Private/LeviosoSide.cpp
+++ b/Jusin154_Team3D/Client/Private/LeviosoSide.cpp
@@ -107,6 +107,7 @@ HRESULT CLeviosoSide::Pre_Setting(CGameObject* pObject, void* pArg)
m_pWandLight->Set_Visible(true);
+ m_pWandTrail->SetDissolve(false);
/*트레일 초기화 */
m_pWandTrail->Set_Visible(true);
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 367fd1845..ee854dd4d 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -191,6 +191,7 @@
#include "AccioSide.h"
#include "TransformationSide.h"
#include "AvadakedavraSide.h"
+#include "Reparo.h"
#include "Protego_Hit.h"
#include "Goblin_ProtegoHit.h"
@@ -2113,6 +2114,12 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Base_Effect_MRO"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("C:/MeshTable/Game/Environment//MasterMaterials/BaseTextures/T_Base011_MRO.dds"), 0)))) {
+ return E_FAIL;
+ }
+
#pragma region EFFECT
Asset_FileLoad("../Bin/Resources/Textures/Effect/Trails", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
@@ -2717,6 +2724,10 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CReparo::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLightning::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
diff --git a/Jusin154_Team3D/Client/Private/MageSide.cpp b/Jusin154_Team3D/Client/Private/MageSide.cpp
index af2994919..d00c5a72b 100644
--- a/Jusin154_Team3D/Client/Private/MageSide.cpp
+++ b/Jusin154_Team3D/Client/Private/MageSide.cpp
@@ -42,8 +42,11 @@ HRESULT CMageSide::Initialize(void* pArg)
m_wstrEffectName = L"MageSide";
m_pMage_PT = Get_PartObject("Mage_PT0");
+ m_pMage_Fire = Get_PartObject("Mage_Fire");
+
m_pMage_Trail = Get_PartObject("Mage_Trail");
+
SAFE_ADDREF(m_pMage_PT);
SAFE_ADDREF(m_pMage_Trail);
@@ -52,6 +55,7 @@ HRESULT CMageSide::Initialize(void* pArg)
m_Events.emplace(3.f, [&]() {
m_isParticleEnd = true;
m_pMage_PT->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+ m_pMage_Fire->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
});
@@ -87,8 +91,12 @@ void CMageSide::Update(_float fTimeDelta)
_matrix CombinedMat = BoneMat * WorldMat;
- if(m_isParticleEnd == false)
+ if (m_isParticleEnd == false)
+ {
m_pMage_PT->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+ m_pMage_Fire->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+ }
+
m_pMage_Trail->Trail_Update(CombinedMat, fTimeDelta);
}
@@ -116,9 +124,11 @@ HRESULT CMageSide::Pre_Setting(CGameObject* pObject, void* pArg)
m_pMage_Trail->Get_Component()->Reset_Trail();
m_pMage_PT->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+ m_pMage_Fire->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
m_pMage_PT->Set_Visible(true);
m_pMage_Trail->Set_Visible(true);
+ m_pMage_Fire->Set_Visible(true);
m_isParticleEnd = false;
@@ -197,6 +207,7 @@ void CMageSide::Free()
SAFE_RELEASE(m_pMage_PT);
SAFE_RELEASE(m_pMage_Trail);
+ SAFE_RELEASE(m_pMage_Fire);
}
#ifdef _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp
index 4c4bfe1fa..0b7dd9f52 100644
--- a/Jusin154_Team3D/Client/Private/Player.cpp
+++ b/Jusin154_Team3D/Client/Private/Player.cpp
@@ -550,8 +550,6 @@ void CPlayer::Trigger(CTimeSocket& Socket)
m_pTransformCom->RotationQ(pContents->pxTransform.q);
m_pTransformCom->RewindMomentum();
} break;
- }
- break;
case TIMESOCKET_FUNC::TRANSLATION_LERP:
{
@@ -806,64 +804,6 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
fMixerFactor = 0.5f;
iColorMixerMethod = 1;
break;
- case PLAYER_MESH_ORDER::SHOES:
- bUseColorMixer = true;
- iColorParam = 0x614242;
- fMixerFactor = 0.5f;
- iColorMixerMethod = 1;
- break;
- case PLAYER_MESH_ORDER::UPPER:
- bUseColorMixer = true;
- iColorParam = 0xBFAC29;
- fMixerFactor = 0.658333f;
- iColorMixerMethod = 1;
- break;
- //#ifdef 기무리
- //
- // case PLAYER_MESH_ORDER::ROBE_CLOTH:
- // {
- // CMesh* pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
- // _uint MeshBoneCount = pMesh->Get_NumBone();
- //
- // for (_uint i = 0; i < MeshBoneCount; ++i)
- // {
- // XMStoreFloat4x4(&SkinMatrices[i], XMMatrixIdentity());
- // }
- //
- // _uint temp = 0;
- // vector<_uint> globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
- // vector<_int> boneIndices = pMesh->Get_BoneIndices();
- //
- // for (_uint i = 0; i < MeshBoneCount; ++i)
- // {
- // _uint global = boneIndices[i];
- // if (global == 38)
- // continue;
- // if (globalMask[global] == 1)
- // {
- // SkinMatrices[i] = m_pRobePart->Get_RobeJointAnchorMatrix(temp++);
- // }
- // }
- //
- // GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f);
- //
- // if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {
- // return E_FAIL;
- // }
- //
- //
- // if (FAILED(m_pShaderCom->Bind_Matrices(
- // "g_BoneMatrices",
- // SkinMatrices.data(),
- // (_int)SkinMatrices.size()
- // )))
- // {
- // return E_FAIL;
- // }
- // }
- // break;
- //#endif // _DEBUG
-
default:
break;
}
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
index 3634dadb7..dbfbfc91b 100644
--- a/Jusin154_Team3D/Client/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -2645,6 +2645,43 @@ void CPlayer::Behavior_Broom_DismountExit()
m_bOnce = false;
}
+
+void CPlayer::Attach_Broom()
+{
+ if (m_pBroom->Get_Ride()) {
+ _matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
+ _matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
+
+ _vector Scale, Rot, Trans;
+
+ XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal);
+
+ _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
+
+ m_OffsetPos = { 0.f,1.f,0.f };
+
+ _matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
+ m_OffsetPos.y, m_OffsetPos.z);
+
+ _vector BS, BR, BT;
+ XMMatrixDecompose(&BS, &BR, &BT, BroomWorld);
+ _matrix BroomWorld_NoScale =
+ XMMatrixRotationQuaternion(BR) *
+ XMMatrixTranslationFromVector(BT);
+
+
+ _matrix SocketWorld = BoneNoScale * Offset * BroomWorld_NoScale;
+
+ _matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f));
+
+ _matrix FinalWorld = FixRot * SocketWorld;
+
+ m_pTransformCom->Set_WorldMatrix(FinalWorld);
+ m_pCharacter_Controller->Set_Position(FinalWorld.r[3]);
+ }
+}
+
+
void CPlayer::Player_InterpTurn(_float fTimeDelta)
{
_uint iCurrIndex = m_pModelCom->Get_AnimIndex();
@@ -2710,6 +2747,8 @@ void CPlayer::Player_InterpTurn(_float fTimeDelta)
}
}
+
+
void CPlayer::Throwing_Interactive()
{
if (nullptr == m_pGrapInteractive) {
@@ -2724,46 +2763,12 @@ void CPlayer::Throwing_Interactive()
vDir = m_pTransformCom->Get_State(STATE::LOOK);
}
m_pGrapInteractive->Set_KinematicFlag(false);
-
+
pBody->Add_Force(pBody->Get_Mass() * vDir * (vDistance / 1.5f), PSX::PxForceMode::eIMPULSE);
SAFE_RELEASE(m_pGrapInteractive);
}
-void CPlayer::Attach_Broom()
-{
- if (m_pBroom->Get_Ride()) {
- _matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
- _matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
-
- _vector Scale, Rot, Trans;
-
- XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal);
-
- _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
-
- m_OffsetPos = { 0.f,1.f,0.f };
-
- _matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
- m_OffsetPos.y, m_OffsetPos.z);
-
- _vector BS, BR, BT;
- XMMatrixDecompose(&BS, &BR, &BT, BroomWorld);
- _matrix BroomWorld_NoScale =
- XMMatrixRotationQuaternion(BR) *
- XMMatrixTranslationFromVector(BT);
-
-
- _matrix SocketWorld = BoneNoScale * Offset * BroomWorld_NoScale;
-
- _matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f));
-
- _matrix FinalWorld = FixRot * SocketWorld;
-
- m_pTransformCom->Set_WorldMatrix(FinalWorld);
- m_pCharacter_Controller->Set_Position(FinalWorld.r[3]);
- }
-}
void CPlayer::ProcessHitBehavior()
{
@@ -2967,6 +2972,8 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
pairAnimInfo = m_Animation[STATEANIM::REPARO_START];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
+ m_pEffectPool->Use_Skill(SKILL_TYPE::REPARO, Get_PartObject());
+
Add_Event(pairAnimInfo.first,
[this]() {
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::REPARO_LOOP];
@@ -2976,7 +2983,9 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
Add_Event(m_Animation[STATEANIM::REPARO_LOOP].first,
[this]() {
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::REPARO_END];
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); },
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
+
+ },
0.95f);
}
break;
diff --git a/Jusin154_Team3D/Client/Private/Reparo.cpp b/Jusin154_Team3D/Client/Private/Reparo.cpp
new file mode 100644
index 000000000..52ee61fca
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Reparo.cpp
@@ -0,0 +1,208 @@
+#include "pch.h"
+#include "Reparo.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Player.h"
+#include "Wand.h"
+#include "TrailObject.h"
+
+
+CReparo::CReparo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+
+{
+}
+
+CReparo::CReparo(const CReparo& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CReparo::Initialize_Prototype()
+{
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Reparo")))
+ return E_FAIL;
+
+ return S_OK;
+
+}
+
+HRESULT CReparo::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Create_Effect()))
+ return E_FAIL;
+
+ m_wstrEffectName = L"Reparo";
+
+ m_pWandLight = Get_PartObject("Wand_Light");
+ m_pWandTrail = Get_PartObject();
+ m_pWandParticle = Get_PartObject("Reparo_Wand_PT");
+
+ SAFE_ADDREF(m_pWandLight);
+ SAFE_ADDREF(m_pWandTrail);
+ SAFE_ADDREF(m_pWandParticle);
+
+ m_fDuration = 10.f;
+
+
+
+ m_Events.emplace(6.f, [&]() {
+ m_isParticleEnd = true;
+ m_pWandTrail->SetDissolve(true);
+ m_pWandParticle->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f , -999.f , 0.f , 1.f));
+ });
+
+ return S_OK;
+}
+
+void CReparo::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CReparo::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+ CWand* pWand = static_cast(m_pOwner);
+
+ if (pWand == nullptr)
+ return;
+
+ m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+
+
+ _matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix();
+ m_pWandTrail->Oneside_Rope_Trail_Update(TrailMat, fTimeDelta);
+
+ if (m_isParticleEnd == false)
+ {
+ m_pWandParticle->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+ }
+
+}
+
+void CReparo::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CReparo::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+
+ CWand* pWand = static_cast(m_pOwner);
+
+ if (pWand == nullptr)
+ return E_FAIL;
+
+ m_isTrailEnd = false;
+ m_isParticleEnd = false;
+ m_pWandTrail->SetDissolve(false);
+
+ m_pWandLight->Set_Visible(true);
+ m_pWandParticle->Set_Visible(true);
+
+ /*트레일 초기화 */
+ m_pWandTrail->Set_Visible(true);
+
+ m_pWandTrail->Get_Component()->Reset_Trail();
+
+ m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+ m_pWandParticle->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
+ return S_OK;
+}
+
+HRESULT CReparo::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CReparo::Ready_Child()
+{
+ return S_OK;
+}
+
+CReparo* CReparo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CReparo* pInstance = new CReparo(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CReparo");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CReparo::Clone(void* pArg, CGameObject* pOwner)
+{
+ CReparo* pInstance = new CReparo(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CReparo");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CReparo::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+
+}
+
+void CReparo::Free()
+{
+ __super::Free();
+
+
+ Safe_Release(m_pWandLight);
+ Safe_Release(m_pWandTrail);
+ Safe_Release(m_pWandParticle);
+}
+#ifdef _DEBUG
+
+void CReparo::Describe_Entity()
+{
+
+}
+
+#endif // _DEBUG
+
+HRESULT CReparo::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/TransformationSide.cpp b/Jusin154_Team3D/Client/Private/TransformationSide.cpp
index b4d6210ac..7b62bbf24 100644
--- a/Jusin154_Team3D/Client/Private/TransformationSide.cpp
+++ b/Jusin154_Team3D/Client/Private/TransformationSide.cpp
@@ -120,6 +120,7 @@ HRESULT CTransformationSide::Pre_Setting(CGameObject* pObject, void* pArg)
m_isParticleEnd = false; // 파티클이 일정시간이 되면 나오지 않게 하려고
m_pWandLight->Set_Visible(true);
+ m_pWandTrail->SetDissolve(false);
/*트레일 초기화 */
m_pWandTrail->Set_Visible(true);
diff --git a/Jusin154_Team3D/Client/Private/Troll_States.cpp b/Jusin154_Team3D/Client/Private/Troll_States.cpp
index 6a1e99492..ee882ee44 100644
--- a/Jusin154_Team3D/Client/Private/Troll_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Troll_States.cpp
@@ -797,6 +797,11 @@ void CTroll::Behavior_DeadEnter()
m_pRigidBody->SetActive(false);
m_pCharacter_Controller->SetActive(false);
+ m_pTroll_Particle->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -9999.f, 0.f, 1.f));
+ m_pTroll_Particle2->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -9999.f, 0.f, 1.f));
+
+ m_pLeft_Smoke->Set_Visible(false);
+ m_pRight_Smoke->Set_Visible(false);
Add_Event(pairAnimInfo.first,
[this]() {
diff --git a/Jusin154_Team3D/Client/Public/Broom.h b/Jusin154_Team3D/Client/Public/Broom.h
index 9e5d126da..12f7a934b 100644
--- a/Jusin154_Team3D/Client/Public/Broom.h
+++ b/Jusin154_Team3D/Client/Public/Broom.h
@@ -97,6 +97,11 @@ class CBroom final : public CUnit
BroomInput m_Input;
class CEffectParts* m_pWindEffect = { nullptr };
+
+ class CEffectParts* m_pBoostScreenFX = { nullptr };
+ class CTrailObject* m_pBroomTrail = { nullptr };
+ const _float4x4* m_pBroom_TailMat = { nullptr };
+
_float m_fCameraOffset = { 10.f };
private:
@@ -105,7 +110,7 @@ class CBroom final : public CUnit
void Update_CameraCoordinateSystem();
void PlayerInput(_float fTimeDelta);
-
+ void Boost_Effect_Visible(_bool isVisible);
public:
static CBroom* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
diff --git a/Jusin154_Team3D/Client/Public/Goblin_Attack.h b/Jusin154_Team3D/Client/Public/Goblin_Attack.h
index aa9a247c7..6c8cc8937 100644
--- a/Jusin154_Team3D/Client/Public/Goblin_Attack.h
+++ b/Jusin154_Team3D/Client/Public/Goblin_Attack.h
@@ -31,9 +31,10 @@ class CGoblin_Attack final : public CEffect_Container
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
private:
- _wstring m_wstrEffectName = {};
+ _wstring m_wstrEffectName = {};
class CEffectParts* m_pPT1 = { nullptr };
class CEffectParts* m_pPT2 = { nullptr };
+ class CTrailObject* m_pAttack_Trail = { nullptr };
_float4x4 m_vMat = {};
public:
static CGoblin_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
diff --git a/Jusin154_Team3D/Client/Public/MageSide.h b/Jusin154_Team3D/Client/Public/MageSide.h
index a8db89826..64e7d9d33 100644
--- a/Jusin154_Team3D/Client/Public/MageSide.h
+++ b/Jusin154_Team3D/Client/Public/MageSide.h
@@ -34,6 +34,7 @@ class CMageSide final : public CEffect_Container
_wstring m_wstrEffectName = {};
class CEffectParts* m_pMage_PT = { nullptr };
+ class CEffectParts* m_pMage_Fire = { nullptr };
class CTrailObject* m_pMage_Trail = { nullptr };
_bool m_isParticleEnd = {};
diff --git a/Jusin154_Team3D/Client/Public/Reparo.h b/Jusin154_Team3D/Client/Public/Reparo.h
new file mode 100644
index 000000000..8b1ee4f57
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Reparo.h
@@ -0,0 +1,52 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CReparo final : public CEffect_Container
+{
+private:
+ CReparo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CReparo(const CReparo& rhs);
+ virtual ~CReparo() = 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, void* pArg = nullptr) 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 = {};
+
+ _bool m_isTrailEnd = {};
+ _float4x4 m_TrailStopMat = {};
+ _bool m_isParticleEnd = {};
+
+ class CEffectParts* m_pWandLight = { nullptr };
+ class CEffectParts* m_pWandParticle = { nullptr };
+ class CTrailObject* m_pWandTrail = { nullptr };
+public:
+ static CReparo* 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
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Bombard_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Bombard_Trail.trail
index a973309be..6ca98cea7 100644
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Bombard_Trail.trail and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BombardaSide/Bombard_Trail.trail differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/BoostParticle_Red.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/BoostParticle_Red.bin
new file mode 100644
index 000000000..6a07e1766
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/BoostParticle_Red.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4bfec53a351cdf5e7ec5216129687226be42f20ff6eb99cc18e85cad71f1e2b3
+size 1225
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/BoostParticle_Yellow.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/BoostParticle_Yellow.bin
new file mode 100644
index 000000000..2fde3a861
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/BoostParticle_Yellow.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:95c82154b1ca1de1d09e23b48a7124751c08f03bc6bb33ddfac3c072a890ddac
+size 1225
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/Booster_ScreenFX.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/Booster_ScreenFX.bin
new file mode 100644
index 000000000..ef6eadf86
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/Booster_ScreenFX.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:48058f203cc122f819851508bceccc0d9f770dee93b0897c0682335d4aeb2e44
+size 1265
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/Broom_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/Broom_Trail.trail
new file mode 100644
index 000000000..8096e79bb
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomEffect/Broom_Trail.trail differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Bubble.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Bubble.bin
new file mode 100644
index 000000000..effbd6cd1
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Bubble.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:de8c9c0c539a4431037b66b2e40f47f3fc61c301bb2c211f761e8883cb358c9c
+size 1194
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Bubble_Distortion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Bubble_Distortion.bin
new file mode 100644
index 000000000..3451a1639
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Bubble_Distortion.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bcd873348c12d8e19d0aea35307e79f24cdba645a8b928bba6e237ecc0beab54
+size 1103
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Firewark_Blue.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Firewark_Blue.bin
new file mode 100644
index 000000000..9ff5217ca
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Firewark_Blue.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:01339ee98636732b8c5b40d485cbbb8c3bd4b8af36475f104ab180d6cd547704
+size 1235
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Firewark_Red.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Firewark_Red.bin
new file mode 100644
index 000000000..ae1ed14c5
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Firewark_Red.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:21a98a4194b7e467d54c3e03d750320f91d130391a3c05299abda34fb61f9112
+size 1235
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Firewark_Yellow.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Firewark_Yellow.bin
new file mode 100644
index 000000000..09dd0582d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Firewark_Yellow.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e378fbf4d76616f4359bfb90b010485346b5f80e02c500b4b77c5d06f1727a20
+size 1235
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Hit_Bubble.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Hit_Bubble.bin
new file mode 100644
index 000000000..4aac98b59
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Hit_Bubble.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:aba4f8fecff5f63066ea32b8f2301b5ed4f075ab82f2c80ade12243dfc9924e2
+size 1196
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Ring_Blur.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Ring_Blur.bin
new file mode 100644
index 000000000..5ee9fc96e
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BroomRace/Ring_Blur.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:60a1b800160582d4bf151b23c8d1abb53565eb75fb4993d77fcc68a8d3b1fa73
+size 1152
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinAttack/Attack_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinAttack/Attack_Trail.trail
new file mode 100644
index 000000000..53a511046
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Goblin/GoblinAttack/Attack_Trail.trail differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_Fire.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_Fire.bin
new file mode 100644
index 000000000..90a6a5d02
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/MageSide/Mage_Fire.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3473d09b79854983ac84be8eebe75492b471b7a3dbcbfc3928275175f625110f
+size 1202
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin
index f68854280..317adccde 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_Lay_Corrupted.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4c7ad03cecbde11ec6592986521b2aa82f9cbed0b00dd929da9b36e42b37ac82
-size 1223
+oid sha256:0391bf759f9a9473d6f9a400e30f94b4a5697dc790487c751d50838777d3c06f
+size 1243
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin
index 3d0b37781..6b551c46a 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Hit_R.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:53f49b5eef440f5809dfca441703f486126c8a29f8527283beed85fdf0ec6aae
-size 1252
+oid sha256:05e136318176b94229550fa95bd4c72af999e8cd9f25424bc8cd0f2093341531
+size 1202
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin
index b2159b487..c98744bb9 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:2cb129055f93b9c0b06f1852e54a8054f413476712d587a3782299487ec6458f
+oid sha256:c880815795d41f00d07e3cff55ed9e639432ced9e702ae916e6c6c1bae8c3e65
size 1350
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin
index ed7602741..5ca6b33e8 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/GoblinMage/NomalAttack/Proj_PT2.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3d3c6d4eb30a8e6fa88a4edaf64fb08c0e9db2d686ecda24bb05aa501157e7e2
+oid sha256:41e9d8a1d454ae696fb9595fca5b12acaa1ffca01e92b5947112e805e787051f
size 1372
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinAttack.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinAttack.bin
index 8c07ff7b8..8ee6dccce 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinAttack.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinAttack.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:22a7983d4691c81dba0003b8c907e2d47cb25e86ef5626c085dd8d46041edc54
-size 159
+oid sha256:30d0b5331529a7fbabda98ac000a0a1fa1bbb3496759138117b5396ab9990a96
+size 235
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin
index f4ce96cb6..62565485d 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/MageSide.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d35ef44f7e2ccae5159b052b7d4e381461eb2f97f5a20f9b6f61fd6a726a1f38
-size 148
+oid sha256:f867ff483291f5844fd038f36dea098d257d91a8758c4a648dd91e55c3259523
+size 219
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Reparo.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Reparo.bin
new file mode 100644
index 000000000..dcc20f31c
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Reparo.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dddd30442abb61f1761205ac5f9779acaccf7e0b1fbf8e578e65bfb316d5a5ee
+size 192
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Reparo/Reparo_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Reparo/Reparo_Trail.trail
new file mode 100644
index 000000000..529220201
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Reparo/Reparo_Trail.trail differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Reparo/Reparo_Wand_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Reparo/Reparo_Wand_PT.bin
new file mode 100644
index 000000000..c499f5707
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Reparo/Reparo_Wand_PT.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:13cb3568cd6e4f78aba34f05e93e55d970ca97dbe32ba9a3fd87f865a782571f
+size 1209
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Reparo/Wand_Light.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Reparo/Wand_Light.bin
new file mode 100644
index 000000000..a37f7de73
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Reparo/Wand_Light.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dd6cfc9d4a380580efffea18dceb4a9e23c81443a6e28439011a929bf63f8820
+size 1145
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/ScreenFX/Wind.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/ScreenFX/Wind.bin
index 7c9a2250d..029e65baf 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/ScreenFX/Wind.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/ScreenFX/Wind.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:27d24dd14d81bd4b1387f0c3564ed4e0fa301becf0c2270e377eddb083dc2231
+oid sha256:4d9742c6c18581c7c5bb9fc8773c73227a80fe8ffaa0bd51461af9e6179f235a
size 1222
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_AlphaMap.dds b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_AlphaMap.dds
index df19cee74..4f509bd01 100644
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_AlphaMap.dds and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Terrain/Hogsmeade_AlphaMap.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Wand/Wand.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Wand/Wand.bin
index 302d61b9f..23cdd330f 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Wand/Wand.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Wand/Wand.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:08c0e53542fa6f5b850e345c0df241aa59ddaa100415d6f2d9277c590f580671
+oid sha256:a95ac7cb4d69f8780dcee6b6ca9b0910dcffad96c571d48e6dc2464d7229c314
size 68978
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index 1f280176e..8c53839c9 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -207,6 +207,7 @@ call Update_Shaders.bat
+
@@ -256,6 +257,10 @@ call Update_Shaders.bat
+
+
+
+
@@ -476,6 +481,7 @@ call Update_Shaders.bat
+
@@ -499,6 +505,7 @@ call Update_Shaders.bat
+
@@ -549,6 +556,10 @@ call Update_Shaders.bat
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index 6ceddf134..e30df2598 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -801,13 +801,19 @@
{9b246a74-cf6e-4f02-86fb-0a499cb39d4e}
-
+
{aa6ef154-b82d-42eb-82a7-f8b7f6631a1e}
{29bd6d08-5bfd-48ca-bd32-40824c276032}
+
+ {8c55a8be-b0bf-4d8b-ab30-7b7c883f9bd3}
+
+
+ {e0803999-ff32-4356-8a06-2b5a3bc7d49b}
+
@@ -1628,13 +1634,28 @@
02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Troll_Rush
-
+
02.GameObjects\Dummys\DummyNPC
02.GameObjects\ReparoObject
+
+ 02.GameObjects\Broom\BroomState
+
+
+ 02.GameObjects\Broom\BroomState
+
+
+ 02.GameObjects\Broom\BroomState
+
+
+ 02.GameObjects\Broom\BroomState
+
+
+ 02.GameObjects\Layer_Effect\Effect_Editor\Effect\12.BroomBoost
+
@@ -2463,13 +2484,31 @@
02.GameObjects\Layer_Effect\Effect_Editor\Effect\Monster_Effect\Troll_Rush
-
+
02.GameObjects\Dummys\DummyNPC
02.GameObjects\ReparoObject
+
+ 02.GameObjects\Broom\BroomState
+
+
+ 02.GameObjects\Broom\BroomState
+
+
+ 02.GameObjects\Broom\BroomState
+
+
+ 02.GameObjects\Broom\BroomState
+
+
+ 02.GameObjects\Broom\BroomState
+
+
+ 02.GameObjects\Layer_Effect\Effect_Editor\Effect\12.BroomBoost
+
diff --git a/Jusin154_Team3D/Editor/Private/Broom.cpp b/Jusin154_Team3D/Editor/Private/Broom.cpp
index c0caa9293..e4e06ae22 100644
--- a/Jusin154_Team3D/Editor/Private/Broom.cpp
+++ b/Jusin154_Team3D/Editor/Private/Broom.cpp
@@ -2,14 +2,20 @@
#include "Broom.h"
#include "GameInstance.h"
+#include "InfoInstance.h"
+#include "Unit.h"
+#include "PartObject.h"
+#include "EditEffect.h"
+#include "TrailObject.h"
CBroom::CBroom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- : CGameObject(pDevice, pContext)
+ : CUnit(pDevice, pContext)
{
}
CBroom::CBroom(const CBroom& Prototype)
- : CGameObject(Prototype)
+ : CUnit(Prototype),
+ m_pInfoInstance(CInfoInstance::GetInstance())
{
}
@@ -20,38 +26,159 @@ HRESULT CBroom::Initialize_Prototype()
HRESULT CBroom::Initialize(void* pArg)
{
- if (FAILED(__super::Initialize(pArg)))
+ if (FAILED(__super::Initialize(pArg))) {
return E_FAIL;
+ }
+
+ if (pArg) {
+ m_iIndex = *static_cast<_int*>(pArg);
+ }
- if (FAILED(Ready_Components()))
+ if (FAILED(Ready_Components())) {
return E_FAIL;
+ }
+
+
+ Add_FSM();
+
+
+ Load_AnimXML("../Bin/Resources/Data/AnimList/Broom.xml");
+
+ {
+ CFSM::FSM_DESC FSMDesc{};
+ FSMDesc.pStates = &m_States;
+ FSMDesc.pStateMask = &m_iStateMask;
+
+ m_pFSM->Bind_States(FSMDesc);
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ }
+
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -100.f, 0.f, 1.f));
+
+ m_pParentUnit = dynamic_cast(m_pOwner);
+
+ if (m_pParentUnit->IsAI() == false)
+ {
+ if (FAILED(Ready_Child())) {
+ return E_FAIL;
+ }
+
+ m_pWindEffect->Get_Effect_Info()->isBillboard = false;
+ }
+ else {
+ m_fAISeed = m_pGameInstance->Real_Random_Float(0.f, XM_2PI);
+ m_fAICondition = 1.f;
+ }
- m_pModelCom->Set_AnimationIndex(11,true);
return S_OK;
}
void CBroom::Priority_Update(_float fTimeDelta)
{
+ __super::Priority_Update(fTimeDelta);
}
void CBroom::Update(_float fTimeDelta)
{
+ __super::Update(fTimeDelta);
+
+ Update_CameraCoordinateSystem();
+
+ if (!m_pParentUnit->IsAI()) {
+ PlayerInput(fTimeDelta);
+ //m_pInfoInstance->Set_Broom_Booster_Timer(m_fTurboBoost);
+ }
+ else {
+ m_fAITime += fTimeDelta;
+
+ _float target = 1.f + sinf(m_fAITime * 0.3f + m_fAISeed) * 0.15f;
+
+ m_fAICondition += (target - m_fAICondition) * fTimeDelta * 0.3f;
+
+ m_fAICondition = clamp(m_fAICondition, 0.85f, 1.15f);
+ }
+ if (!m_bRide)
+ {
+ m_bHoverToggle = true;
+ m_fSpeed = 0.f;
+
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ }
+
+ m_pFSM->Update_State(fTimeDelta);
+
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
+#ifdef _DEBUG
Describe_Entity();
+#endif // _DEBUG
+
+ /* 윈드 이펙트 */
+
+ _matrix BroomTail_Mat = XMLoadFloat4x4(m_pBroom_TailMat);
+
+ for (int i = 0; i < 3; ++i) {
+ BroomTail_Mat.r[i] = XMVector3Normalize(BroomTail_Mat.r[i]);
+ }
+
+ m_pBroomTrail->Oneside_Rope_Trail_Update(BroomTail_Mat * m_pTransformCom->Get_XMWorldMatrix(), fTimeDelta);
+
+ if (m_bRide == true && m_pWindEffect != nullptr)
+ {
+ if (m_fSpeed <= 5.f)
+ {
+ m_pWindEffect->Get_Component()->Set_Loop(false);
+ m_pWindEffect->Get_Effect_Info()->isDissolve = true;
+ m_pBroomTrail->SetDissolve(true);
+ m_pWindEffect->Get_Effect_Info()->fSoftMask = 1.f;
+ return;
+ }
+
+ m_pWindEffect->Get_Component()->Set_Loop(true);
+ m_pWindEffect->Get_Effect_Info()->isDissolve = false;
+
+ m_pBroomTrail->SetDissolve(false);
+ m_pWindEffect->Set_Visible(true);
+ m_pWindEffect->Get_Component()->Set_TimeMult(0.5f + m_fSpeed / 20.f);
+ m_pWindEffect->Get_Effect_Info()->fBlurIntensity = m_fSpeed / 30.f;
+
+ m_pBroomTrail->Set_Visible(true);
+
+ }
+
+
}
void CBroom::Late_Update(_float fTimeDelta)
{
+ if (!m_pGameInstance->IsIn_WorldFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius())) {
+ return;
+ }
+ __super::Late_Update(fTimeDelta);
+
+ if (m_bRide == true && m_pWindEffect != nullptr)
+ {
+ CTransform* WindTransform = m_pWindEffect->Get_Component();
+
+ _matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix()/* * XMMatrixRotationAxis(XMVectorSet(0.f , 1.f, 0.f ,0.f), XMConvertToRadians(180.f))*/;
+ WindTransform->Set_WorldMatrix(WorldMat);
+
+ _vector vCameraLook = XMVector3Normalize(m_pGameInstance->Get_CameraLook());
+ WindTransform->Set_State(STATE::POSITION, m_pGameInstance->Get_CamXMPosition() + vCameraLook * m_fCameraOffset);
+
+ }
+
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
+
}
HRESULT CBroom::Render()
{
- if (!m_pModelCom)
+ if (!m_pModelCom) {
return S_OK;
+ }
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
@@ -61,17 +188,23 @@ HRESULT CBroom::Render()
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))) {
return E_FAIL;
}
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
+ if (FAILED(m_pShaderCom->Bind_Matrices(
+ "g_OffsetMatrix",
+ m_pModelCom->Get_OffsetMatrix(i).data(),
+ (_int)m_pModelCom->Get_OffsetMatrix(i).size()
+ )))
+ {
return E_FAIL;
}
+ if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
+ return E_FAIL;
+ }
+
+ m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
@@ -81,6 +214,43 @@ HRESULT CBroom::Render()
return S_OK;
}
+HRESULT CBroom::Ready_Child()
+{
+
+ CPartObject::PARTOBJECT_DESC PartsDesc{};
+
+ PartsDesc.pParentTransform = m_pTransformCom;
+
+ if (FAILED(Add_PartObject("Wind_Screen", NEXT_LEVEL, &m_pWindEffect, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+ m_pWindEffect->Load("../Bin/Resources/Data/Effect/ScreenFX/Wind", static_cast(NEXT_LEVEL));
+
+ ///
+
+ if (FAILED(Add_PartObject("Boost_Screen", NEXT_LEVEL, &m_pBoostScreenFX, &PartsDesc)))
+ {
+ return E_FAIL;
+ }
+ m_pBoostScreenFX->Load("../Bin/Resources/Data/Effect/BroomEffect/Booster_ScreenFX", static_cast(NEXT_LEVEL));
+
+
+ ///
+
+ if (FAILED(Add_PartObject("Broom_Trail", NEXT_LEVEL, &m_pBroomTrail, &PartsDesc))) {
+ return E_FAIL;
+ }
+
+ m_pBroomTrail->Load_Trail("../Bin/Resources/Data/Effect/BroomEffect/Broom_Trail", static_cast(NEXT_LEVEL));
+ m_pBroomTrail->Set_Visible(false);
+
+
+ m_pBroom_TailMat = m_pModelCom->Get_BoneMatrixPtr("thistleSocket");
+
+ return S_OK;
+}
+
HRESULT CBroom::Ready_Components()
{
CTransform::TRANSFORM_DESC Desc = {};
@@ -91,15 +261,36 @@ HRESULT CBroom::Ready_Components()
__super::Ready_Components(&Desc);
+ switch (m_iIndex)
+ {
+ case 0:
+ m_strModelPrototypeTag = TEXT("Prototype_Component_Broom_Model");
+ break;
+ case 1:
+ m_strModelPrototypeTag = TEXT("Prototype_Component_SK_MoonTrimmerBroom_Model");
+ break;
+ case 2:
+ m_strModelPrototypeTag = TEXT("Prototype_Component_DarkWizardBroom_Model");
+ break;
+ case 3:
+ m_strModelPrototypeTag = TEXT("Prototype_Component_WildFireBroom_Model");
+ break;
+ default:
+ break;
+ }
+
/* Com_Model */
- if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Broom_Model"),
- reinterpret_cast(&m_pModelCom))))
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
+ reinterpret_cast(&m_pModelCom)))) {
return E_FAIL;
+ }
/* Com_Shader */
- if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
- reinterpret_cast(&m_pShaderCom))))
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM,
+ reinterpret_cast(&m_pShaderCom)))) {
return E_FAIL;
+ }
+
return S_OK;
}
@@ -109,7 +300,15 @@ HRESULT CBroom::Bind_ShaderResources()
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
return E_FAIL;
}
-
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
+ return E_FAIL;
+ }
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
return E_FAIL;
}
@@ -124,6 +323,85 @@ HRESULT CBroom::Bind_ShaderResources()
return S_OK;
}
+void CBroom::Update_CameraCoordinateSystem()
+{
+ _vector xmvCameraLook = XMVector3Normalize(XMVectorSetY(m_pGameInstance->Get_CameraLook(), 0.f));
+ _vector xmvUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
+ XMStoreFloat3(&m_vCameraRightDir, XMVector3Normalize(XMVector3Cross(xmvUp, xmvCameraLook)));
+ XMStoreFloat3(&m_vCameraLookDir, xmvCameraLook);
+ m_pInfoInstance->Update_CameraCoordinateSystem(m_vCameraLookDir, m_vRimLightColor);
+}
+
+
+void CBroom::PlayerInput(_float fTimeDelta)
+{
+ if (!m_bRide)
+ return;
+ m_Input = {};
+
+ m_Input.Z = m_pGameInstance->Key_Pressing(DIK_W) ? 1.f : 0.f;
+
+ m_Input.X = (m_pGameInstance->Key_Pressing(DIK_D) ? 1.f : 0.f)
+ - (m_pGameInstance->Key_Pressing(DIK_A) ? 1.f : 0.f);
+
+ m_Input.Y = (m_pGameInstance->Key_Pressing(DIK_SPACE) ? 1.f : 0.f)
+ - (m_pGameInstance->Key_Pressing(DIK_LCONTROL) ? 1.f : 0.f + m_pGameInstance->Key_Pressing(DIK_N) ? 1.f : 0.f);
+
+ if (m_pGameInstance->Key_Up(DIK_LSHIFT))
+ {
+ m_bHoverToggle = !m_bHoverToggle;
+ }
+
+ if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
+ {
+ if (m_fTurboBoost != 0.f) {
+ m_fTurboBoost -= fTimeDelta;
+ if (m_fTurboBoost <= 0.f) {
+ m_fTurboBoost = 0.f;
+ }
+ m_Input.bTurbo = true;
+ //m_pInfoInstance->Event_CallBack(TEXT("BroomBooster"), &m_Input.bTurbo);
+ }
+ else {
+ m_Input.bTurbo = false;
+ }
+ m_fTurboBoostChargeDelay = 0.f;
+ }
+ else {
+ m_fTurboBoostChargeDelay += fTimeDelta;
+ if (m_fTurboBoostChargeDelay >= 1.f)
+ {
+ m_fTurboBoost += fTimeDelta;
+ if (m_fTurboBoost >= 5.f)
+ {
+ m_fTurboBoost = 5.f;
+ }
+ }
+ m_Input.bTurbo = false;
+ //m_pInfoInstance->Event_CallBack(TEXT("BroomBooster"), &m_Input.bTurbo);
+ }
+
+ m_bTurbo = m_Input.bTurbo;
+}
+
+void CBroom::Boost_Effect_Visible(_bool isVisible)
+{
+ m_pBoostScreenFX->Get_Component()->Set_Loop(isVisible);
+
+ if (isVisible == true)
+ {
+
+ m_pBoostScreenFX->Set_Visible(true);
+ }
+}
+
+void CBroom::Set_AISpeed(_float speedMul, _float accelMul)
+{
+ m_fAISpeedMul = speedMul;
+ m_fAIAccelMul = accelMul;
+}
+
+
CBroom* CBroom::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CBroom* pInstance = new CBroom(pDevice, pContext);
@@ -154,13 +432,60 @@ void CBroom::Free()
{
__super::Free();
- SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pModelCom);
-
+ SAFE_RELEASE(m_pWindEffect);
+ SAFE_RELEASE(m_pBroomTrail);
+ SAFE_RELEASE(m_pBoostScreenFX);
}
+#ifdef _DEBUG
void CBroom::Describe_Entity()
{
+ GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
+ if (GUI::CollapsingHeader("Broom")) {
+ GUI::DragFloat("MaxSpeed", &m_fFlyMaxSpeed, 0.01f);
+ GUI::DragFloat("Speed", &m_fSpeed, 0.01f);
+ GUI::DragFloat("Accle", &m_fAccel, 0.01f);
+ GUI::DragFloat("Decel", &m_fDecel, 0.01f);
+ string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
+ GUI::Text(AnimList.c_str());
+ GUI::Text("AnimIndex %d", m_pModelCom->Get_AnimIndex());
+
+ GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
+ GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
+ _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);
+
+ if (GUI::Button("ResetTrail"))
+ {
+ SAFE_RELEASE(m_pBroomTrail);
+
+ CPartObject::PARTOBJECT_DESC PartsDesc{};
+
+ PartsDesc.pParentTransform = m_pTransformCom;
+
+ if (FAILED(Add_PartObject("Broom_Trail", NEXT_LEVEL, &m_pBroomTrail, &PartsDesc))) {
+ return ;
+ }
+
+ m_pBroomTrail->Load_Trail("../Bin/Resources/Data/Effect/BroomEffect/Broom_Trail", static_cast(NEXT_LEVEL));
+
+ }
+ }
+ GUI::End();
}
+
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Editor/Private/BroomBoost.cpp b/Jusin154_Team3D/Editor/Private/BroomBoost.cpp
new file mode 100644
index 000000000..647d23599
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/BroomBoost.cpp
@@ -0,0 +1,189 @@
+#include "pch.h"
+#include "BroomBoost.h"
+
+#include "GameInstance.h"
+#include "EditEffect.h"
+
+
+CBroomBoost::CBroomBoost(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CBroomBoost::CBroomBoost(const CBroomBoost& rhs)
+ : CEffect_Container(rhs)
+{
+}
+
+HRESULT CBroomBoost::Initialize_Prototype()
+{
+
+ return S_OK;
+
+}
+
+HRESULT CBroomBoost::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/BroomEffect")))
+ return E_FAIL;
+
+ m_wstrEffectName = L"BroomEffect";
+
+ m_pBoostParticle_Y = Get_PartObject("BoostParticle_Yellow");
+ m_pBoostParticle_R = Get_PartObject("BoostParticle_Red");
+
+ SAFE_ADDREF(m_pBoostParticle_Y);
+ SAFE_ADDREF(m_pBoostParticle_R);
+
+ m_fDuration = 9999.f;
+
+ return S_OK;
+}
+
+void CBroomBoost::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+}
+
+void CBroomBoost::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+ _matrix BroomTail_Mat = XMLoadFloat4x4(m_pBroom_TailMat);
+
+ for (int i = 0; i < 3; ++i) {
+ BroomTail_Mat.r[i] = XMVector3Normalize(BroomTail_Mat.r[i]);
+ }
+
+ _matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix();/* * XMMatrixRotationAxis(XMVectorSet(0.f , 1.f, 0.f ,0.f), XMConvertToRadians(180.f))*/;
+
+
+ m_pBoostParticle_R->Get_Component()->Set_WorldMatrix(BroomTail_Mat * WorldMat);
+ m_pBoostParticle_Y->Get_Component()->Set_WorldMatrix(BroomTail_Mat * WorldMat);
+}
+
+void CBroomBoost::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CBroomBoost::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+ _vector vHitPos = XMLoadFloat4(static_cast<_float4*>(pArg));
+
+ CEditEffect* pBooster_ScreenFX = Get_PartObject("Booster_ScreenFX");
+
+ m_pBroom_TailMat = m_pOwner->Get_Component()->Get_BoneMatrixPtr("lantern_01");
+
+ _matrix BroomTail_Mat = XMLoadFloat4x4(m_pBroom_TailMat);
+
+ for (int i = 0; i < 3; ++i) {
+ BroomTail_Mat.r[i] = XMVector3Normalize(BroomTail_Mat.r[i]);
+ }
+
+ _matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix();/* * XMMatrixRotationAxis(XMVectorSet(0.f , 1.f, 0.f ,0.f), XMConvertToRadians(180.f))*/;
+
+
+ m_pBoostParticle_R->Get_Component()->Set_WorldMatrix(BroomTail_Mat * WorldMat);
+ m_pBoostParticle_Y->Get_Component()->Set_WorldMatrix(BroomTail_Mat * WorldMat);
+
+ pBooster_ScreenFX->Set_Visible(true);
+ m_pBoostParticle_Y->Set_Visible(true);
+ m_pBoostParticle_R->Set_Visible(true);
+
+ pBooster_ScreenFX->Get_Component()->Set_Loop(true);
+
+ return S_OK;
+}
+
+HRESULT CBroomBoost::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CBroomBoost::Ready_Child()
+{
+ return S_OK;
+}
+
+CBroomBoost* CBroomBoost::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CBroomBoost* pInstance = new CBroomBoost(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CBroomBoost");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CBroomBoost::Clone(void* pArg, CGameObject* pOwner)
+{
+ CBroomBoost* pInstance = new CBroomBoost(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CBroomBoost");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CBroomBoost::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ //CTransform* pOtherTransform = p
+ ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc);
+
+}
+
+void CBroomBoost::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pBoostParticle_Y);
+ SAFE_RELEASE(m_pBoostParticle_R);
+}
+#ifdef _DEBUG
+
+void CBroomBoost::Describe_Entity()
+{
+
+}
+
+#endif // _DEBUG
+
+HRESULT CBroomBoost::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Editor/Private/Broom_States.cpp b/Jusin154_Team3D/Editor/Private/Broom_States.cpp
new file mode 100644
index 000000000..3ce4a0001
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Broom_States.cpp
@@ -0,0 +1,889 @@
+#include "pch.h"
+#include "Broom.h"
+
+#include "GameInstance.h"
+#include "TrailObject.h"
+
+#pragma region STATE
+#include "State_Idle.h"
+#include "State_Move.h"
+#include "State_Hover.h"
+#include "State_Fly.h"
+#include "State_Broom_TurboFly.h"
+#pragma endregion
+
+#pragma region States
+
+HRESULT CBroom::InputAction()
+{
+ if (m_Input.bTurbo || m_Input.bHoverToggle)
+ return S_OK;
+
+ return E_FAIL;
+}
+
+
+HRESULT CBroom::InputMove()
+{
+ if (fabs(m_Input.X) > 0.01f ||
+ fabs(m_Input.Y) > 0.01f ||
+ m_Input.Z > 0.f)
+ return S_OK;
+
+ return E_FAIL;
+}
+
+
+HRESULT CBroom::InputKeyUpMove()
+{
+ if (m_pGameInstance->Key_Up(DIK_W)
+ || m_pGameInstance->Key_Up(DIK_A)
+ || m_pGameInstance->Key_Up(DIK_S)
+ || m_pGameInstance->Key_Up(DIK_D))
+ {
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
+HRESULT CBroom::InputSpell()
+{
+ if (
+/* m_pGameInstance->Key_Down(DIK_1)
+ ||*/ m_pGameInstance->Key_Down(DIK_2)
+ || m_pGameInstance->Key_Down(DIK_3)
+ || m_pGameInstance->Key_Down(DIK_4)
+ )
+ {
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
+
+HRESULT CBroom::InputAim()
+{
+ if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON) ||
+ m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
+ {
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
+void CBroom::Behavior_IdleEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::IDLE);
+ pair<_uint, _bool> pairAnimInfo;
+
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+}
+
+HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta)
+{
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ pair<_uint, _bool> pairAnimInfo;
+ if (m_bRide && !m_pFSM->IsEnable(FSMSTATE::MOUNT_B)) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ m_pFSM->Enable_State(FSMSTATE::MOUNT_B);
+ }
+
+ if (SUCCEEDED(InputMove()) || SUCCEEDED(InputAction()))
+ {
+ if (m_bRide)
+ {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
+ }
+
+ if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT_B].first)
+ {
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+ }
+
+ return S_OK;
+}
+
+void CBroom::Behavior_IdleExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::IDLE | FSMSTATE::MOUNT_B);
+}
+
+void CBroom::Behavior_MoveEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::MOVE);
+
+ m_pBroomTrail->SetDissolve(false);
+ m_pBroomTrail->Get_Component()->Reset_Trail();
+}
+
+HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
+{
+ if (false == m_bMove)
+ return S_OK;
+
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
+
+ _bool bFwd = m_Input.Z > 0.f;
+ _bool bLeft = m_Input.X < 0.f;
+ _bool bRight = m_Input.X > 0.f;
+ _bool bUp = m_Input.Y > 0.f;
+ _bool bDown = m_Input.Y < 0.f;
+ _bool bShift = m_Input.bHoverToggle;
+ _bool bTurbo = m_Input.bTurbo;
+
+
+ if (SUCCEEDED(InputMove()) || SUCCEEDED(InputAction()))
+ {
+ if (bFwd)
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ }
+ else if (bLeft)
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ }
+ else if (bRight)
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ }
+ else if (bDown)
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ }
+ else if (bUp)
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ }
+ else if (bShift)
+ {
+ m_pFSM->Change_State(FSMSTATE::FLY);
+ }
+ else if (bTurbo)
+ {
+ m_pFSM->Change_State(FSMSTATE::TURBOFLY);
+ }
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CBroom::Behavior_MoveExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK);
+}
+
+void CBroom::Behavior_Broom_HoverEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::HOVER);
+}
+
+HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
+ _bool bFwd = m_Input.Z > 0.f;
+ _bool bLeft = m_Input.X < 0.f;
+ _bool bRight = m_Input.X > 0.f;
+ _bool bUp = m_Input.Y > 0.f;
+ _bool bDown = m_Input.Y < 0.f;
+ _bool bShift = m_Input.bHoverToggle;
+ _bool bTurbo = m_Input.bTurbo;
+
+ if (false == m_bMove)
+ {
+ m_fTargetSpeed = 0.f;
+
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fDecel;
+
+
+ m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ return S_OK;
+ }
+
+ if (m_bHoverToggle)
+ {
+ _float fTargetVertSpeed = 0.f;
+ if (bUp)
+ fTargetVertSpeed = m_fTurnMaxSpeed;
+ else if (bDown)
+ fTargetVertSpeed = -m_fTurnMaxSpeed;
+ else
+ fTargetVertSpeed = 0.f;
+
+ _float fFactor = (fabsf(fTargetVertSpeed) > fabsf(m_fVerticalSpeed)) ? m_fAccel : m_fDecel;
+ m_fVerticalSpeed += (fTargetVertSpeed - m_fVerticalSpeed) * fTimeDelta * fFactor;
+
+ if (fabsf(m_fVerticalSpeed) > 0.001f)
+ {
+ if (m_fVerticalSpeed > 0.f)
+ m_pTransformCom->Go_LerpUp(m_fVerticalSpeed, fTimeDelta);
+ else
+ m_pTransformCom->Go_LerpDown(-m_fVerticalSpeed, fTimeDelta);
+ }
+
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputMove()))
+ {
+ _float3 vInput = { 0.f, 0.f, 0.f };
+
+ if (bFwd) vInput.z += 1.f;
+ if (bLeft) vInput.x -= 1.f;
+ if (bRight) vInput.x += 1.f;
+ if (bUp) vInput.y += 1.f;
+ if (bDown) vInput.y -= 1.f;
+
+ _float ax = fabsf(vInput.x);
+ _float ay = fabsf(vInput.y);
+ _float az = fabsf(vInput.z);
+
+ _bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0);
+ _vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput));
+
+ if (bFwd)
+ {
+ m_fTargetSpeed = m_fHoverMaxSpeed;
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
+ m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
+ }
+
+ if (vInput.x < 0.f)
+ {
+ if (!bFwd)
+ {
+ m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
+ m_fTargetSpeed = m_fHoverMaxSpeed;
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
+ m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
+ }
+ else {
+ m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
+ }
+
+ }
+ else if (vInput.x > 0.f)
+ {
+ if (!bFwd)
+ {
+ m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
+ m_fTargetSpeed = m_fHoverMaxSpeed;
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
+ m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
+ }
+ else {
+ m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
+ }
+ }
+
+
+ if (ay > ax && ay > az)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_UP_B];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_DOWN_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+ else if (ax >= az)
+ {
+ if (ay >= ax)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_UP_B];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_DOWN_B];
+ }
+ else {
+ if (vInput.x < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_LEFT_B];
+ else if (vInput.x > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_RIGHT_B];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B];
+ }
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+ else
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_UP_B];
+ else if (vInput.y < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_DOWN_B];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B];
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+ }
+ else {
+ m_fTargetSpeed = 0.f;
+
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fDecel;
+
+
+ m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
+ }
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+
+ if (!m_bHoverToggle)
+ {
+ m_pFSM->Change_State(FSMSTATE::FLY);
+ return E_FAIL;
+ }
+
+ if (m_bTurbo)
+ {
+ m_pFSM->Change_State(FSMSTATE::TURBOFLY);
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CBroom::Behavior_Broom_HoverExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::HOVER);
+}
+
+void CBroom::Behavior_Broom_FlyEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::FLY);
+ m_pModelCom->Set_BlendDuration(0.8f);
+ m_bHoverToggle = false;
+ pairAnimInfo = pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+}
+
+HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
+
+ _bool bFwd = m_Input.Z > 0.f;
+ _bool bLeft = m_Input.X < 0.f;
+ _bool bRight = m_Input.X > 0.f;
+ _bool bUp = m_Input.Y > 0.f;
+ _bool bDown = m_Input.Y < 0.f;
+ _bool bShift = m_Input.bHoverToggle;
+ _bool bTurbo = m_Input.bTurbo;
+
+ if (!m_bHoverToggle) {
+
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputMove()))
+ {
+
+ if (bFwd) {
+ m_fTargetSpeed = m_fFlyMaxSpeed;
+ }
+ else {
+ m_fTargetSpeed = m_fFlyTurnMaxSpeed;
+ }
+ }
+ else {
+ m_fTargetSpeed = m_fFlyMaxSpeed;
+ }
+
+ if (m_pParentUnit->IsAI())
+ {
+ m_fTargetSpeed *= m_fAICondition;
+ m_fTargetSpeed *= m_fAISpeedMul;
+ }
+
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fFlyAccel* m_fAIAccelMul;
+ m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
+
+ _float fTargetVertSpeed = 0.f;
+
+ if (bUp)
+ fTargetVertSpeed = m_fTurnMaxSpeed;
+ else if (bDown)
+ fTargetVertSpeed = -m_fTurnMaxSpeed;
+ else
+ fTargetVertSpeed = 0.f;
+
+ _float fFactor = (fabsf(fTargetVertSpeed) > fabsf(m_fVerticalSpeed)) ? m_fFlyAccel : m_fFlyDecel;
+ m_fVerticalSpeed += (fTargetVertSpeed - m_fVerticalSpeed) * fTimeDelta * fFactor;
+
+ if (fabsf(m_fVerticalSpeed) > 0.001f)
+ {
+ if (m_fVerticalSpeed > 0.f)
+ m_pTransformCom->Go_LerpUp(m_fVerticalSpeed, fTimeDelta);
+ else
+ m_pTransformCom->Go_LerpDown(-m_fVerticalSpeed, fTimeDelta);
+ }
+
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputMove()))
+ {
+ _float3 vInput = { 0.f, 0.f, 0.f };
+
+ if (bFwd) vInput.z += 1.f;
+ if (bLeft) vInput.x -= 1.f;
+ if (bRight) vInput.x += 1.f;
+ if (bUp) vInput.y += 1.f;
+ if (bDown) vInput.y -= 1.f;
+
+ _float ax = fabsf(vInput.x);
+ _float ay = fabsf(vInput.y);
+ _float az = fabsf(vInput.z);
+
+ _bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0);
+ _vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput));
+
+ if (vInput.x < 0.f)
+ {
+ /*if (vInput.z <= 0.f)
+ {
+ m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.4f);
+ }
+ else {*/
+ m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.3f);
+ //}
+ }
+ else if (vInput.x > 0.f)
+ {
+ /*if (vInput.z <= 0.f)
+ {
+ m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.4f);
+ }
+ else {*/
+ m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.3f);
+ //}
+ }
+
+
+ if (ay > ax && ay > az)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
+ }
+ else if (ax >= az)
+ {
+ if (ay >= ax)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
+ }
+ else {
+ if (vInput.x < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
+ else if (vInput.x > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
+ }
+ }
+ }
+ else
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
+ else if (vInput.y < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
+ }
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,0.1f);
+ }
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+
+ if (m_bHoverToggle)
+ {
+ m_fTargetSpeed = 0.f;
+
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fFlyDecel;
+
+ m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
+
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+
+ /*if (bShift && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
+ {
+ m_bHoverToggle = false;
+ }*/
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputMove()))
+ {
+ if (fRatio >= 0.5f && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ return E_FAIL;
+ }
+ }
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ return E_FAIL;
+ }
+ }
+
+ if (m_bTurbo)
+ {
+ m_pFSM->Change_State(FSMSTATE::TURBOFLY);
+ return E_FAIL;
+ }
+
+
+ return S_OK;
+}
+
+void CBroom::Behavior_Broom_FlyExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::FLY);
+ m_pModelCom->Set_BlendDuration(0.3f);
+}
+
+void CBroom::Behavior_Broom_TurboFlyEnter()
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ m_pFSM->Enable_State(FSMSTATE::TURBOFLY);
+ m_pModelCom->Set_BlendDuration(0.8f);
+ m_bTurbo = true;
+ m_bHoverToggle = false;
+ pairAnimInfo = pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+
+ Boost_Effect_Visible(true);
+}
+
+HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
+{
+ pair<_uint, _bool> pairAnimInfo = {};
+ _uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
+
+ _bool bFwd = m_Input.Z > 0.f;
+ _bool bLeft = m_Input.X < 0.f;
+ _bool bRight = m_Input.X > 0.f;
+ _bool bUp = m_Input.Y > 0.f;
+ _bool bDown = m_Input.Y < 0.f;
+ _bool bShift = m_Input.bHoverToggle;
+ _bool bTurbo = m_Input.bTurbo;
+
+ if (!m_bHoverToggle)
+ {
+ if (SUCCEEDED(InputMove()))
+ {
+ if (bFwd) {
+ m_fTargetSpeed = m_fTurboMaxSpeed;
+ }
+ else {
+ m_fTargetSpeed = m_fTurboTurnMaxSpeed;
+ }
+ }
+ else {
+ m_fTargetSpeed = m_fTurboMaxSpeed;
+ }
+
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fTurboAccel;
+ m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
+ }
+
+
+ if (!m_bHoverToggle && m_bTurbo) {
+
+ _float fTargetVertSpeed = 0.f;
+
+ if (bUp)
+ fTargetVertSpeed = m_fTurnMaxSpeed;
+ else if (bDown)
+ fTargetVertSpeed = -m_fTurnMaxSpeed;
+ else
+ fTargetVertSpeed = 0.f;
+
+ _float fFactor = (fabsf(fTargetVertSpeed) > fabsf(m_fVerticalSpeed)) ? m_fTurboAccel : m_fTurboDecel;
+ m_fVerticalSpeed += (fTargetVertSpeed - m_fVerticalSpeed) * fTimeDelta * fFactor;
+
+ if (fabsf(m_fVerticalSpeed) > 0.001f)
+ {
+ if (m_fVerticalSpeed > 0.f)
+ m_pTransformCom->Go_LerpUp(m_fVerticalSpeed, fTimeDelta);
+ else
+ m_pTransformCom->Go_LerpDown(-m_fVerticalSpeed, fTimeDelta);
+ }
+
+ if (SUCCEEDED(InputMove()))
+ {
+ _float3 vInput = { 0.f, 0.f, 0.f };
+
+ if (bFwd) vInput.z += 1.f;
+ if (bLeft) vInput.x -= 1.f;
+ if (bRight) vInput.x += 1.f;
+ if (bUp) vInput.y += 1.f;
+ if (bDown) vInput.y -= 1.f;
+
+ _float ax = fabsf(vInput.x);
+ _float ay = fabsf(vInput.y);
+ _float az = fabsf(vInput.z);
+
+ _bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0);
+ _vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput));
+
+ if (vInput.x < 0.f)
+ {
+ if (vInput.z <= 0.f)
+ {
+ Camera_InterpTurn(fTimeDelta * 0.35f);
+ }
+ else {
+ Camera_InterpTurn(fTimeDelta * 0.2f);
+ }
+ }
+ else if (vInput.x > 0.f)
+ {
+ if (vInput.z <= 0.f)
+ {
+ Camera_InterpTurn(fTimeDelta * 0.35f);
+ }
+ else {
+ Camera_InterpTurn(fTimeDelta * 0.2f);
+ }
+ }
+
+
+ if (ay > ax && ay > az)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+ else if (ax >= az)
+ {
+ if (ay >= ax)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
+ }
+ else {
+ if (vInput.x < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
+ else if (vInput.x > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
+ }
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+ else
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
+ else if (vInput.y < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
+ }
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+ }
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+ }
+
+ if (m_bHoverToggle)
+ {
+ m_fTargetSpeed = 0.f;
+
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fTurboDecel;
+
+ m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
+
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+
+ if (bShift && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
+ {
+ m_bHoverToggle = false;
+ }
+ if (SUCCEEDED(InputAction()) || SUCCEEDED(InputMove()))
+ {
+ if (fRatio >= 0.5f && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ }
+ return E_FAIL;
+ }
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ return E_FAIL;
+ }
+ }
+
+ if (!m_bHoverToggle && !m_bTurbo)
+ {
+ m_pFSM->Change_State(FSMSTATE::FLY);
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CBroom::Behavior_Broom_TurboFlyExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::TURBOFLY);
+ m_pModelCom->Set_BlendDuration(0.3f);
+
+ Boost_Effect_Visible(false);
+}
+
+
+void CBroom::Camera_InterpTurn(_float fTimeDelta)
+{
+ if (m_pParentUnit->IsAI())
+ return;
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+
+ _vector xmvCurLook = XMVector4Normalize(
+ XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
+ _float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
+
+ _vector vCameraLook = XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f);
+
+ _vector vCameraRight = XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f);
+
+ _float2 fCamLook = { XMVectorGetX(vCameraLook), XMVectorGetZ(vCameraLook) };
+
+ vCameraRight = XMVector3Normalize(vCameraRight);
+
+ _float angle = CMyTools::Get_Direction2D(vCurLook, fCamLook);
+
+ _float degree = XMConvertToDegrees(angle);
+
+ _vector xmvInput = XMVectorZero();
+
+ if (m_Input.Z> 0.f)
+ xmvInput += vCameraLook;
+ if (m_Input.X > 0.f)
+ xmvInput -= vCameraRight;
+ if (m_Input.X < 0.f)
+ xmvInput += vCameraRight;
+
+ xmvInput = XMVector3Normalize(xmvInput);
+
+ _float2 fInput2D = { XMVectorGetX(xmvInput), XMVectorGetZ(xmvInput) };
+
+ _float targetAngle = XMConvertToDegrees(CMyTools::Get_Direction2D(fCamLook, fInput2D));
+
+ _float angleDiff = degree - targetAngle;
+
+ if (angleDiff > 180.f) {
+ angleDiff -= 360.f;
+ }
+ if (angleDiff < -180.f) {
+ angleDiff += 360.f;
+ }
+
+ _float Offset = 2.f;
+
+ if (angleDiff > Offset)
+ {
+ m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
+ }
+ else if (angleDiff < -Offset)
+ {
+ m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
+ }
+}
+
+void CBroom::Add_FSM()
+{
+#pragma region Behavior_Movement_NotFocus
+ {
+ CState_Idle::STATE_IDLE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
+ }
+
+ {
+ CState_Move::STATE_MOVE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ if (m_bHoverToggle && m_bMove)
+ {
+ _float3 fMove = m_pGameInstance->Get_MouseMove();
+ m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.02f);
+ }
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
+ }
+
+ {
+ CState_Hover::STATE_HOVER_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_HoverEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_HoverExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_HoverExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::HOVER, CState_Hover::Create(&Desc));
+ }
+
+ {
+ CState_Fly::STATE_FLY_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_FlyEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_FlyExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_FlyExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::FLY, CState_Fly::Create(&Desc));
+ }
+
+ {
+ CState_Broom_TurboFly::STATE_BROOM_TURBOFLY_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_TurboFlyEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_TurboFlyExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_TurboFlyExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::TURBOFLY, CState_Broom_TurboFly::Create(&Desc));
+ }
+#pragma endregion
+}
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
index f6ef9bde9..647d0560e 100644
--- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
@@ -20,6 +20,7 @@
#include "Terrain.h"
#include "Troll.h"
#include "Ranrok.h"
+#include "RaceRing.h"
CLevel_EffectViewer::CLevel_EffectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
@@ -87,6 +88,17 @@ HRESULT CLevel_EffectViewer::Initialize()
return E_FAIL;
}
+
+ CRaceRing::RACERING_DESC pDesc = {};
+
+ pDesc.vPosition = _float3(0.f, 0.f, 0.f);
+ pDesc.vScale = _float3(1.f, 1.f, 1.f);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Sky") , &pDesc))) {
+ return E_FAIL;
+ }
+
+
//ZeroMemory(&m_PlaneData, sizeof(m_PlaneData));
//m_PlaneData.eKind = PHYSX_KIND::BODY_STATIC;
//m_PlaneData.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 3bd6f06d4..f1d403736 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -1676,6 +1676,11 @@ HRESULT CLoader::Loading_For_Effect()
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
return E_FAIL;
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_RaceRing_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/RaceRing/SM_BRR_RaceRing_01.bin", XMMatrixRotationX(XMConvertToRadians(90.f)) * XMMatrixIdentity()))))
+ return E_FAIL;
+
vector*>> futures = {};
futures.emplace_back(Deferred_ModelLoad(
@@ -1704,6 +1709,10 @@ HRESULT CLoader::Loading_For_Effect()
TEXT("Prototype_Component_Playable_Model")
));
+ futures.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
+ TEXT("Prototype_Component_Broom_Model")));
+
for (auto& job : futures) {
pair<_wstring, CModel*>* pResult = job.get();
@@ -1922,6 +1931,9 @@ HRESULT CLoader::Loading_For_Effect()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CStunEffect::Create(m_pDevice, m_pContext))))
return E_FAIL;
+ /* For.Prototype_GameObject_RaceRing */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRaceRing::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
/* For.Prototype_GameObject_DummySkyBox */
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext))))
@@ -1980,6 +1992,10 @@ HRESULT CLoader::Loading_For_Effect()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBroom::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CGoblin_Protego::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
index 0347ec447..1a645d7a8 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
@@ -135,32 +135,32 @@ HRESULT CMapObject_Manager::Initialize(void* pArg)
#pragma endregion
#pragma region EFFECT_PART
- //if (FAILED(Load_EffectParts("Goo0_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo0")))
+ //if (FAILED(Load_EditEffect("Goo0_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo0")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Goo1_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo1")))
+ //if (FAILED(Load_EditEffect("Goo1_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo1")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Ranrok_Goo2_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo2")))
+ //if (FAILED(Load_EditEffect("Ranrok_Goo2_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo2")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Ranrok_Goo3_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo3")))
+ //if (FAILED(Load_EditEffect("Ranrok_Goo3_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo3")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Ranrok_Goo4_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo4")))
+ //if (FAILED(Load_EditEffect("Ranrok_Goo4_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Goo4")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Ranrok_Decal_15_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Decal_15")))
+ //if (FAILED(Load_EditEffect("Ranrok_Decal_15_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Decal_15")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Rotate_Rock_Small_Data", "../Bin/Resources/Data/Effect/MapEffect/Rotate_Rock_Small")))
+ //if (FAILED(Load_EditEffect("Rotate_Rock_Small_Data", "../Bin/Resources/Data/Effect/MapEffect/Rotate_Rock_Small")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Ranrok_Particle_Black_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Particle_Black")))
+ //if (FAILED(Load_EditEffect("Ranrok_Particle_Black_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Particle_Black")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Ranrok_Particle_Red_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Particle_Red")))
+ //if (FAILED(Load_EditEffect("Ranrok_Particle_Red_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Particle_Red")))
// return E_FAIL;
- ////if (FAILED(Load_EffectParts("Ranrok_Decal_35_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Decal_35")))
+ ////if (FAILED(Load_EditEffect("Ranrok_Decal_35_Data", "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Decal_35")))
// //return E_FAIL;
- //if (FAILED(Load_EffectParts("Rotate_Rock_Large1_Data", "../Bin/Resources/Data/Effect/MapEffect/Rotate_Rock_Large1")))
+ //if (FAILED(Load_EditEffect("Rotate_Rock_Large1_Data", "../Bin/Resources/Data/Effect/MapEffect/Rotate_Rock_Large1")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Rotate_Rock_Large2_Data", "../Bin/Resources/Data/Effect/MapEffect/Rotate_Rock_Large2")))
+ //if (FAILED(Load_EditEffect("Rotate_Rock_Large2_Data", "../Bin/Resources/Data/Effect/MapEffect/Rotate_Rock_Large2")))
// return E_FAIL;
- //if (FAILED(Load_EffectParts("Bon_Fire_Data", "../Bin/Resources/Data/Effect/MapEffect/Bon_Fire")))
+ //if (FAILED(Load_EditEffect("Bon_Fire_Data", "../Bin/Resources/Data/Effect/MapEffect/Bon_Fire")))
// return E_FAIL;
#pragma endregion
@@ -277,7 +277,7 @@ void CMapObject_Manager::Update(_float fTimeDelta)
//Update_LightSpawer();
//Update_Decal();
//Update_RaceRing();
- //Update_EffectParts();
+ //Update_EditEffect();
//Update_Balloon();
Update_DummyNpc();
@@ -2220,7 +2220,7 @@ HRESULT CMapObject_Manager::Load_DADA_INT()
return S_OK;
}
-HRESULT CMapObject_Manager::Save_EffectParts(const _char* pFileName)
+HRESULT CMapObject_Manager::Save_EditEffect(const _char* pFileName)
{
CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Effect_EDIT"));
@@ -2235,7 +2235,7 @@ HRESULT CMapObject_Manager::Save_EffectParts(const _char* pFileName)
doc.Clear();
doc.InsertFirstChild(doc.NewDeclaration());
- tinyxml2::XMLElement* root = doc.NewElement("EffectParts");
+ tinyxml2::XMLElement* root = doc.NewElement("EditEffect");
doc.InsertEndChild(root);
if (nullptr != pLayer)
@@ -2265,7 +2265,7 @@ HRESULT CMapObject_Manager::Save_EffectParts(const _char* pFileName)
return S_OK;
}
-HRESULT CMapObject_Manager::Load_EffectParts(const _char* pFileName, const _char* pEffectrFilePath)
+HRESULT CMapObject_Manager::Load_EditEffect(const _char* pFileName, const _char* pEffectrFilePath)
{
tinyxml2::XMLDocument xmlDoc;
@@ -2274,7 +2274,7 @@ HRESULT CMapObject_Manager::Load_EffectParts(const _char* pFileName, const _char
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
return E_FAIL;
- tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("EffectParts");
+ tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("EditEffect");
if (nullptr == root)
{
@@ -2310,7 +2310,7 @@ HRESULT CMapObject_Manager::Load_EffectParts(const _char* pFileName, const _char
CEditEffect* pEffect = { nullptr };
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::MAP), NEXT_LEVEL, TEXT("Layer_EffectParts"), &PartsDesc, nullptr, &pEffect)))
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::MAP), NEXT_LEVEL, TEXT("Layer_EditEffect"), &PartsDesc, nullptr, &pEffect)))
return E_FAIL;
if (nullptr == pEffect)
@@ -2744,18 +2744,18 @@ void CMapObject_Manager::Update_RaceRing()
GUI::End();
}
-void CMapObject_Manager::Update_EffectParts()
+void CMapObject_Manager::Update_EditEffect()
{
- GUI::Begin("EffectParts Editor");
+ GUI::Begin("EditEffect Editor");
GUI::InputText("MapFileName", m_szSaveFileName, MAX_PATH);
GUI::Spacing();
- if (GUI::Button("Save EffectParts"))
+ if (GUI::Button("Save EditEffect"))
{
- Save_EffectParts(m_szSaveFileName);
+ Save_EditEffect(m_szSaveFileName);
}
- if (GUI::Button("Load EffectParts"))
+ if (GUI::Button("Load EditEffect"))
{
- Load_EffectParts(m_szSaveFileName, "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Particle_Black");
+ Load_EditEffect(m_szSaveFileName, "../Bin/Resources/Data/Effect/MapEffect/Ranrok_Particle_Black");
}
if (GUI::Button("Add Effect"))
{
diff --git a/Jusin154_Team3D/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp
index 79c674c58..d523e152a 100644
--- a/Jusin154_Team3D/Editor/Private/Player.cpp
+++ b/Jusin154_Team3D/Editor/Private/Player.cpp
@@ -100,6 +100,12 @@ HRESULT CPlayer::Initialize(void* pArg)
// UI 연동 추가
m_pModelCom->Set_DisableRootMotionScale(true);
+ m_pBroomModel = m_pBroom->Get_Component();
+ m_pBroomTransform = m_pBroom->Get_Component();
+ SAFE_ADDREF(m_pBroom);
+ SAFE_ADDREF(m_pBroomModel);
+ SAFE_ADDREF(m_pBroomTransform);
+
#ifdef gimch
m_pCharacter_Controller->Set_GravityAmount(0.f);
#endif
@@ -344,6 +350,17 @@ void CPlayer::Update_CameraShake(_float fTimeDelta)
}
}
+HRESULT CPlayer::InputBroom()
+{
+ if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)
+ || m_pGameInstance->Key_Pressing(DIK_SPACE))
+ {
+
+ return S_OK;
+ }
+ return E_FAIL;
+}
+
HRESULT CPlayer::Ready_Parts()
{
CWand::WAND_DESC WandDesc{};
@@ -370,6 +387,11 @@ HRESULT CPlayer::Ready_Parts()
}
}
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, L"LAYER_ITEM", nullptr, this, &m_pBroom))) {
+ return E_FAIL;
+ }
+
return S_OK;
}
@@ -494,6 +516,8 @@ void CPlayer::Free()
}
#ifdef _DEBUG
+
+
void CPlayer::Describe_Entity()
{
GUI::Begin("PLAYER_DESC");
diff --git a/Jusin154_Team3D/Editor/Private/Player_States.cpp b/Jusin154_Team3D/Editor/Private/Player_States.cpp
index edb06a43c..641ae534b 100644
--- a/Jusin154_Team3D/Editor/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Editor/Private/Player_States.cpp
@@ -17,11 +17,18 @@
#pragma region STATE
#include "State_Idle.h"
#include "State_Dodge.h"
+#include "State_Blink.h"
#include "State_Jump.h"
#include "State_Land.h"
#include "State_Move.h"
#include "State_Combat.h"
-#include "State_Blink.h"
+#include "State_Hit.h"
+#include "State_Broom_Ride.h"
+#include "State_Broom_Ride_Move.h"
+#include "State_Hover.h"
+#include "State_Fly.h"
+#include "State_Broom_TurboFly.h"
+#include "State_Broom_Dismount.h"
#pragma endregion
#include "EffectPool.h"
@@ -446,7 +453,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
m_pFSM->Change_State(FSMSTATE::COMBAT);
}
else if (m_pGameInstance->Key_Down(DIK_B)) {
-// m_pFSM->Change_State(FSMSTATE::BROOM_RIDE);
+ m_pFSM->Change_State(FSMSTATE::BROOM_RIDE);
}
else if (m_pGameInstance->Key_Down(DIK_LSHIFT)) {
m_bSprintToggle = !m_bSprintToggle;
@@ -1101,21 +1108,630 @@ void CPlayer::Behavior_HitExit()
void CPlayer::Behavior_Broom_RideEnter()
{
-
+ m_pFSM->Enable_State(FSMSTATE::BROOM_RIDE);
+ m_pBroom->Set_Ride(true);
+ pair<_uint, _bool> pairAnimInfo;
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
-HRESULT CPlayer::Behavior_Broom_RideExitCheck()
+HRESULT CPlayer::Behavior_Broom_RideExitCheck(_float fTimeDelta)
{
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
-
- return E_FAIL;
+ pair<_uint, _bool> pairAnimInfo;
+
+ if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT].first)
+ {
+ if (m_pModelCom->IsFinishedAnim()) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_END];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true);
+ }
+ return S_OK;
+ }
+
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
+ return E_FAIL;
+ }
+
+ if (m_pGameInstance->Key_Pressing(DIK_N))
+ {
+ auto flags = m_pCharacter_Controller->Get_CollisionFlags();
+ if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN)
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT);
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
}
void CPlayer::Behavior_Broom_RideExit()
{
- m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE | FSMSTATE::DISMOUNT);
+ m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE);
+ Reset_Event();
}
+void CPlayer::Behavior_Broom_Ride_MoveEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::BROOM_RIDE_MOVE);
+}
+
+HRESULT CPlayer::Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta)
+{
+ if (m_pBroom->Get_Hover())
+ {
+ m_pFSM->Change_State(FSMSTATE::HOVER);
+ return E_FAIL;
+ }
+ else if (m_pBroom->Get_Turbo()) {
+ m_pFSM->Change_State(FSMSTATE::TURBOFLY);
+ return E_FAIL;
+ }
+ else {
+ m_pFSM->Change_State(FSMSTATE::FLY);
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CPlayer::Behavior_Broom_Ride_MoveExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE_MOVE);
+ Reset_Event();
+}
+
+void CPlayer::Behavior_Broom_HoverEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::HOVER);
+}
+
+HRESULT CPlayer::Behavior_Broom_HoverExitCheck(_float fTimeDelta)
+{
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ pair<_uint, _bool> pairAnimInfo;
+
+ if (!m_pBroom->Get_Ride()) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+
+ _bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
+ _bool bLft = m_pGameInstance->Key_Pressing(DIK_A);
+ _bool bRht = m_pGameInstance->Key_Pressing(DIK_D);
+ _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL);
+ _bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE);
+
+ if (m_pBroom->Get_Hover() && iCurrAnimIndex != m_Animation[STATEANIM::BROOM_HOVER_REVELIO].first)
+ {
+ if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
+ {
+ _float3 vInput = { 0.f, 0.f, 0.f };
+
+ if (bFwd) vInput.z += 1.f;
+ if (bLft) vInput.x -= 1.f;
+ if (bRht) vInput.x += 1.f;
+ if (bUp) vInput.y += 1.f;
+ if (bDown) vInput.y -= 1.f;
+
+ _bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0);
+ _vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput));
+
+ if (bUp || bDown)
+ {
+ if (bUp)
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ }
+ else
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ }
+ }
+
+ _float ax = fabsf(vInput.x);
+ _float ay = fabsf(vInput.y);
+ _float az = fabsf(vInput.z);
+
+ if (ay > ax && ay > az)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ }
+ else if (ax >= az)
+ {
+ if (ay >= ax)
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ else
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ }
+ else {
+ if (vInput.x < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_LEFT];
+ else if (vInput.x > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_RIGHT];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_FWD];
+ }
+ }
+ }
+ else
+ {
+ if (vInput.y > 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ else if (vInput.y < 0)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_FWD];
+ }
+ }
+ }
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE];
+ }
+
+ if (m_pGameInstance->Key_Down(DIK_R))
+ {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_REVELIO);
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this);
+ }, 0.2f);
+ }
+
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+
+
+
+ if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_REVELIO].first)
+ {
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_FWD];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+
+ if (m_pGameInstance->Key_Pressing(DIK_N))
+ {
+ auto flags = m_pCharacter_Controller->Get_CollisionFlags();
+ if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN)
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT);
+ return E_FAIL;
+ }
+ }
+
+ if (!m_pBroom->Get_Hover())
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
+ return E_FAIL;
+ }
+
+ if (m_pBroom->Get_Turbo())
+ {
+ m_pFSM->Change_State(FSMSTATE::TURBOFLY);
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CPlayer::Behavior_Broom_HoverExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::HOVER);
+}
+
+void CPlayer::Behavior_Broom_FlyEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::FLY);
+ Reset_Event();
+}
+
+HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
+{
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ pair<_uint, _bool> pairAnimInfo;
+
+ if (!m_pBroom->Get_Ride()) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+
+ _bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
+ _bool bLft = m_pGameInstance->Key_Pressing(DIK_A);
+ _bool bRht = m_pGameInstance->Key_Pressing(DIK_D);
+ _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL);
+ _bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE);
+
+ if (!m_pBroom->Get_Hover() && iCurrAnimIndex != m_Animation[STATEANIM::BROOM_REVELIO].first)
+ {
+ if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
+ {
+ _float3 vInput = { 0.f, 0.f, 0.f };
+
+ if (bFwd) vInput.z += 1.f;
+ if (bLft) vInput.x -= 1.f;
+ if (bRht) vInput.x += 1.f;
+ if (bUp) vInput.y += 1.f;
+ if (bDown) vInput.y -= 1.f;
+
+ _bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0);
+ _vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput));
+
+ if (bUp || bDown)
+ {
+ if (bUp)
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
+ }
+ else
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
+ }
+ }
+
+ _float ax = fabsf(vInput.x);
+ _float ay = fabsf(vInput.y);
+ _float az = fabsf(vInput.z);
+
+ if (ay > ax && ay > az)
+ {
+ if (vInput.y > 0) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
+
+ }
+ else if (vInput.y < 0) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
+ }
+ }
+ else if (ax >= az)
+ {
+ if (ay >= ax)
+ {
+ if (vInput.y > 0) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
+
+ }
+ else if (vInput.y < 0) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
+
+ }
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_IDLE];
+ }
+ }
+ else {
+ if (vInput.x < 0) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_LEFT];
+
+ }
+ else if (vInput.x > 0) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_RIGHT];
+
+ }
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_IDLE];
+ }
+ }
+ }
+ else
+ {
+ if (vInput.y > 0) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
+
+ }
+ else if (vInput.y < 0) {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
+
+ }
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
+ }
+ }
+
+ if (iCurrAnimIndex != pairAnimInfo.first)
+ {
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false, true);
+ }
+ }
+ else {
+
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_IDLE);
+
+ if (iCurrAnimIndex != pairAnimInfo.first)
+ {
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false, true);
+ }
+ }
+
+ if (m_pGameInstance->Key_Down(DIK_R))
+ {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_REVELIO);
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this);
+ }, 0.2f);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+
+ if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_REVELIO].first)
+ {
+ if (m_pModelCom->IsFinishedAnim())
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+
+ if (m_pGameInstance->Key_Pressing(DIK_N))
+ {
+ auto flags = m_pCharacter_Controller->Get_CollisionFlags();
+ if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN)
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT);
+ return E_FAIL;
+ }
+ }
+
+ if (m_pBroom->Get_Hover())
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
+ return E_FAIL;
+ }
+
+ if (m_pBroom->Get_Turbo())
+ {
+ m_pFSM->Change_State(FSMSTATE::TURBOFLY);
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CPlayer::Behavior_Broom_FlyExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::FLY);
+ Reset_Event();
+}
+
+void CPlayer::Behavior_Broom_TurboFlyEnter()
+{
+ m_pFSM->Enable_State(FSMSTATE::TURBOFLY);
+}
+
+HRESULT CPlayer::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
+{
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ pair<_uint, _bool> pairAnimInfo;
+
+ if (!m_pBroom->Get_Ride()) {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+
+ _bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
+ _bool bLft = m_pGameInstance->Key_Pressing(DIK_A);
+ _bool bRht = m_pGameInstance->Key_Pressing(DIK_D);
+ _bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL);
+ _bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE);
+
+ if (!m_pBroom->Get_Hover() && m_pBroom->Get_Turbo())
+ {
+ if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
+ {
+ _float3 vInput = { 0.f, 0.f, 0.f };
+
+ if (bFwd) vInput.z += 1.f;
+ if (bLft) vInput.x -= 1.f;
+ if (bRht) vInput.x += 1.f;
+ if (bUp) vInput.y += 1.f;
+ if (bDown) vInput.y -= 1.f;
+
+ _bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0);
+ _vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput));
+
+ if (bUp || bDown)
+ {
+ if (bUp)
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_UP];
+ }
+ else
+ {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_DOWN];
+ }
+ }
+
+ _float ax = fabsf(vInput.x);
+ _float ay = fabsf(vInput.y);
+ _float az = fabsf(vInput.z);
+
+ if (ay > ax && ay > az)
+ {
+ if (vInput.y > 0.f)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_UP];
+ else if (vInput.y < 0.f)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_DOWN];
+ }
+ else if (ax >= az)
+ {
+ if (ay >= ax)
+ {
+ if (vInput.y > 0.f)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_UP];
+ else if (vInput.y < 0.f)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_DOWN];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_FWD];
+ }
+ }
+ else {
+ if (vInput.x < 0.f)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_LEFT];
+ else if (vInput.x > 0.f)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_RIGHT];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_FWD];
+ }
+ }
+ }
+ else
+ {
+ if (vInput.y > 0.f)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_UP];
+ else if (vInput.y < 0.f)
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_DOWN];
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_FWD];
+ }
+ }
+
+ if (iCurrAnimIndex != pairAnimInfo.first)
+ {
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false, true);
+ }
+ }
+ else {
+
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_TURBO_FWD);
+
+ if (iCurrAnimIndex != pairAnimInfo.first)
+ {
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false, true);
+ }
+ }
+ }
+
+ if (m_pGameInstance->Key_Pressing(DIK_N))
+ {
+ auto flags = m_pCharacter_Controller->Get_CollisionFlags();
+ if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN)
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT);
+ return E_FAIL;
+ }
+ }
+
+ if (m_pBroom->Get_Hover())
+ {
+ m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
+ return E_FAIL;
+ }
+
+ if (!m_pBroom->Get_Turbo())
+ {
+ m_pFSM->Change_State(FSMSTATE::FLY);
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+void CPlayer::Behavior_Broom_TurboFlyExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::TURBOFLY);
+ Reset_Event();
+}
+
+void CPlayer::Behavior_Broom_DismountEnter()
+{
+ pair<_uint, _bool> pairAnimInfo;
+ m_bOnce = false;
+ //m_pInfoInstance->Event_CallBack(TEXT("BroomRide"), &m_bOnce);
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DISMOUNT);
+ m_pFSM->Enable_State(FSMSTATE::BROOM_DISMOUNT);
+ m_pBroom->Set_Ride(false);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.6f);
+}
+
+HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta)
+{
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ pair<_uint, _bool> pairAnimInfo;
+ _float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
+ if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_DISMOUNT].first)
+ {
+ m_BroomScale.x -= (m_TargetScale.x - m_BroomScale.x) * fTimeDelta * m_fScaleSmoothSpeed;
+ m_BroomScale.y -= (m_TargetScale.y - m_BroomScale.y) * fTimeDelta * m_fScaleSmoothSpeed;
+ m_BroomScale.z -= (m_TargetScale.z - m_BroomScale.z) * fTimeDelta * m_fScaleSmoothSpeed;
+ if (m_BroomScale.x >= 0.1f)
+ {
+ m_pBroomTransform->Set_Scale(m_BroomScale);
+ }
+ if (fRatio >= 0.5f) {
+ m_BroomScale = { 0.f,0.f,0.f };
+ m_pBroomTransform->Set_State(STATE::POSITION, XMVectorSet(XMVectorGetX(m_pTransformCom->Get_State(STATE::POSITION)),
+ 200.f,
+ XMVectorGetZ(m_pTransformCom->Get_State(STATE::POSITION)), 1.f));
+ if (SUCCEEDED(InputMove()))
+ {
+ m_pFSM->Change_State(FSMSTATE::MOVE);
+ return E_FAIL;
+ }
+ else {
+ m_pFSM->Change_State(FSMSTATE::IDLE);
+ return E_FAIL;
+ }
+ }
+ }
+
+ return S_OK;
+}
+
+void CPlayer::Behavior_Broom_DismountExit()
+{
+ m_pFSM->Disable_State(FSMSTATE::BROOM_DISMOUNT);
+ Reset_Event();
+ m_bOnce = false;
+}
+
+
+void CPlayer::Attach_Broom()
+{
+ if (m_pBroom->Get_Ride()) {
+ _matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
+ _matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
+
+ _vector Scale, Rot, Trans;
+
+ XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal);
+
+ _matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
+
+ m_OffsetPos = { 0.f,1.f,0.f };
+
+ _matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
+ m_OffsetPos.y, m_OffsetPos.z);
+
+ _vector BS, BR, BT;
+ XMMatrixDecompose(&BS, &BR, &BT, BroomWorld);
+ _matrix BroomWorld_NoScale =
+ XMMatrixRotationQuaternion(BR) *
+ XMMatrixTranslationFromVector(BT);
+
+
+ _matrix SocketWorld = BoneNoScale * Offset * BroomWorld_NoScale;
+
+ _matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f));
+
+ _matrix FinalWorld = FixRot * SocketWorld;
+
+ m_pTransformCom->Set_WorldMatrix(FinalWorld);
+ m_pCharacter_Controller->Set_Position(FinalWorld.r[3]);
+ }
+}
+
+
void CPlayer::Player_InterpTurn(_float fTimeDelta)
{
_uint iCurrIndex = m_pModelCom->Get_AnimIndex();
@@ -1328,9 +1944,114 @@ void CPlayer::Add_FSM()
#pragma endregion
#pragma region Behavior_Broom_Ride
-
+ {
+ CState_Broom_Ride::STATE_BROOM_RIDE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_RideEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_RideExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_RideExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ if (!m_bOnce) {
+ m_pBroomTransform->Set_State(
+ STATE::POSITION,
+ m_pTransformCom->Get_State(STATE::POSITION) + XMVectorSet(0.f, 2.f, 0.f, 0.f)
+ );
+
+ m_pBroomTransform->Set_State(STATE::LOOK, m_pTransformCom->Get_State(STATE::LOOK));
+ m_pBroomTransform->Set_State(STATE::UP, m_pTransformCom->Get_State(STATE::UP));
+ m_pBroomTransform->Set_State(STATE::RIGHT, m_pTransformCom->Get_State(STATE::RIGHT));
+
+ _float3 vScale = { 0.3f,0.3f,0.3f };
+ m_pBroomTransform->Set_Scale(vScale);
+ m_bOnce = true;
+ //m_pInfoInstance->Event_CallBack(TEXT("BroomRide"), &m_bOnce);
+ }
+ m_BroomScale.x += (m_TargetScale.x - m_BroomScale.x) * fTimeDelta * m_fScaleSmoothSpeed;
+ m_BroomScale.y += (m_TargetScale.y - m_BroomScale.y) * fTimeDelta * m_fScaleSmoothSpeed;
+ m_BroomScale.z += (m_TargetScale.z - m_BroomScale.z) * fTimeDelta * m_fScaleSmoothSpeed;
+ if (m_BroomScale.x <= 1.f)
+ {
+ m_pBroomTransform->Set_Scale(m_BroomScale);
+ }
+
+
+ Attach_Broom();
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc));
+ }
+
+ {
+ CState_Broom_Ride_Move::STATE_BROOM_RIDE_MOVE_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_Ride_MoveEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_Ride_MoveExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_Ride_MoveExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ Attach_Broom();
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::BROOM_RIDE_MOVE, CState_Broom_Ride_Move::Create(&Desc));
+ }
+
+ {
+ CState_Hover::STATE_HOVER_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_HoverEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_HoverExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_HoverExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ Attach_Broom();
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::HOVER, CState_Hover::Create(&Desc));
+ }
+
+ {
+ CState_Fly::STATE_FLY_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_FlyEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_FlyExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_FlyExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ Attach_Broom();
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::FLY, CState_Fly::Create(&Desc));
+ }
+
+ {
+ CState_Broom_TurboFly::STATE_BROOM_TURBOFLY_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_TurboFlyEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_TurboFlyExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_TurboFlyExit(); };
+ Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
+ _uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
+ Attach_Broom();
+ };
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::TURBOFLY, CState_Broom_TurboFly::Create(&Desc));
+ }
+
+ {
+ CState_Broom_Dismount::STATE_BROOM_DISMOUNT_DESC Desc{};
+ Desc.pOwner = this;
+ Desc.funcEnterEvent = [this]() { Behavior_Broom_DismountEnter(); };
+ Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_DismountExitCheck(fTimedelta); };
+ Desc.funcExitEvent = [this]() { Behavior_Broom_DismountExit(); };
+ Desc.funcPriorityUpdate = nullptr;
+ Desc.funcLateUpdate = nullptr;
+ m_States.emplace(FSMSTATE::BROOM_DISMOUNT, CState_Broom_Dismount::Create(&Desc));
+ }
+
#pragma endregion
+
}
void CPlayer::Set_Anim()
diff --git a/Jusin154_Team3D/Editor/Private/State_Broom_Dismount.cpp b/Jusin154_Team3D/Editor/Private/State_Broom_Dismount.cpp
new file mode 100644
index 000000000..fefe17d23
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/State_Broom_Dismount.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Broom_Dismount.h"
+#include "Unit.h"
+
+
+CState_Broom_Dismount::CState_Broom_Dismount()
+ :CState_Root()
+{
+}
+
+void CState_Broom_Dismount::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Broom_Dismount::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Broom_Dismount::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Broom_Dismount::Initialize(STATE_BROOM_DISMOUNT_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Broom_Dismount* CState_Broom_Dismount::Create(STATE_BROOM_DISMOUNT_DESC* pDesc)
+{
+ CState_Broom_Dismount* pInstance = new CState_Broom_Dismount;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Broom_Dismount::Free()
+{
+ __super::Free();
+}
+
+void CState_Broom_Dismount::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/State_Broom_Ride.cpp b/Jusin154_Team3D/Editor/Private/State_Broom_Ride.cpp
new file mode 100644
index 000000000..d6dda3206
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/State_Broom_Ride.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Broom_Ride.h"
+#include "Unit.h"
+
+
+CState_Broom_Ride::CState_Broom_Ride()
+ :CState_Root()
+{
+}
+
+void CState_Broom_Ride::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Broom_Ride::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Broom_Ride::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Broom_Ride::Initialize(STATE_BROOM_RIDE_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Broom_Ride* CState_Broom_Ride::Create(STATE_BROOM_RIDE_DESC* pDesc)
+{
+ CState_Broom_Ride* pInstance = new CState_Broom_Ride;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Broom_Ride::Free()
+{
+ __super::Free();
+}
+
+void CState_Broom_Ride::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/State_Broom_Ride_Move.cpp b/Jusin154_Team3D/Editor/Private/State_Broom_Ride_Move.cpp
new file mode 100644
index 000000000..16eb8e5d3
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/State_Broom_Ride_Move.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Broom_Ride_Move.h"
+#include "Unit.h"
+
+
+CState_Broom_Ride_Move::CState_Broom_Ride_Move()
+ :CState_Root()
+{
+}
+
+void CState_Broom_Ride_Move::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Broom_Ride_Move::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Broom_Ride_Move::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Broom_Ride_Move::Initialize(STATE_BROOM_RIDE_MOVE_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Broom_Ride_Move* CState_Broom_Ride_Move::Create(STATE_BROOM_RIDE_MOVE_DESC* pDesc)
+{
+ CState_Broom_Ride_Move* pInstance = new CState_Broom_Ride_Move;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Broom_Ride_Move::Free()
+{
+ __super::Free();
+}
+
+void CState_Broom_Ride_Move::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Private/State_Broom_TurboFly.cpp b/Jusin154_Team3D/Editor/Private/State_Broom_TurboFly.cpp
new file mode 100644
index 000000000..68df84017
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/State_Broom_TurboFly.cpp
@@ -0,0 +1,64 @@
+#include "pch.h"
+#include "State_Broom_TurboFly.h"
+#include "Unit.h"
+
+
+CState_Broom_TurboFly::CState_Broom_TurboFly()
+ :CState_Root()
+{
+}
+
+void CState_Broom_TurboFly::Enter()
+{
+ __super::Enter();
+}
+
+HRESULT CState_Broom_TurboFly::Update(_float fTimeDelta)
+{
+ if (nullptr != m_funcPriorityUpdate) {
+ m_funcPriorityUpdate(fTimeDelta);
+ }
+ if (E_FAIL == (__super::Update(fTimeDelta))) {
+ return E_FAIL;
+ }
+ if (nullptr != m_funcLateUpdate) {
+ m_funcLateUpdate(fTimeDelta);
+ }
+ return S_OK;
+}
+
+void CState_Broom_TurboFly::Exit()
+{
+ __super::Exit();
+}
+
+HRESULT CState_Broom_TurboFly::Initialize(STATE_BROOM_TURBOFLY_DESC* pDesc)
+{
+ if (FAILED(__super::Initialize(pDesc))) {
+ return E_FAIL;
+ }
+ m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
+ m_funcLateUpdate = pDesc->funcLateUpdate;
+ m_pModel = m_pOwner->Get_Component();
+ m_pFSM = m_pOwner->Get_Component();
+
+ return S_OK;
+}
+
+CState_Broom_TurboFly* CState_Broom_TurboFly::Create(STATE_BROOM_TURBOFLY_DESC* pDesc)
+{
+ CState_Broom_TurboFly* pInstance = new CState_Broom_TurboFly;
+ if (FAILED(pInstance->Initialize(pDesc))) {
+ SAFE_RELEASE(pInstance);
+ }
+ return pInstance;
+}
+
+void CState_Broom_TurboFly::Free()
+{
+ __super::Free();
+}
+
+void CState_Broom_TurboFly::Describe_Entity()
+{
+}
diff --git a/Jusin154_Team3D/Editor/Public/Broom.h b/Jusin154_Team3D/Editor/Public/Broom.h
index 9aa0fbb71..c5312aa1b 100644
--- a/Jusin154_Team3D/Editor/Public/Broom.h
+++ b/Jusin154_Team3D/Editor/Public/Broom.h
@@ -1,17 +1,23 @@
#pragma once
#include "Editor_Define.h"
-#include "GameObject.h"
-
-NS_BEGIN(Engine)
-class CShader;
-class CModel;
-NS_END
+#include "Unit.h"
NS_BEGIN(Editor)
-class CBroom final : public CGameObject
+class CBroom final : public CUnit
{
+public:
+ struct BroomInput
+ {
+ _float X;
+ _float Y;
+ _float Z;
+ _bool bHoverToggle;
+ _bool bTurbo;
+ };
+
+
private:
CBroom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CBroom(const CBroom& Prototype);
@@ -24,25 +30,133 @@ class CBroom final : public CGameObject
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
+ void Set_Ride(_bool bRide) { m_bRide = bRide; }
+ _bool Get_Ride() { return m_bRide; }
+ void Set_Hover(_bool bHover) { m_bHoverToggle = bHover; }
+ _bool Get_Hover() { return m_bHoverToggle; }
+ _bool Get_Turbo() { return m_bTurbo; }
+
+ void Set_Input(BroomInput broomInput) { m_Input = broomInput; }
+ void Set_AISpeed(_float speedMul, _float accelMul);
+ void Set_Move(_bool bMove) { m_bMove = bMove; }
+ _bool Get_Move() { return m_bMove; }
+ void Add_TurboBoost(_float fAmount) { m_fTurboBoost += fAmount; }
+ _float Get_TurboBoost() { return m_fTurboBoost; }
+ HRESULT Ready_Child();
private:
- CShader* m_pShaderCom = { nullptr };
- CModel* m_pModelCom = { nullptr };
+ class CInfoInstance* m_pInfoInstance = { 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 };
+ class CUnit* m_pParentUnit = { nullptr };
+
+ _bool m_bHoverToggle = { true };
+ _bool m_bTurbo = { false };
+
+ _bool m_bRide = { false };
+
+ _float m_fSpeed = 0.f;
+ _float m_fTurnSpeed = 0.f;
+ _float m_fTargetSpeed = 0.f;
+ _float m_fTurnMaxSpeed = 12.f;
+ _float m_fFlyTurnMaxSpeed = 9.f;
+ _float m_fTurboTurnMaxSpeed = 12.f;
+ _float m_fHoverMaxSpeed = 5.f;
+ _float m_fFlyMaxSpeed = 15.f;
+ _float m_fTurboMaxSpeed = 20.f;
+ _float m_fAccel = 1.f;
+ _float m_fDecel = 1.f;
+ _float m_fTurnDecel = 0.3f;
+ _float m_fVerticalSpeed = 0.f;
+ _float m_fTurboBoost = { 5.f };
+ _float m_fTurboBoostChargeDelay = {};
+
+ _float m_fFlyAccel = 1.f;
+ _float m_fFlyDecel = 1.f;
+
+ _float m_fTurboAccel = 1.3f;
+ _float m_fTurboDecel = 0.6f;
+
+ _bool m_bMove = { true };
+
+
+ _int m_iIndex = {};
+
+#pragma region AI
+ _float m_fAISpeedMul = 1.f;
+ _float m_fAIAccelMul = 1.f;
+
+ _float m_fAICondition = 1.f;
+ _float m_fAISeed = 0.f;
+ _float m_fAITime = 0.f;
+
+#pragma endregion
+
+
+ _float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
+ _float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
+
+ BroomInput m_Input;
+ class CEditEffect* m_pWindEffect = { nullptr };
+
+ class CEditEffect* m_pBoostScreenFX = { nullptr };
+ class CTrailObject* m_pBroomTrail = { nullptr };
+ const _float4x4* m_pBroom_TailMat = { nullptr };
+
+ _float m_fCameraOffset = { 10.f };
private:
HRESULT Ready_Components();
HRESULT Bind_ShaderResources();
+ void Update_CameraCoordinateSystem();
+ void PlayerInput(_float fTimeDelta);
+ void Boost_Effect_Visible(_bool isVisible);
+
public:
static CBroom* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
virtual void Free() override;
+#ifdef _DEBUG
virtual void Describe_Entity() override;
+#endif // _DEBUG
+
+#pragma region STATE
+ void Camera_InterpTurn(_float fTimeDelta);
+ virtual void Add_FSM();
+
+ _float m_fAmount = { 1.f };
+ _float m_fInputTime = {};
+ _bool m_bRatio = { false };
+
+
+ HRESULT InputAction();
+ HRESULT InputMove();
+ HRESULT InputKeyUpMove();
+ HRESULT InputSpell();
+ HRESULT InputAim();
+
+ void Behavior_IdleEnter();
+ HRESULT Behavior_IdleExitCheck(_float fTimeDelta);
+ void Behavior_IdleExit();
+
+ void Behavior_MoveEnter();
+ HRESULT Behavior_MoveExitCheck(_float fTimeDelta);
+ void Behavior_MoveExit();
+
+ void Behavior_Broom_HoverEnter();
+ HRESULT Behavior_Broom_HoverExitCheck(_float fTimeDelta);
+ void Behavior_Broom_HoverExit();
+
+ void Behavior_Broom_FlyEnter();
+ HRESULT Behavior_Broom_FlyExitCheck(_float fTimeDelta);
+ void Behavior_Broom_FlyExit();
+
+ void Behavior_Broom_TurboFlyEnter();
+ HRESULT Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta);
+ void Behavior_Broom_TurboFlyExit();
+#pragma endregion
+
+
};
NS_END
diff --git a/Jusin154_Team3D/Editor/Public/BroomBoost.h b/Jusin154_Team3D/Editor/Public/BroomBoost.h
new file mode 100644
index 000000000..6da0d7039
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/BroomBoost.h
@@ -0,0 +1,49 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Editor)
+
+class CBroomBoost final : public CEffect_Container
+{
+private:
+ CBroomBoost(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CBroomBoost(const CBroomBoost& rhs);
+ virtual ~CBroomBoost() = 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, void* pArg = nullptr) 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 CEditEffect* m_pBoostParticle_Y = { nullptr };
+ class CEditEffect* m_pBoostParticle_R = { nullptr };
+
+ const _float4x4* m_pBroom_TailMat = { nullptr };
+public:
+ static CBroomBoost* 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
diff --git a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
index c4e5eae40..31cd340cf 100644
--- a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
+++ b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
@@ -93,8 +93,8 @@ class CMapObject_Manager final : public CGameObject
HRESULT Load_DADA_INT();
- HRESULT Save_EffectParts(const _char* pFileName);
- HRESULT Load_EffectParts(const _char* pFileName, const _char* pEffectrFilePath);
+ HRESULT Save_EditEffect(const _char* pFileName);
+ HRESULT Load_EditEffect(const _char* pFileName, const _char* pEffectrFilePath);
HRESULT Save_DummyNpc(const _char* pFileName);
#pragma endregion
@@ -107,7 +107,7 @@ class CMapObject_Manager final : public CGameObject
void Update_LightSpawer();
void Update_Decal();
void Update_RaceRing();
- void Update_EffectParts();
+ void Update_EditEffect();
void Update_Balloon();
void Update_DummyNpc();
diff --git a/Jusin154_Team3D/Editor/Public/Player.h b/Jusin154_Team3D/Editor/Public/Player.h
index 17eb658d5..3f7309cfa 100644
--- a/Jusin154_Team3D/Editor/Public/Player.h
+++ b/Jusin154_Team3D/Editor/Public/Player.h
@@ -173,11 +173,32 @@ class CPlayer final : public CUnit
void Behavior_HitExit();
void Behavior_Broom_RideEnter();
- HRESULT Behavior_Broom_RideExitCheck();
+ HRESULT Behavior_Broom_RideExitCheck(_float fTimeDelta);
void Behavior_Broom_RideExit();
+ void Behavior_Broom_Ride_MoveEnter();
+ HRESULT Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta);
+ void Behavior_Broom_Ride_MoveExit();
+
+ void Behavior_Broom_HoverEnter();
+ HRESULT Behavior_Broom_HoverExitCheck(_float fTimeDelta);
+ void Behavior_Broom_HoverExit();
+
+ void Behavior_Broom_FlyEnter();
+ HRESULT Behavior_Broom_FlyExitCheck(_float fTimeDelta);
+ void Behavior_Broom_FlyExit();
+
+ void Behavior_Broom_TurboFlyEnter();
+ HRESULT Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta);
+ void Behavior_Broom_TurboFlyExit();
+
+ void Behavior_Broom_DismountEnter();
+ HRESULT Behavior_Broom_DismountExitCheck(_float fTimeDelta);
+ void Behavior_Broom_DismountExit();
void Player_InterpTurn(_float fTimeDelta);
+ void Attach_Broom();
+ HRESULT InputBroom();
#pragma endregion
diff --git a/Jusin154_Team3D/Editor/Public/State_Broom_Dismount.h b/Jusin154_Team3D/Editor/Public/State_Broom_Dismount.h
new file mode 100644
index 000000000..766621e38
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/State_Broom_Dismount.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CState_Broom_Dismount final : public CState_Root
+{
+public:
+ typedef struct tagBroomDismount : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_BROOM_DISMOUNT_DESC;
+private:
+ CState_Broom_Dismount();
+ virtual ~CState_Broom_Dismount() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_BROOM_DISMOUNT_DESC* pDesc);
+
+public:
+ static CState_Broom_Dismount* Create(STATE_BROOM_DISMOUNT_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/State_Broom_Ride.h b/Jusin154_Team3D/Editor/Public/State_Broom_Ride.h
new file mode 100644
index 000000000..a34905686
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/State_Broom_Ride.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CState_Broom_Ride final : public CState_Root
+{
+public:
+ typedef struct tagBroomRide : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_BROOM_RIDE_DESC;
+private:
+ CState_Broom_Ride();
+ virtual ~CState_Broom_Ride() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_BROOM_RIDE_DESC* pDesc);
+
+public:
+ static CState_Broom_Ride* Create(STATE_BROOM_RIDE_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/State_Broom_Ride_Move.h b/Jusin154_Team3D/Editor/Public/State_Broom_Ride_Move.h
new file mode 100644
index 000000000..3c3db9fc0
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/State_Broom_Ride_Move.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CState_Broom_Ride_Move final : public CState_Root
+{
+public:
+ typedef struct tagBroomRideMove : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_BROOM_RIDE_MOVE_DESC;
+private:
+ CState_Broom_Ride_Move();
+ virtual ~CState_Broom_Ride_Move() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_BROOM_RIDE_MOVE_DESC* pDesc);
+
+public:
+ static CState_Broom_Ride_Move* Create(STATE_BROOM_RIDE_MOVE_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/State_Broom_TurboFly.h b/Jusin154_Team3D/Editor/Public/State_Broom_TurboFly.h
new file mode 100644
index 000000000..61e95b990
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/State_Broom_TurboFly.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "Editor_Define.h"
+#include "State_Root.h"
+
+NS_BEGIN(Editor)
+
+class CState_Broom_TurboFly final : public CState_Root
+{
+public:
+ typedef struct tagBroomTurboFly : public CState_Root::STATE_ROOT_DESC {
+ function funcPriorityUpdate = { nullptr };
+ function funcLateUpdate = { nullptr };
+ }STATE_BROOM_TURBOFLY_DESC;
+private:
+ CState_Broom_TurboFly();
+ virtual ~CState_Broom_TurboFly() = default;
+
+public:
+ virtual void Enter();
+ virtual HRESULT Update(_float fTimeDelta);
+ virtual void Exit();
+
+private:
+ function m_funcPriorityUpdate = { nullptr };
+ function m_funcLateUpdate = { nullptr };
+
+private:
+ HRESULT Initialize(STATE_BROOM_TURBOFLY_DESC* pDesc);
+
+public:
+ static CState_Broom_TurboFly* Create(STATE_BROOM_TURBOFLY_DESC* pDesc);
+ virtual void Free() override;
+ virtual void Describe_Entity();
+};
+
+NS_END