[Add] 란록 상태추가
This commit is contained in:
@@ -221,7 +221,12 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\State_Broom_TurboFly.h" />
|
||||
<ClInclude Include="..\Public\State_FireBall.h" />
|
||||
<ClInclude Include="..\Public\State_FireBreath.h" />
|
||||
<ClInclude Include="..\Public\State_FireSweep.h" />
|
||||
<ClInclude Include="..\Public\State_Ground.h" />
|
||||
<ClInclude Include="..\Public\State_Pulse.h" />
|
||||
<ClInclude Include="..\Public\State_Skill.h" />
|
||||
<ClInclude Include="..\Public\State_Slide.h" />
|
||||
<ClInclude Include="..\Public\State_Swipe.h" />
|
||||
<ClInclude Include="..\Public\State_Tucked.h" />
|
||||
<ClInclude Include="..\Public\StunEffect.h" />
|
||||
<ClInclude Include="..\public\MapElement_Door.h" />
|
||||
@@ -426,19 +431,24 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\State_Broom_Dismount.cpp" />
|
||||
<ClCompile Include="..\Private\State_FireBall.cpp" />
|
||||
<ClCompile Include="..\Private\State_FireBreath.cpp" />
|
||||
<ClCompile Include="..\Private\State_FireSweep.cpp" />
|
||||
<ClCompile Include="..\Private\State_Fly.cpp" />
|
||||
<ClCompile Include="..\Private\State_Ground.cpp" />
|
||||
<ClCompile Include="..\Private\State_Hover.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_Ride_Move.cpp" />
|
||||
<ClCompile Include="..\private\MiniMap_Camera.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_TurboFly.cpp" />
|
||||
<ClCompile Include="..\Private\State_Pulse.cpp" />
|
||||
<ClCompile Include="..\Private\State_Shield.cpp" />
|
||||
<ClCompile Include="..\Private\State_Skill.cpp" />
|
||||
<ClCompile Include="..\Private\State_Slide.cpp" />
|
||||
<ClCompile Include="..\Private\State_Sustain.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Attack.cpp" />
|
||||
<ClCompile Include="..\Private\Mage_Nomal_Attack.cpp" />
|
||||
<ClCompile Include="..\Private\MageSide.cpp" />
|
||||
<ClCompile Include="..\Private\Mage_Down_Attack.cpp" />
|
||||
<ClCompile Include="..\Private\Box_Splesh.cpp" />
|
||||
<ClCompile Include="..\Private\State_Swipe.cpp" />
|
||||
<ClCompile Include="..\Private\State_Tucked.cpp" />
|
||||
<ClCompile Include="..\Private\StunEffect.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Teleport.cpp" />
|
||||
|
||||
@@ -632,10 +632,24 @@
|
||||
<ClInclude Include="..\Public\Stupefy.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Stupefy</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\BroomRaceManager.h" />
|
||||
<ClInclude Include="..\public\MapElement_Static.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Static</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_FireSweep.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_FireSweep</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Ground.h">
|
||||
<Filter>04.Mechanic\State\Movement\Ground</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Swipe.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Swipe</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Slide.h">
|
||||
<Filter>04.Mechanic\State\Focus\Slide</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Skill.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Skill</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1327,6 +1341,21 @@
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_AncientSpell">
|
||||
<UniqueIdentifier>{c69a2485-7f6e-4e22-81b4-1410fdae9d57}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_FireSweep">
|
||||
<UniqueIdentifier>{2c39ba68-2f23-4bc9-a277-b6e9295c11a0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Movement\Ground">
|
||||
<UniqueIdentifier>{9e2863cd-1a30-4a27-a076-5e1baff3dee8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Swipe">
|
||||
<UniqueIdentifier>{2fd96fb0-dbc3-4486-afda-82b3b1b63060}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Focus\Slide">
|
||||
<UniqueIdentifier>{ee880571-e18c-4206-80ea-448cadd04d9a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Skill">
|
||||
<UniqueIdentifier>{cef80506-72c7-4bb9-a691-760f0a576eb7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement\Static">
|
||||
<UniqueIdentifier>{c3b86f00-da19-47ad-a26e-7ff641e2c4d4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -1909,7 +1938,21 @@
|
||||
<ClCompile Include="..\Private\State_AncientSpell.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_AncientSpell</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\BroomRaceManager.cpp" />
|
||||
<ClCompile Include="..\Private\State_FireSweep.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_FireSweep</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Ground.cpp">
|
||||
<Filter>04.Mechanic\State\Movement\Ground</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Swipe.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Swipe</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Slide.cpp">
|
||||
<Filter>04.Mechanic\State\Focus\Slide</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Skill.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Skill</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement_Static.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Static</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -565,14 +565,14 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
{
|
||||
for (_uint i = 0; i < 0; ++i)
|
||||
for (_uint i = 0; i <1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (_uint i = 0; i <3; ++i)
|
||||
for (_uint i = 0; i <1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Mage>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
|
||||
@@ -911,6 +911,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
#pragma endregion
|
||||
#if 진우
|
||||
#elif 기무리
|
||||
#elif Bin
|
||||
#elif gimch
|
||||
#else
|
||||
#pragma region UI_ANI
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "State_Dodge.h"
|
||||
#include "State_Jump.h"
|
||||
#include "State_Land.h"
|
||||
#include "State_Slide.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_LightAttack.h"
|
||||
@@ -497,6 +498,10 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
return S_OK;
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_E))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SLIDE);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -841,6 +846,46 @@ void CPlayer::Behavior_DodgeExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::DODGE);
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_SlideEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
m_pFSM->Enable_State(FSMSTATE::SLIDE);
|
||||
pairAnimInfo = m_Animation[STATEANIM::SLIDE_START_R];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::SLIDE_LOOP_R];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); },
|
||||
0.95f);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_SlideExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
if (m_pGameInstance->Key_Up(DIK_E))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::SLIDE_STOP_R];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
return S_OK;
|
||||
}
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::SLIDE_STOP_R].first)
|
||||
{
|
||||
if (fRatio >=0.38f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_SlideExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SLIDE);
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_CombatEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
@@ -883,11 +928,12 @@ void CPlayer::Behavior_CombatEnter()
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
}
|
||||
else if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pGrapInteractive = m_LockOnInfo.pInteractive;
|
||||
SAFE_ADDREF(m_pGrapInteractive);
|
||||
m_pGrapInteractive->Set_KinematicFlag(true);
|
||||
m_vGrapInteratableLerp.x = 0.f;
|
||||
return;
|
||||
}
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
@@ -938,29 +984,29 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_bLookAt = true; },
|
||||
0.1f);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
Throwing_Interactive();
|
||||
},
|
||||
0.2f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pGameInstance->SlowMotion(0.1f, 0.35f);
|
||||
},
|
||||
0.1f);
|
||||
|
||||
|
||||
}
|
||||
else if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pGrapInteractive = m_LockOnInfo.pInteractive;
|
||||
SAFE_ADDREF(m_pGrapInteractive);
|
||||
m_pGrapInteractive->Set_KinematicFlag(true);
|
||||
m_vGrapInteratableLerp.x = 0.f;
|
||||
}
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_bLookAt = true; },
|
||||
0.1f);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
Throwing_Interactive();
|
||||
},
|
||||
0.2f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pGameInstance->SlowMotion(0.1f, 0.35f);
|
||||
},
|
||||
0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2309,7 +2355,7 @@ void CPlayer::Throwing_Interactive()
|
||||
{
|
||||
if (nullptr == m_pGrapInteractive) {
|
||||
return;
|
||||
} _vector vDir = {}; _float vDistance = 45.f;
|
||||
} _vector vDir = {}; _float vDistance = 60.f;
|
||||
CRigidBody_Dynamic* pBody = m_pGrapInteractive->Get_Component<CRigidBody_Dynamic>();
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
vDir = XMVector3Normalize(m_LockOnInfo.pUnit->Get_LockOnPos() - m_pGrapInteractive->Get_LockOnPos());
|
||||
@@ -2457,6 +2503,17 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::DODGE, CState_Dodge::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_Slide::STATE_SLIDE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_SlideEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_SlideExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_SlideExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::SLIDE, CState_Slide::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma region Behavior_Combat_NotFocus
|
||||
{
|
||||
@@ -2688,6 +2745,10 @@ void CPlayer::Set_Anim()
|
||||
|
||||
m_Animation[STATEANIM::LAND] = { 259,false };
|
||||
|
||||
m_Animation[STATEANIM::SLIDE_STOP_R] = { 568,false };
|
||||
m_Animation[STATEANIM::SLIDE_START_R] = { 566,false };
|
||||
m_Animation[STATEANIM::SLIDE_LOOP_R] = { 564,true };
|
||||
|
||||
m_Animation[STATEANIM::DODGE] = { 878,false };
|
||||
m_Animation[STATEANIM::DODGE_BLINK] = { 876,true };
|
||||
|
||||
@@ -2797,6 +2858,7 @@ void CPlayer::Set_Anim()
|
||||
// 947
|
||||
|
||||
// 755 기모으기 859
|
||||
//568 566 564 슬라이드 스탑/스타트/루프
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,11 +58,10 @@ HRESULT CRanrak::Initialize(void* pArg)
|
||||
m_pFSM->Bind_States(FSMDesc);
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(-52.f, 0.f, 4.f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-52.f, 0.f, 4.f, 1.f));
|
||||
|
||||
@@ -76,6 +75,21 @@ void CRanrak::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CRanrak::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Up(DIK_H))
|
||||
{
|
||||
m_ePhase = ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND);
|
||||
m_pFSM->Change_State(FSMSTATE::LAND);
|
||||
}
|
||||
if (m_pGameInstance->Key_Up(DIK_Y))
|
||||
{
|
||||
m_ePhase = ENUM_CLASS(RANRAK_PHASE::PHASE_AIR);
|
||||
m_pFSM->Change_State(FSMSTATE::HOVER);
|
||||
}
|
||||
if (m_pGameInstance->Key_Up(DIK_I))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SKILL);
|
||||
}
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
@@ -9,11 +9,15 @@
|
||||
#include "State_IdleBreak.h"
|
||||
#include "State_Land.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Ground.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_Hover.h"
|
||||
#include "State_Fly.h"
|
||||
#include "State_FireBreath.h"
|
||||
#include "State_FireSweep.h"
|
||||
#include "State_FireBall.h"
|
||||
#include "State_Swipe.h"
|
||||
#include "State_Skill.h"
|
||||
#include "State_Pulse.h"
|
||||
#include "State_Tucked.h"
|
||||
#include "State_Hit.h"
|
||||
@@ -26,12 +30,12 @@ void CRanrak::Behavior_IdleEnter()
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLE);
|
||||
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::HOVER_LOOP];
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_IdleExitCheck()
|
||||
{
|
||||
if (m_fTargetDistance <= 20.f && m_fTargetDistance !=0.f)
|
||||
if (m_fTargetDistance <= 30.f && m_fTargetDistance !=0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
@@ -48,7 +52,6 @@ void CRanrak::Behavior_IdleBreakEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLEBREAK);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_IdleBreakExitCheck()
|
||||
@@ -77,6 +80,13 @@ HRESULT CRanrak::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_fTargetDistance <= 30.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -90,45 +100,68 @@ void CRanrak::Behavior_CombatEnter()
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::COMBAT);
|
||||
m_bLookAt = true;
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::HOVER_LOOP];
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_CombatExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (m_fTargetDistance > 30.f && m_fTargetDistance != 0.f)
|
||||
if (m_fTargetDistance > 40.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance > 25.f && m_fTargetDistance != 0.f)
|
||||
else if (m_fTargetDistance > 35.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (m_fTargetDistance <= 20.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] <= 0.f)
|
||||
if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::FIREBREATH);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 20.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)] <= 0.f)
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::FIREBALL);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 20.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)] <= 0.f)
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::FIRESWEEP);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::SWIPE)] <= 0.f && m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SWIPE);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::PULSE);
|
||||
return E_FAIL;
|
||||
}
|
||||
else {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::TUCKED)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::TUCKED);
|
||||
return E_FAIL;
|
||||
}
|
||||
else {
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR)) {
|
||||
m_pFSM->Change_State(FSMSTATE::HOVER);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND)) {
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::TUCKED| FSMSTATE::PULSE))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::LAND);
|
||||
}
|
||||
else {
|
||||
m_pFSM->Change_State(FSMSTATE::GROUND);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -138,13 +171,56 @@ void CRanrak::Behavior_CombatExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_GroundEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::GROUND);
|
||||
m_bLookAt = true;
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_G];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_GroundExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (m_fTargetDistance <= 30.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_GroundExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::GROUND);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_HoverEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::HOVER);
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
switch (iRand)
|
||||
{
|
||||
case 0:
|
||||
pairAnimInfo = m_Animation[STATEANIM::HOVER_DASH_LEFT];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::HOVER_DASH_RIGHT];
|
||||
break;
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_HoverExitCheck(_float fTimeDelta)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_HoverExit()
|
||||
@@ -170,20 +246,27 @@ void CRanrak::Behavior_FireBreathEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::FIREBREATH);
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_WINDUP_A];
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_WINDUP];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)]; },
|
||||
0.9f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)]; },
|
||||
0.95f);
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::FIREBREATH].first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); },
|
||||
0.95f);
|
||||
Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); },
|
||||
0.9f);
|
||||
}
|
||||
else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_G];
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_FireBreathExitCheck(_float fTimeDelta)
|
||||
@@ -191,7 +274,7 @@ HRESULT CRanrak::Behavior_FireBreathExitCheck(_float fTimeDelta)
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim() && iCurrAnimIndex == m_Animation[STATEANIM::FIREBREATH_COOLDOWN].first)
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
@@ -205,24 +288,87 @@ void CRanrak::Behavior_FireBreathExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::FIREBREATH);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_FireSweepEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::FIRESWEEP);
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_WINDUP_A];
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)]; },
|
||||
0.95f);
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_COOLDOWN_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); },
|
||||
0.95f);
|
||||
}
|
||||
else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_G];
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_FireSweepExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_FireSweepExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::FIRESWEEP);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_FireBallEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::FIREBALL);
|
||||
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
|
||||
switch (iRand)
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR))
|
||||
{
|
||||
case 0 :
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2];
|
||||
break;
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
|
||||
switch (iRand)
|
||||
{
|
||||
case 0:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1_A];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_A];
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
|
||||
switch (iRand)
|
||||
{
|
||||
case 0:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1_G];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_G];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_FireBallExitCheck(_float fTimeDelta)
|
||||
@@ -244,15 +390,79 @@ void CRanrak::Behavior_FireBallExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::FIREBALL);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_SwipeEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::SWIPE);
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
|
||||
switch (iRand)
|
||||
{
|
||||
case 0:
|
||||
pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_L];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_R];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::SWIPE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::SWIPE)];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_SwipeExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_SwipeExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SWIPE);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_SkillEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::SKILL);
|
||||
pairAnimInfo = m_Animation[STATEANIM::SKILL];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_SkillExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::HOVER);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_SkillExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SKILL);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_PulseEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::PULSE);
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::PULSE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_PulseExitCheck(_float fTimeDelta)
|
||||
@@ -277,9 +487,10 @@ void CRanrak::Behavior_TuckedEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::TUCKED);
|
||||
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::TUCKED];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::TUCKED)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::TUCKED)];
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_TuckedExitCheck(_float fTimeDelta)
|
||||
@@ -287,6 +498,15 @@ HRESULT CRanrak::Behavior_TuckedExitCheck(_float fTimeDelta)
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
m_fTuckedTime += fTimeDelta;
|
||||
if (m_fTuckedTime >= 5.f && iCurrAnimIndex == m_Animation[STATEANIM::TUCKED].first)
|
||||
{
|
||||
m_fTuckedTime = 0.f;
|
||||
pairAnimInfo = m_Animation[STATEANIM::FLY_TO_HOVER];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
@@ -300,6 +520,30 @@ void CRanrak::Behavior_TuckedExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::TUCKED);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_LandEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::LAND);
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::LAND];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_LandExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::GROUND);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_LandExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::LAND);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_HitEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
@@ -476,6 +720,17 @@ void CRanrak::Add_FSM()
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_Ground::STATE_GROUND_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_GroundEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_GroundExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_GroundExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::GROUND, CState_Ground::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Hover
|
||||
@@ -531,6 +786,17 @@ void CRanrak::Add_FSM()
|
||||
m_States.emplace(FSMSTATE::FIREBREATH, CState_FireBreath::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_FireSweep::STATE_FIRESWEEP_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_FireSweepEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_FireSweepExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_FireSweepExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::FIRESWEEP, CState_FireSweep::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_FireBall::STATE_FIREBALL_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
@@ -542,6 +808,28 @@ void CRanrak::Add_FSM()
|
||||
m_States.emplace(FSMSTATE::FIREBALL, CState_FireBall::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_Swipe::STATE_SWIPE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_SwipeEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_SwipeExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_SwipeExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::SWIPE, CState_Swipe::Create(&Desc));
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
CState_Skill::STATE_SKILL_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_SkillEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_SkillExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_SkillExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::SKILL, CState_Skill::Create(&Desc));
|
||||
}
|
||||
{
|
||||
CState_Pulse::STATE_PULSE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
@@ -565,6 +853,18 @@ void CRanrak::Add_FSM()
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Land
|
||||
{
|
||||
CState_Land::STATE_LAND_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_LandEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_LandExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_LandExit(); };
|
||||
m_States.emplace(FSMSTATE::LAND, CState_Land::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
#pragma region Hit
|
||||
{
|
||||
@@ -599,12 +899,11 @@ void CRanrak::Add_FSM()
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrak::Set_Anim()
|
||||
{
|
||||
m_Animation[STATEANIM::IDLE_G] = { 52,true };
|
||||
m_Animation[STATEANIM::IDLE_BREAK1] = { 27,false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK2] = { 28,false };
|
||||
|
||||
@@ -614,14 +913,36 @@ void CRanrak::Set_Anim()
|
||||
m_Animation[STATEANIM::HOVER_DASH_LEFT] = { 25,false };
|
||||
m_Animation[STATEANIM::HOVER_DASH_RIGHT] = { 26,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBREATH] = { 9,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_COOLDOWN] = { 10,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_WINDUP] = { 11,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_A] = { 9,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A] = { 10,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_WINDUP_A] = { 11,false };
|
||||
|
||||
m_Animation[STATEANIM::FIRESWEEP_A] = { 15,false };
|
||||
m_Animation[STATEANIM::FIRESWEEP_COOLDOWN_A] = { 16,false };
|
||||
m_Animation[STATEANIM::FIRESWEEP_WINDUP_A] = { 17,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBALL1_A] = { 0,false };
|
||||
m_Animation[STATEANIM::FIREBALL2_A] = { 1,false };
|
||||
|
||||
m_Animation[STATEANIM::GROUND_SWIPE_L] = { 3,false };
|
||||
m_Animation[STATEANIM::GROUND_SWIPE_R] = { 4,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBREATH_G] = { 6,false };
|
||||
|
||||
m_Animation[STATEANIM::FIRESWEEP_G] = { 7,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBALL1_G] = { 2,false };
|
||||
m_Animation[STATEANIM::FIREBALL2_G] = { 5,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBALL1] = { 0,false };
|
||||
m_Animation[STATEANIM::FIREBALL2] = { 1,false };
|
||||
m_Animation[STATEANIM::PULSE] = { 33,false };
|
||||
|
||||
m_Animation[STATEANIM::TUCKED] = { 21,true };
|
||||
m_Animation[STATEANIM::FLY_TO_HOVER] = { 22,false };
|
||||
|
||||
m_Animation[STATEANIM::LAND] = { 32,false };
|
||||
|
||||
m_Animation[STATEANIM::SKILL] = { 12,false };
|
||||
|
||||
//12
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_FireSweep.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_FireSweep::CState_FireSweep()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_FireSweep::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_FireSweep::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_FireSweep::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_FireSweep::Initialize(STATE_FIRESWEEP_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_FireSweep* CState_FireSweep::Create(STATE_FIRESWEEP_DESC* pDesc)
|
||||
{
|
||||
CState_FireSweep* pInstance = new CState_FireSweep;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_FireSweep::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_FireSweep::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
#include "pch.h"
|
||||
#include "State_Ground.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Ground::CState_Ground()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Ground::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Ground::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_Ground::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Ground::Initialize(STATE_GROUND_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Ground* CState_Ground::Create(STATE_GROUND_DESC* pDesc)
|
||||
{
|
||||
CState_Ground* pInstance = new CState_Ground;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Ground::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Ground::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Skill.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Skill::CState_Skill()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Skill::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Skill::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_Skill::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Skill::Initialize(STATE_SKILL_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Skill* CState_Skill::Create(STATE_SKILL_DESC* pDesc)
|
||||
{
|
||||
CState_Skill* pInstance = new CState_Skill;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Skill::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Skill::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Slide.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Slide::CState_Slide()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Slide::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Slide::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (FAILED(__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Slide::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Slide::Initialize(STATE_SLIDE_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Slide* CState_Slide::Create(STATE_SLIDE_DESC* pDesc)
|
||||
{
|
||||
CState_Slide* pInstance = new CState_Slide;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Slide::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Slide::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Swipe.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Swipe::CState_Swipe()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Swipe::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Swipe::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_Swipe::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Swipe::Initialize(STATE_SWIPE_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Swipe* CState_Swipe::Create(STATE_SWIPE_DESC* pDesc)
|
||||
{
|
||||
CState_Swipe* pInstance = new CState_Swipe;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Swipe::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Swipe::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -106,9 +106,10 @@ HRESULT CTroll::Behavior_IdleBreakExitCheck()
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()){
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_IdleBreakExit()
|
||||
@@ -201,9 +202,12 @@ HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
|
||||
|
||||
if (m_fTargetDistance <= 6.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_MoveExit()
|
||||
@@ -237,29 +241,35 @@ HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta)
|
||||
if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SLAM);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] <= 0.f))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::BACKHAND_SWING);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] <= 0.f))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SWING);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 15.f && m_fTargetDistance>=8.f &&m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)] <= 0.f)
|
||||
else if (m_fTargetDistance <= 15.f &&m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::THROW_ROCK);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 18.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::RUSH);
|
||||
return E_FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_CombatExit()
|
||||
@@ -326,8 +336,9 @@ HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta)
|
||||
{
|
||||
m_bLookAt = true;
|
||||
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
|
||||
return E_FAIL;
|
||||
}
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_RushExit()
|
||||
@@ -391,8 +402,9 @@ HRESULT CTroll::Behavior_ThrowExitCheck(_float fTimeDelta)
|
||||
{
|
||||
m_bLookAt = true;
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_ThrowExit()
|
||||
|
||||
@@ -160,6 +160,10 @@ class CPlayer final : public CUnit
|
||||
HRESULT Behavior_DodgeExitCheck(_float fTimeDelta);
|
||||
void Behavior_DodgeExit();
|
||||
|
||||
void Behavior_SlideEnter();
|
||||
HRESULT Behavior_SlideExitCheck(_float fTimeDelta);
|
||||
void Behavior_SlideExit();
|
||||
|
||||
void Behavior_CombatEnter();
|
||||
HRESULT Behavior_CombatExitCheck();
|
||||
void Behavior_CombatExit();
|
||||
|
||||
@@ -12,12 +12,20 @@ class CRanrak final : public CMonster
|
||||
enum class RANRAK_SKILL
|
||||
{
|
||||
FIREBREATH,
|
||||
FIRESWEEP,
|
||||
FIREBALL,
|
||||
SWIPE,
|
||||
PULSE,
|
||||
TUCKED,
|
||||
END
|
||||
};
|
||||
|
||||
enum class RANRAK_PHASE
|
||||
{
|
||||
PHASE_AIR,
|
||||
PHASE_GROUND,
|
||||
END
|
||||
};
|
||||
private:
|
||||
CRanrak(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRanrak(const CRanrak& Prototype);
|
||||
@@ -65,11 +73,14 @@ class CRanrak final : public CMonster
|
||||
virtual void Add_FSM();
|
||||
virtual void Set_Anim();
|
||||
|
||||
_int m_ePhase = ENUM_CLASS(RANRAK_PHASE::PHASE_AIR);
|
||||
|
||||
_float m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::END)] = {};
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::END)] = { 20.f ,20.f,20.f,20.f};
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::END)] = { 40.f,40.f ,15.f,40.f,40.f,40.f };
|
||||
|
||||
_float m_fDegree = {};
|
||||
_float m_fCross = {};
|
||||
_float m_fTuckedTime = {};
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck();
|
||||
@@ -87,6 +98,10 @@ class CRanrak final : public CMonster
|
||||
HRESULT Behavior_CombatExitCheck(_float fTimeDelta);
|
||||
void Behavior_CombatExit();
|
||||
|
||||
void Behavior_GroundEnter();
|
||||
HRESULT Behavior_GroundExitCheck(_float fTimeDelta);
|
||||
void Behavior_GroundExit();
|
||||
|
||||
void Behavior_HoverEnter();
|
||||
HRESULT Behavior_HoverExitCheck(_float fTimeDelta);
|
||||
void Behavior_HoverExit();
|
||||
@@ -99,10 +114,22 @@ class CRanrak final : public CMonster
|
||||
HRESULT Behavior_FireBreathExitCheck(_float fTimeDelta);
|
||||
void Behavior_FireBreathExit();
|
||||
|
||||
void Behavior_FireSweepEnter();
|
||||
HRESULT Behavior_FireSweepExitCheck(_float fTimeDelta);
|
||||
void Behavior_FireSweepExit();
|
||||
|
||||
void Behavior_FireBallEnter();
|
||||
HRESULT Behavior_FireBallExitCheck(_float fTimeDelta);
|
||||
void Behavior_FireBallExit();
|
||||
|
||||
void Behavior_SwipeEnter();
|
||||
HRESULT Behavior_SwipeExitCheck(_float fTimeDelta);
|
||||
void Behavior_SwipeExit();
|
||||
|
||||
void Behavior_SkillEnter();
|
||||
HRESULT Behavior_SkillExitCheck(_float fTimeDelta);
|
||||
void Behavior_SkillExit();
|
||||
|
||||
void Behavior_PulseEnter();
|
||||
HRESULT Behavior_PulseExitCheck(_float fTimeDelta);
|
||||
void Behavior_PulseExit();
|
||||
@@ -111,6 +138,10 @@ class CRanrak final : public CMonster
|
||||
HRESULT Behavior_TuckedExitCheck(_float fTimeDelta);
|
||||
void Behavior_TuckedExit();
|
||||
|
||||
void Behavior_LandEnter();
|
||||
HRESULT Behavior_LandExitCheck(_float fTimeDelta);
|
||||
void Behavior_LandExit();
|
||||
|
||||
void Behavior_HitEnter();
|
||||
HRESULT Behavior_HitExitCheck(_float fTimeDelta);
|
||||
void Behavior_HitExit();
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_FireSweep final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagFireSweep : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_FIRESWEEP_DESC;
|
||||
private:
|
||||
CState_FireSweep();
|
||||
virtual ~CState_FireSweep() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_FIRESWEEP_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_FireSweep* Create(STATE_FIRESWEEP_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Ground final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagGround : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_GROUND_DESC;
|
||||
private:
|
||||
CState_Ground();
|
||||
virtual ~CState_Ground() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_GROUND_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Ground* Create(STATE_GROUND_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Skill final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagSkill : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_SKILL_DESC;
|
||||
private:
|
||||
CState_Skill();
|
||||
virtual ~CState_Skill() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_SKILL_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Skill* Create(STATE_SKILL_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Slide final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagSlide : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_SLIDE_DESC;
|
||||
public:
|
||||
CState_Slide();
|
||||
virtual ~CState_Slide() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_SLIDE_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Slide* Create(STATE_SLIDE_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Swipe final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagSwipe : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_SWIPE_DESC;
|
||||
private:
|
||||
CState_Swipe();
|
||||
virtual ~CState_Swipe() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_SWIPE_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Swipe* Create(STATE_SWIPE_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
Binary file not shown.
Binary file not shown.
@@ -215,6 +215,15 @@ void SampleLocalTRS_Cur(uint bone, float t, out float3 S, out float4 R, out floa
|
||||
DecomposeAffine_RowMajor(g_BoneLocalBuffer[bone].BoneLocal, S, R, T);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch.KeyCount < 2)
|
||||
{
|
||||
KeyFrame k = g_KeyFrameBuffer[ch.StartIndex];
|
||||
S = k.vScale;
|
||||
T = k.vTranslation;
|
||||
R = QuatNormalize(k.vRotation);
|
||||
return;
|
||||
}
|
||||
|
||||
uint idx0 = FindKeyIndexCur(ch.StartIndex, ch.KeyCount, t);
|
||||
uint idx1 = idx0 + 1;
|
||||
@@ -239,6 +248,15 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo
|
||||
DecomposeAffine_RowMajor(g_BoneLocalBuffer[bone].BoneLocal, S, R, T);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch.KeyCount < 2)
|
||||
{
|
||||
KeyFrame k = g_KeyFrameBuffer[ch.StartIndex];
|
||||
S = k.vScale;
|
||||
T = k.vTranslation;
|
||||
R = QuatNormalize(k.vRotation);
|
||||
return;
|
||||
}
|
||||
|
||||
uint idx0 = FindKeyIndexPrev(ch.StartIndex, ch.KeyCount, t);
|
||||
uint idx1 = idx0 + 1;
|
||||
@@ -256,6 +274,20 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo
|
||||
|
||||
row_major float4x4 SampleBlendedLocal(uint bone)
|
||||
{
|
||||
if (PrevAnimIndex == 0xFFFFFFFFu)
|
||||
{
|
||||
float3 S;
|
||||
float4 R;
|
||||
float3 T;
|
||||
SampleLocalTRS_Cur(bone, CurrentTime, S, R, T);
|
||||
if ((int) bone == RootBoneIndex)
|
||||
{
|
||||
T = 0;
|
||||
R = RootInitRot;
|
||||
}
|
||||
return MakeAffine(S, R, T);
|
||||
}
|
||||
|
||||
if (CurrentAnimIndex == PrevAnimIndex)
|
||||
{
|
||||
float3 S;
|
||||
|
||||
@@ -39,19 +39,19 @@ void CS_MAIN(uint3 DTid : SV_DispatchThreadID)
|
||||
|
||||
uint global = g_BoneRemap[local];
|
||||
|
||||
row_major float4x4 combined = g_LocalMatIn[global];
|
||||
float4x4 combined = g_LocalMatIn[global];
|
||||
|
||||
int p = g_ParentBuffer[global];
|
||||
while (p != -1)
|
||||
{
|
||||
combined = mul(combined, g_LocalMatIn[(uint) p]);
|
||||
p = g_ParentBuffer[(uint) p];
|
||||
combined = mul(combined,g_LocalMatIn[p]);
|
||||
p = g_ParentBuffer[p];
|
||||
}
|
||||
|
||||
combined = mul(combined, PreTransformMatrix);
|
||||
|
||||
g_LocalPosOutput[local].Combined = combined;
|
||||
g_LocalPosOutput[local].LocalCombined = combined;
|
||||
|
||||
|
||||
g_LocalPosOutput[local].Local = g_LocalMatIn[global];
|
||||
g_LocalPosOutput[local].LocalCombined = combined;
|
||||
g_LocalPosOutput[local].Combined = combined;
|
||||
|
||||
}
|
||||
|
||||
@@ -625,6 +625,9 @@
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer">
|
||||
<UniqueIdentifier>{d9382839-c0b8-4b3d-9227-6dcf65fba44f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="80.State\Focus\Slide">
|
||||
<UniqueIdentifier>{eef1db06-8a9f-42b4-93e2-cc29de2b275d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
|
||||
@@ -2269,10 +2269,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
vector<future<pair<_wstring, CModel*>*>> futures = {};
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SM_BRR_RaceRing_01_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM_LOCAL, "C:/MeshTable\\Game\\Environment\\BroomFlight\\Meshes\\SM_BRR_RaceRing_01.fbx", XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SK_ConjuredDragon_Model"),
|
||||
// CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Characters\\Creatures\\Dragons\\ConjuredDragon\\SK_ConjuredDragon.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity())))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
#pragma region BODY
|
||||
|
||||
@@ -2375,6 +2375,11 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
TEXT("Prototype_Component_Dragon_Model")
|
||||
));
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/Dragon_Anim.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Dragon_Model")
|
||||
));
|
||||
|
||||
#pragma endregion
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
@@ -2402,6 +2407,12 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
TEXT("Prototype_Component_Npc_Model")
|
||||
));
|
||||
|
||||
|
||||
//futures.emplace_back(Deferred_ModelLoad(
|
||||
// MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/SK_ConjuredDragon_Anim.fbx", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
|
||||
// TEXT("Prototype_Component_Npc_Model")
|
||||
//));
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin",XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Wand_Model")
|
||||
|
||||
@@ -215,6 +215,15 @@ void SampleLocalTRS_Cur(uint bone, float t, out float3 S, out float4 R, out floa
|
||||
DecomposeAffine_RowMajor(g_BoneLocalBuffer[bone].BoneLocal, S, R, T);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch.KeyCount < 2)
|
||||
{
|
||||
KeyFrame k = g_KeyFrameBuffer[ch.StartIndex];
|
||||
S = k.vScale;
|
||||
T = k.vTranslation;
|
||||
R = QuatNormalize(k.vRotation);
|
||||
return;
|
||||
}
|
||||
|
||||
uint idx0 = FindKeyIndexCur(ch.StartIndex, ch.KeyCount, t);
|
||||
uint idx1 = idx0 + 1;
|
||||
@@ -239,6 +248,15 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo
|
||||
DecomposeAffine_RowMajor(g_BoneLocalBuffer[bone].BoneLocal, S, R, T);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch.KeyCount < 2)
|
||||
{
|
||||
KeyFrame k = g_KeyFrameBuffer[ch.StartIndex];
|
||||
S = k.vScale;
|
||||
T = k.vTranslation;
|
||||
R = QuatNormalize(k.vRotation);
|
||||
return;
|
||||
}
|
||||
|
||||
uint idx0 = FindKeyIndexPrev(ch.StartIndex, ch.KeyCount, t);
|
||||
uint idx1 = idx0 + 1;
|
||||
@@ -256,6 +274,20 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo
|
||||
|
||||
row_major float4x4 SampleBlendedLocal(uint bone)
|
||||
{
|
||||
if (PrevAnimIndex == 0xFFFFFFFFu)
|
||||
{
|
||||
float3 S;
|
||||
float4 R;
|
||||
float3 T;
|
||||
SampleLocalTRS_Cur(bone, CurrentTime, S, R, T);
|
||||
if ((int) bone == RootBoneIndex)
|
||||
{
|
||||
T = 0;
|
||||
R = RootInitRot;
|
||||
}
|
||||
return MakeAffine(S, R, T);
|
||||
}
|
||||
|
||||
if (CurrentAnimIndex == PrevAnimIndex)
|
||||
{
|
||||
float3 S;
|
||||
|
||||
@@ -39,19 +39,19 @@ void CS_MAIN(uint3 DTid : SV_DispatchThreadID)
|
||||
|
||||
uint global = g_BoneRemap[local];
|
||||
|
||||
row_major float4x4 combined = g_LocalMatIn[global];
|
||||
float4x4 combined = g_LocalMatIn[global];
|
||||
|
||||
int p = g_ParentBuffer[global];
|
||||
while (p != -1)
|
||||
{
|
||||
combined = mul(combined, g_LocalMatIn[(uint) p]);
|
||||
p = g_ParentBuffer[(uint) p];
|
||||
combined = mul(combined,g_LocalMatIn[p]);
|
||||
p = g_ParentBuffer[p];
|
||||
}
|
||||
|
||||
combined = mul(combined, PreTransformMatrix);
|
||||
|
||||
g_LocalPosOutput[local].Combined = combined;
|
||||
g_LocalPosOutput[local].LocalCombined = combined;
|
||||
|
||||
|
||||
g_LocalPosOutput[local].Local = g_LocalMatIn[global];
|
||||
g_LocalPosOutput[local].LocalCombined = combined;
|
||||
g_LocalPosOutput[local].Combined = combined;
|
||||
|
||||
}
|
||||
|
||||
@@ -948,7 +948,7 @@ void CGameInstance::Add_ModelToMap(const _char* filePath, CModel* pModel)
|
||||
}
|
||||
#endif
|
||||
|
||||
void CGameInstance::Add_SaveModel(const _char* filePath, SaveModel sModel)
|
||||
void CGameInstance::Add_SaveModel(const _char* filePath, SaveModel& sModel)
|
||||
{
|
||||
lock_guard<mutex> lock(m_mtxLoadModelLock);
|
||||
m_sModelMap[filePath] = sModel;
|
||||
|
||||
@@ -23,7 +23,7 @@ HRESULT CMesh::Bind_BoneMatrices(const vector<class CBone*>& Bones, CShader* pSh
|
||||
|
||||
for (size_t i = 0; i < m_iNumBones; ++i) {
|
||||
XMStoreFloat4x4(&m_pBoneMatrices[i],
|
||||
/*XMLoadFloat4x4(&m_offsetMatrices[i]) **/ Bones[m_BoneIndices[i]]->Get_CombinedTransformationMatrix());
|
||||
XMLoadFloat4x4(&m_offsetMatrices[i]) * Bones[m_BoneIndices[i]]->Get_CombinedTransformationMatrix());
|
||||
}
|
||||
|
||||
if (0 == m_iNumBones) {
|
||||
@@ -645,6 +645,7 @@ HRESULT CMesh::Ready_VertexBuffer_For_Anim(vector<class CBone*>& Bones, const ai
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
CMesh* CMesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, const CModel* pModel, SaveMesh* _SaveMesh, _fmatrix PreTransformMatrix)
|
||||
|
||||
@@ -159,6 +159,8 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
|
||||
m_bIsFinishedAnim = pCurAnim->Update_TransformationMatrices(m_Bones, m_bIsLoop, fTimeDelta, true, m_iBoneMask, m_vector,m_iRootBoneIndex);
|
||||
|
||||
pCurAnim->InterpAnim(pPreAnim, m_Bones, m_fRatio);
|
||||
|
||||
if (m_fRatio >= 1.f)
|
||||
{
|
||||
m_iPreAnimIndex = m_iCurrentAnimIndex;
|
||||
@@ -172,7 +174,6 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
m_iPreAnimIndex = m_iCurrentAnimIndex;
|
||||
}
|
||||
|
||||
|
||||
if (m_bIsFinishedAnim)
|
||||
{
|
||||
if (m_bIsLoop)
|
||||
@@ -184,14 +185,10 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
XMStoreFloat3(&m_vPrevRootPos, m_vector[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ComputeAnimation(m_iCurrentAnimIndex, 0);
|
||||
|
||||
if (m_bIsFinishedAnim)
|
||||
{
|
||||
m_vPrevRootRot = { 0.f,0.f,0.f,0.f };
|
||||
m_bInitialRootRotSaved = false;
|
||||
}
|
||||
|
||||
|
||||
if (m_bRatio) {
|
||||
Update_RootBone(m_fAmount * m_fRatio);
|
||||
@@ -513,11 +510,6 @@ void CModel::Initialize_RootBone()
|
||||
}
|
||||
}
|
||||
|
||||
void CModel::BeginFrame()
|
||||
{
|
||||
fill(m_CPUBoneMask.begin(), m_CPUBoneMask.end(), false);
|
||||
}
|
||||
|
||||
vector<_float4x4> CModel::Get_OffsetMatrix(_int iIndex)
|
||||
{
|
||||
return m_Meshes[iIndex]->Get_OffsetMatrix();
|
||||
@@ -542,52 +534,6 @@ void CModel::Mark_CPUChain(_int boneIdx)
|
||||
}
|
||||
}
|
||||
|
||||
//void CModel::Create_BoneStagingBuffer()
|
||||
//{
|
||||
// D3D11_BUFFER_DESC desc{};
|
||||
// desc.Usage = D3D11_USAGE_STAGING;
|
||||
// desc.ByteWidth = sizeof(BONE_DESC) * (_uint)m_Bones.size();
|
||||
// desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
|
||||
// desc.BindFlags = 0;
|
||||
// desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
|
||||
// desc.StructureByteStride = sizeof(BONE_DESC);
|
||||
//
|
||||
// HRESULT hr = m_pDevice->CreateBuffer(&desc, nullptr, &m_pBoneStagingBuffer);
|
||||
//}
|
||||
|
||||
//const _float4x4 CModel::Get_BoneMatrix_GPU(_uint boneIndex)
|
||||
//{
|
||||
//
|
||||
// m_pContext->CopyResource(m_pBoneStagingBuffer, m_pBoneMatrixBuffer);
|
||||
//
|
||||
// D3D11_MAPPED_SUBRESOURCE mapped{};
|
||||
// m_pContext->Map(
|
||||
// m_pBoneStagingBuffer,
|
||||
// 0,
|
||||
// D3D11_MAP_READ,
|
||||
// 0,
|
||||
// &mapped
|
||||
// );
|
||||
//
|
||||
// BONE_DESC*pBone = static_cast<BONE_DESC*>(mapped.pData);
|
||||
//
|
||||
// m_pContext->Unmap(m_pBoneStagingBuffer, 0);
|
||||
//
|
||||
// return pBone->Combined;
|
||||
//}
|
||||
|
||||
//const _float4x4* CModel::Get_BoneMatrixPtr_Socket(const _char* name)
|
||||
//{
|
||||
// _int idx = Find_BoneIndex(name);
|
||||
// if (idx < 0)
|
||||
// return nullptr;
|
||||
//
|
||||
// _float4x4 mat = Get_BoneMatrix_GPU(idx);
|
||||
// m_SocketCache[name] = mat;
|
||||
//
|
||||
// return &m_SocketCache[name];
|
||||
//}
|
||||
|
||||
|
||||
const _float4x4* CModel::Get_BoneMatrixPtr(const _char* pBoneName)
|
||||
{
|
||||
@@ -2112,9 +2058,7 @@ _bool CModel::LoadData(const _char* filename)
|
||||
|
||||
fclose(fp);
|
||||
|
||||
m_SaveModel.push_back(NewModel);
|
||||
|
||||
m_pGameInstance->Add_SaveModel(filename, m_SaveModel.back());
|
||||
m_pGameInstance->Add_SaveModel(filename, NewModel);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2256,7 +2200,6 @@ HRESULT CModel::Initialize(void* pArg)
|
||||
Create_BoneLocalVB();
|
||||
Create_ParentSrv();
|
||||
Create_BoneLocalSrv();
|
||||
//Create_BoneStagingBuffer();
|
||||
|
||||
if (FAILED(Create_ComputeShaderLocal()))
|
||||
return E_FAIL;
|
||||
@@ -2403,8 +2346,6 @@ void CModel::Free()
|
||||
|
||||
SAFE_RELEASE(m_pTransform);
|
||||
|
||||
m_SaveModel.clear();
|
||||
|
||||
m_Parent.clear();
|
||||
m_AnimRanges.clear();
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@ enum ESTATE : _u64Flag
|
||||
PULSE = 1ULL << 41,
|
||||
TUCKED = 1ULL << 42,
|
||||
ANCIENT_SPELL = 1ULL << 43,
|
||||
FIRESWEEP = 1ULL << 44,
|
||||
GROUND = 1ULL << 45,
|
||||
SWIPE = 1ULL << 46,
|
||||
SLIDE = 1ULL << 47,
|
||||
END
|
||||
};
|
||||
NS_END
|
||||
|
||||
@@ -265,7 +265,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
public:
|
||||
void Add_ModelToMap(const _char* filePath, CModel* pModel);
|
||||
|
||||
void Add_SaveModel(const _char* filePath, SaveModel sModel);
|
||||
void Add_SaveModel(const _char* filePath, SaveModel& sModel);
|
||||
|
||||
SaveModel* Load_SaveModel(const _char* filePath);
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
@@ -28,6 +28,8 @@ class ENGINE_DLL CMesh final : public CVIBuffer
|
||||
HRESULT Ready_VertexBuffer_For_NonAnim(const aiMesh* pAIMesh, _fmatrix PreTransformMatrix);
|
||||
HRESULT Ready_VertexBuffer_For_Anim(vector<class CBone*>& Bones, const aiMesh* pAIMesh);
|
||||
|
||||
void BuildGlobalToLocal(_uint boneCount);
|
||||
|
||||
public:
|
||||
static CMesh* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, vector<class CBone*>& Bones, const aiMesh* pAIMesh, _fmatrix& PreTransformMatrix);
|
||||
#endif // EDITOR_PROJECT
|
||||
@@ -62,11 +64,9 @@ class ENGINE_DLL CMesh final : public CVIBuffer
|
||||
ID3D11ShaderResourceView* m_pBoneRemapSRV = nullptr;
|
||||
ID3D11Buffer* m_pBoneRemapBuffer = nullptr;
|
||||
|
||||
|
||||
|
||||
// 바이너리
|
||||
std::vector<_uint> m_Indices;
|
||||
std::vector<_float3> m_Vertices;
|
||||
vector<_uint> m_Indices;
|
||||
vector<_float3> m_Vertices;
|
||||
//
|
||||
|
||||
private:
|
||||
|
||||
@@ -74,7 +74,6 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
_uint Get_NumMeshes() const { return m_iNumMeshes; }
|
||||
void Update_RootBone(_float Amount = 1.f);
|
||||
void Initialize_RootBone();
|
||||
void BeginFrame();
|
||||
vector<_float4x4> Get_OffsetMatrix(_int iIndex);
|
||||
void Apply_CPUMask_ToBones();
|
||||
void Mark_CPUChain(_int boneIdx);
|
||||
@@ -168,9 +167,9 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
|
||||
// 바이너리
|
||||
SaveModel* m_pSaveModel = { nullptr };
|
||||
list<SaveModel> m_SaveModel;
|
||||
//
|
||||
|
||||
|
||||
vector<_float4x4> m_BoneMatrix;
|
||||
|
||||
_float3 m_vPrevRootPos = { 0.f, 0.f, 0.f };
|
||||
@@ -191,7 +190,6 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
_bool m_bRatio = { false };
|
||||
_bool m_bRootBone = {};
|
||||
_float4x4 m_RootMatrix = {};
|
||||
unordered_map<_string, _float4x4> m_SocketCache;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
NS_BEGIN(STATEANIM)
|
||||
enum ESTATE
|
||||
{
|
||||
IDLE,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, IDLE_COMBAT_TURN_BWD_L, IDLE_COMBAT_TURN_BWD_R, IDLE_COMBAT_TURN_90_L, IDLE_COMBAT_TURN_90_R,IDLE_BREAK1,IDLE_BREAK2,IDLE_BREAK3,IDLE_BREAK4, IDLE_BREAK5, IDLE_BREAK6, IDLE_BREAK7,
|
||||
IDLE, IDLE_G,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, IDLE_COMBAT_TURN_BWD_L, IDLE_COMBAT_TURN_BWD_R, IDLE_COMBAT_TURN_90_L, IDLE_COMBAT_TURN_90_R,IDLE_BREAK1,IDLE_BREAK2,IDLE_BREAK3,IDLE_BREAK4, IDLE_BREAK5, IDLE_BREAK6, IDLE_BREAK7,
|
||||
MOVE,
|
||||
WALK, WALK_FWD,WALK_RIGHT,WALK_LEFT, WALK_BWD,WALK_START,WALK_STOP,
|
||||
JOG,JOG_START, JOG_FWD, JOG_RIGHT, JOG_LEFT, JOG_BWD, JOG_STOP, JOG_AIM_LEFT, JOG_AIM_RIGHT, JOG_AIM_BWD, JOG_AIM_STOP_L, JOG_AIM_STOP_R, JOG_AIM_STOP_BWD,JOG_LEFT_TURN,JOG_RIGHT_TURN,JOG_112_L,JOG_112_R,JOG_90_L,JOG_90_R,
|
||||
SPRINT,
|
||||
SLIDE_START_R,SLIDE_LOOP_R,SLIDE_STOP_R,
|
||||
JUMP,JUMP_JOG,JUMP_SPRINT,
|
||||
LAND,
|
||||
DODGE,DODGE_BLINK, DODGE_LEFT, DODGE_RIGHT,
|
||||
@@ -39,10 +40,11 @@ enum ESTATE
|
||||
FLINCH_BWD,FLINCH_FWD, FLINCH_LEFT, FLINCH_RIGHT,
|
||||
STUMBLE_BWD_L,STUMBLE_BWD_R,STUMBLE_FWD,
|
||||
HOVER_LOOP,HOVER_DASH_FWD, HOVER_DASH_BWD, HOVER_DASH_LEFT, HOVER_DASH_RIGHT,
|
||||
FIREBALL1,FIREBALL2,
|
||||
FIREBREATH,FIREBREATH_COOLDOWN,FIREBREATH_WINDUP,
|
||||
FIREBALL1_A,FIREBALL2_A, FIREBALL1_G, FIREBALL2_G,
|
||||
FIREBREATH_A,FIREBREATH_COOLDOWN_A,FIREBREATH_WINDUP_A, FIRESWEEP_A, FIRESWEEP_COOLDOWN_A, FIRESWEEP_WINDUP_A, FIREBREATH_G, FIRESWEEP_G,
|
||||
PULSE,
|
||||
TUCKED,
|
||||
GROUND_SWIPE_L,GROUND_SWIPE_R,
|
||||
TUCKED,FLY_TO_HOVER,
|
||||
////////////////////////// 빗자루
|
||||
BROOM_MOUNT_B, BROOM_HOVER_IDLE_B, BROOM_HOVER_STOP_B,BROOM_HOVER_DOWN_B,BROOM_HOVER_UP_B,BROOM_HOVER_LEFT_B,BROOM_HOVER_RIGHT_B,BROOM_FLY_DOWN_B, BROOM_FLY_LEFT_B, BROOM_FLY_RIGHT_B, BROOM_FLY_UP_B,BROOM_FLY_B,BROOM_ADD,
|
||||
/// ////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user