@@ -160,6 +160,8 @@ call Update_Resources.bat
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Action_Panel.h" />
|
||||
<ClInclude Include="..\Public\Broom_State_Fly.h" />
|
||||
<ClInclude Include="..\Public\Broom_State_Hover.h" />
|
||||
<ClInclude Include="..\Public\CallBack_Troll_HitReport.h" />
|
||||
<ClInclude Include="..\Public\CameraLockOn.h" />
|
||||
<ClInclude Include="..\Public\Current_Slot_Number.h" />
|
||||
@@ -186,6 +188,8 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Logo_Glow.h" />
|
||||
<ClInclude Include="..\Public\Logo_Text.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Attack.h" />
|
||||
<ClInclude Include="..\Public\State_Broom_Dismount.h" />
|
||||
<ClInclude Include="..\Public\State_Broom_Ride_Move.h" />
|
||||
<ClInclude Include="..\Public\Troll_State_Stun.h" />
|
||||
<ClInclude Include="..\Public\State_Sustain.h" />
|
||||
<ClInclude Include="..\Public\WandEnd.h" />
|
||||
@@ -321,6 +325,8 @@ call Update_Resources.bat
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_States.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_State_Fly.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_State_Hover.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_Troll_HitReport.cpp" />
|
||||
<ClCompile Include="..\Private\CameraLockOn.cpp" />
|
||||
<ClCompile Include="..\Private\Current_Slot_Number.cpp" />
|
||||
@@ -347,6 +353,8 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Logo.cpp" />
|
||||
<ClCompile Include="..\Private\Logo_Glow.cpp" />
|
||||
<ClCompile Include="..\Private\Logo_Text.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_Dismount.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_Ride_Move.cpp" />
|
||||
<ClCompile Include="..\Private\State_Sustain.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Attack.cpp" />
|
||||
<ClCompile Include="..\Private\Troll_State_Stun.cpp" />
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
<Filter>02.GameObjects\Environment\00.MapContainer\StreetContainer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Broom_Ride.h">
|
||||
<Filter>04.Mechanic\State\Broom</Filter>
|
||||
<Filter>04.Mechanic\State\Broom_Player</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Skill_Data.h">
|
||||
<Filter>04.Mechanic\Skill\Skill_Data</Filter>
|
||||
@@ -490,14 +490,25 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Attack.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Goblin_Attack</Filter>
|
||||
</ClInclude>
|
||||
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_BattleAxe.h">
|
||||
<Filter>02.GameObjects\Item\Goblin_Axe</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Damage_Font.h">
|
||||
<Filter>04.Mechanic\Damage</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Broom_Ride_Move.h">
|
||||
<Filter>04.Mechanic\State\Broom_Player\State_Broom_Ride_Move</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Broom_Dismount.h">
|
||||
<Filter>04.Mechanic\State\Broom_Player\State_Broom_Dismount</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Broom_State_Hover.h">
|
||||
<Filter>04.Mechanic\State\Broom\Hover</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Broom_State_Fly.h">
|
||||
<Filter>04.Mechanic\State\Broom\Fly</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -781,9 +792,6 @@
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Action_Panel\Spell_UI">
|
||||
<UniqueIdentifier>{9914341c-f246-4fdb-b28c-de7a6d2d149b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Broom">
|
||||
<UniqueIdentifier>{48b905c1-b91e-44ca-a61b-86633826768b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\00.MapContainer\StreetContainer">
|
||||
<UniqueIdentifier>{e12a4228-0754-4217-b65d-7f962409f85c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -1041,10 +1049,28 @@
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Goblin_Attack">
|
||||
<UniqueIdentifier>{967d1741-2780-40b7-b55e-9fd58e931ef7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\Damage">
|
||||
<UniqueIdentifier>{36962dce-8c99-4c54-9189-2a49785a211e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Broom_Player">
|
||||
<UniqueIdentifier>{48b905c1-b91e-44ca-a61b-86633826768b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Broom_Player\State_Broom_Ride_Move">
|
||||
<UniqueIdentifier>{d6be355f-c860-4323-9967-583265749698}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Broom_Player\State_Broom_Dismount">
|
||||
<UniqueIdentifier>{51b299f6-ebb0-4f58-9620-5e1dc24a2e60}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Broom">
|
||||
<UniqueIdentifier>{ca81f80e-701f-4988-ac3b-3ea2e6812a66}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Broom\Hover">
|
||||
<UniqueIdentifier>{75764f4a-7eef-4daf-bd8c-d07aef1c59cf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Broom\Fly">
|
||||
<UniqueIdentifier>{537c9208-b8e7-4e3b-a818-27335e3f0469}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -1255,7 +1281,7 @@
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Action_Panel\Potion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Broom_Ride.cpp">
|
||||
<Filter>04.Mechanic\State\Broom</Filter>
|
||||
<Filter>04.Mechanic\State\Broom_Player</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\StreetContainer.cpp">
|
||||
<Filter>02.GameObjects\Environment\00.MapContainer\StreetContainer</Filter>
|
||||
@@ -1482,11 +1508,22 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Attack.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Goblin_Attack</Filter>
|
||||
</ClCompile>
|
||||
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Damage_Font.cpp">
|
||||
<Filter>04.Mechanic\Damage</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Broom_Ride_Move.cpp">
|
||||
<Filter>04.Mechanic\State\Broom_Player\State_Broom_Ride_Move</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Broom_Dismount.cpp">
|
||||
<Filter>04.Mechanic\State\Broom_Player\State_Broom_Dismount</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Broom_State_Hover.cpp">
|
||||
<Filter>04.Mechanic\State\Broom\Hover</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Broom_State_Fly.cpp">
|
||||
<Filter>04.Mechanic\State\Broom\Fly</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_State_Fly.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CBroom_State_Fly::CBroom_State_Fly()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CBroom_State_Fly::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CBroom_State_Fly::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 CBroom_State_Fly::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CBroom_State_Fly::Initialize(STATE_FLY_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;
|
||||
}
|
||||
|
||||
CBroom_State_Fly* CBroom_State_Fly::Create(STATE_FLY_DESC* pDesc)
|
||||
{
|
||||
CBroom_State_Fly* pInstance = new CBroom_State_Fly;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_State_Fly::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CBroom_State_Fly::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_State_Hover.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CBroom_State_Hover::CBroom_State_Hover()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CBroom_State_Hover::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CBroom_State_Hover::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 CBroom_State_Hover::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CBroom_State_Hover::Initialize(STATE_HOVER_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;
|
||||
}
|
||||
|
||||
CBroom_State_Hover* CBroom_State_Hover::Create(STATE_HOVER_DESC* pDesc)
|
||||
{
|
||||
CBroom_State_Hover* pInstance = new CBroom_State_Hover;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_State_Hover::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CBroom_State_Hover::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -6,6 +6,8 @@
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_Move.h"
|
||||
#include "Broom_State_Hover.h"
|
||||
#include "Broom_State_Fly.h"
|
||||
#pragma endregion
|
||||
|
||||
#pragma region States
|
||||
@@ -90,14 +92,12 @@ void CBroom::Behavior_IdleEnter() {
|
||||
|
||||
HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
{
|
||||
_uint iCurrAnimIndex = m_Animation[STATEANIM::BROOM_MOUNT_B].first;
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
if (SUCCEEDED(InputAction())) {
|
||||
if (m_pGameInstance->Key_Down(DIK_B)) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_pFSM->Enable_State(FSMSTATE::MOUNT_B);
|
||||
}
|
||||
if (m_bRide) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_pFSM->Enable_State(FSMSTATE::MOUNT_B);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove()) || SUCCEEDED(InputAction()))
|
||||
@@ -129,8 +129,10 @@ void CBroom::Behavior_IdleExit()
|
||||
void CBroom::Behavior_MoveEnter()
|
||||
{
|
||||
if (!m_bRide)
|
||||
{
|
||||
m_bHoverToggle = true;
|
||||
return;
|
||||
|
||||
}
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
|
||||
@@ -161,6 +163,7 @@ void CBroom::Behavior_MoveEnter()
|
||||
else if (m_pGameInstance->Key_Down(DIK_LSHIFT))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
m_bHoverToggle = false;
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
@@ -171,22 +174,23 @@ void CBroom::Behavior_MoveEnter()
|
||||
HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (!m_bRide)
|
||||
{
|
||||
m_bHoverToggle = true;
|
||||
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
_bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
|
||||
|
||||
/*_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_pGameInstance->Key_Up(DIK_LSHIFT))
|
||||
{
|
||||
m_bHoverToggle = !m_bHoverToggle;
|
||||
}
|
||||
|
||||
if (m_bHoverToggle)
|
||||
{
|
||||
if (bFwd)
|
||||
@@ -224,6 +228,11 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_LSHIFT))
|
||||
{
|
||||
m_bHoverToggle = false;
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
else{
|
||||
@@ -297,7 +306,6 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
else if (vInput.x > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
|
||||
else {
|
||||
Camera_InterpTurn(fTimeDelta);
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
}
|
||||
}
|
||||
@@ -329,8 +337,13 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_LSHIFT))
|
||||
{
|
||||
m_bHoverToggle = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (m_bHoverToggle && !SUCCEEDED(InputMove()) && !SUCCEEDED(InputAction()))
|
||||
{
|
||||
@@ -357,6 +370,227 @@ 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_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_bHoverToggle)
|
||||
{
|
||||
if (bFwd)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B];
|
||||
|
||||
m_fTargetSpeed = m_fHoverMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
|
||||
}
|
||||
else if (bLft)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_LEFT_B];
|
||||
}
|
||||
else if (bRht)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_RIGHT_B];
|
||||
|
||||
}
|
||||
else if (bDown)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_DOWN_B];
|
||||
m_fTargetSpeed = m_fTurnMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
m_pTransformCom->Go_LerpDown(m_fSpeed, fTimeDelta);
|
||||
}
|
||||
else if (bUp)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_UP_B];
|
||||
m_fTargetSpeed = m_fTurnMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
m_pTransformCom->Go_LerpUp(m_fSpeed, fTimeDelta);
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_LSHIFT))
|
||||
{
|
||||
m_bHoverToggle = false;
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CBroom::Behavior_Broom_HoverExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::HOVER);
|
||||
}
|
||||
|
||||
void CBroom::Behavior_Broom_FlyEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::FLY);
|
||||
}
|
||||
|
||||
HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
_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_bHoverToggle) {
|
||||
m_fTargetSpeed = m_fFlyMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
|
||||
|
||||
if (SUCCEEDED(InputAction()) || 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)
|
||||
{
|
||||
m_fTargetSpeed = m_fTurnMaxSpeed;
|
||||
m_fTurnSpeed += (m_fTurnMaxSpeed - m_fTurnSpeed) * fTimeDelta * m_fAccel;
|
||||
|
||||
if (bUp)
|
||||
{
|
||||
m_pTransformCom->Go_LerpUp(m_fTurnSpeed, fTimeDelta);
|
||||
m_fVerticalSpeed = +m_fTurnSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pTransformCom->Go_LerpDown(m_fTurnSpeed, fTimeDelta);
|
||||
m_fVerticalSpeed = -m_fTurnSpeed;
|
||||
}
|
||||
}
|
||||
|
||||
if (vInput.x < 0.f)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.1f);
|
||||
}
|
||||
else if (vInput.x > 0.f)
|
||||
{
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.1f);
|
||||
}
|
||||
|
||||
_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_FLY_UP_B];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
m_fVerticalSpeed += (0.f - m_fVerticalSpeed) * fTimeDelta * m_fDecel;
|
||||
|
||||
if (fabs(m_fVerticalSpeed) > 0.001f)
|
||||
{
|
||||
if (m_fVerticalSpeed > 0.f)
|
||||
m_pTransformCom->Go_LerpUp(m_fVerticalSpeed, fTimeDelta);
|
||||
else
|
||||
m_pTransformCom->Go_LerpDown(-m_fVerticalSpeed, fTimeDelta);
|
||||
}
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_LSHIFT))
|
||||
{
|
||||
m_bHoverToggle = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_bHoverToggle && !SUCCEEDED(InputMove()) && !SUCCEEDED(InputAction()))
|
||||
{
|
||||
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);
|
||||
if (m_pModelCom->IsFinishedAnim() && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CBroom::Behavior_Broom_FlyExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::FLY);
|
||||
}
|
||||
|
||||
|
||||
void CBroom::Camera_InterpTurn(_float fTimeDelta)
|
||||
{
|
||||
@@ -393,6 +627,7 @@ void CBroom::Camera_InterpTurn(_float fTimeDelta)
|
||||
_float targetAngle = XMConvertToDegrees(CMyTools::Get_Direction2D(fCamLook, fInput2D));
|
||||
|
||||
_float angleDiff = degree - targetAngle;
|
||||
|
||||
if (angleDiff > 180.f) {
|
||||
angleDiff -= 360.f;
|
||||
}
|
||||
@@ -404,11 +639,11 @@ void CBroom::Camera_InterpTurn(_float fTimeDelta)
|
||||
|
||||
if (angleDiff > Offset)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta*0.1f);
|
||||
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.1f);
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -262,12 +262,12 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
case ENUM_CLASS(SKILL_TYPE::DESCENDO):
|
||||
m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::FLIPENDO):
|
||||
m_eHitSpell = STATEANIM::TUMBLE2;
|
||||
case ENUM_CLASS(SKILL_TYPE::BOMBARDA):
|
||||
m_eHitSpell = STATEANIM::KNOCKDOWN_BWD;
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::JAP):
|
||||
{
|
||||
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
|
||||
m_eHitSpell = STATEANIM::HIT_BWD;
|
||||
|
||||
m_DamageInfo.fDamage = damagePair.first;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
|
||||
|
||||
@@ -50,6 +50,7 @@ void CGoblin_BattleAxe::Priority_Update(_float fTimeDelta)
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
|
||||
|
||||
@@ -251,18 +251,18 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
case ENUM_CLASS(SKILL_TYPE::DESCENDO):
|
||||
m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::FLIPENDO):
|
||||
m_eHitSpell = STATEANIM::TUMBLE2;
|
||||
case ENUM_CLASS(SKILL_TYPE::BOMBARDA):
|
||||
m_eHitSpell = STATEANIM::KNOCKDOWN_BWD;
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::JAP):
|
||||
{
|
||||
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
|
||||
_float fSkillRatio = m_pInfoInstance->Get_Spell_Info(ENUM_CLASS(SKILL_TYPE::JAP)).fSpell_Damage;
|
||||
_float fCoefficient = CollisionDesc->pObject->Get_Component<CStat>()->Get_Stat().fDamage;
|
||||
/*if (true == Get_Damage(fSkillRatio * fCoefficient)) {
|
||||
m_pFSM->Change_State(FSMSTATE::DEAD);
|
||||
return;
|
||||
}*/
|
||||
m_eHitSpell = STATEANIM::HIT_BWD;
|
||||
//_float fSkillRatio = m_pInfoInstance->Get_Spell_Info(ENUM_CLASS(SKILL_TYPE::JAP)).fSpell_Damage;
|
||||
//_float fCoefficient = CollisionDesc->pObject->Get_Component<CStat>()->Get_Stat().fDamage;
|
||||
//if (true == Get_Damage(fSkillRatio * fCoefficient)) {
|
||||
// m_pFSM->Change_State(FSMSTATE::DEAD);
|
||||
// return;
|
||||
//}
|
||||
}
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
|
||||
|
||||
@@ -136,7 +136,7 @@ HRESULT CLoding_Panel::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("<- N M->."), _float2(100.f, 750.f));
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("<- N M ->."), _float2(100.f, 750.f));
|
||||
|
||||
if (INHYUK == true)
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nUI의 생일은 28일 이랍니다."), _float2(100.f, 800.f));
|
||||
|
||||
@@ -180,6 +180,11 @@ void CPlayer::Late_Update(_float fTimeDelta)
|
||||
if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
static_cast<CMapElement_Interactable*>(m_LockOnInfo.pInteractive)->Set_DrawOutLine();
|
||||
}
|
||||
|
||||
if (m_bLookAt && m_LockOnInfo.pUnit)
|
||||
{
|
||||
m_pTransformCom->LookAt_Lerp(m_LockOnInfo.pUnit->Get_WorldPostion(), fTimeDelta, 5.f);
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
_vector look = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "State_Spell.h"
|
||||
#include "State_Hit.h"
|
||||
#include "State_Broom_Ride.h"
|
||||
#include "State_Broom_Ride_Move.h"
|
||||
#include "State_Broom_Dismount.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "EffectPool.h"
|
||||
@@ -710,7 +712,8 @@ void CPlayer::Behavior_JumpEnter()
|
||||
|
||||
HRESULT CPlayer::Behavior_JumpExitCheck()
|
||||
{
|
||||
if (IsCurrentKeyFrame("Jump")) {
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
if (fRatio>=0.7f) {
|
||||
m_pFSM->Change_State(FSMSTATE::LAND);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -822,6 +825,11 @@ void CPlayer::Behavior_CombatEnter()
|
||||
m_vGrapInteratableLerp.x = 0.f;
|
||||
return;
|
||||
}
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_bLookAt = true; },
|
||||
0.12f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { Throwing_Interactive(); },
|
||||
0.2f);
|
||||
@@ -855,6 +863,7 @@ void CPlayer::Behavior_CombatEnter()
|
||||
HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
|
||||
if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) {
|
||||
if (m_pGameInstance->Key_Down(DIK_R))
|
||||
@@ -874,10 +883,18 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_Z)) {
|
||||
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
if (nullptr != m_pGrapInteractive) {
|
||||
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);
|
||||
@@ -916,20 +933,23 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
|
||||
if (m_pFSM->IsEnable(FSMSTATE::ANCIENT_THROW))
|
||||
{
|
||||
if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) {
|
||||
if (SUCCEEDED(InputMove()) && fRatio>=0.4f) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
m_bLookAt = false;
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Combat")) {
|
||||
if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
m_bLookAt = false;
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_bLookAt = false;
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
@@ -953,7 +973,46 @@ void CPlayer::Behavior_LightAttackEnter()
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK);
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
if (m_LockOnInfo.pUnit)
|
||||
{
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
_vector vTargetLook = m_LockOnInfo.pUnit->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
vLook = XMVector3Normalize(vLook);
|
||||
vTargetLook = XMVector3Normalize(vTargetLook);
|
||||
|
||||
_float fDot = XMVectorGetX(XMVector3Dot(vLook, vTargetLook));
|
||||
fDot = clamp(fDot, -1.0f, 1.0f);
|
||||
|
||||
_float fAngleRad = acosf(fDot);
|
||||
_float Degree = XMConvertToDegrees(fAngleRad);
|
||||
_vector vCross = XMVector3Cross(vLook, vTargetLook);
|
||||
_float Cross = XMVectorGetY(vCross);
|
||||
|
||||
if (Degree <= 30.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK_180_R];
|
||||
}
|
||||
else if (Degree <= 120.f)
|
||||
{
|
||||
if (Cross > 0.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK_90_L];
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK_90_R2];
|
||||
}
|
||||
}
|
||||
else{
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bLookAt = true;
|
||||
},
|
||||
0.01f);
|
||||
}
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {_uint iIndex = 0; m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject<CWand>(), &iIndex); },
|
||||
@@ -964,7 +1023,7 @@ void CPlayer::Behavior_LightAttackEnter()
|
||||
0.0f);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_LightAttackExitCheck()
|
||||
HRESULT CPlayer::Behavior_LightAttackExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
@@ -973,12 +1032,24 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck()
|
||||
_uint iCurr = m_pModelCom->Get_AnimIndex();
|
||||
_uint iStart = m_Animation[STATEANIM::LIGHT_ATTACK].first;
|
||||
|
||||
if (iCurr == m_Animation[STATEANIM::LIGHT_ATTACK_180_R].first||
|
||||
iCurr == m_Animation[STATEANIM::LIGHT_ATTACK_90_L].first||
|
||||
iCurr == m_Animation[STATEANIM::LIGHT_ATTACK_90_R2].first) {
|
||||
iCurr = iStart;
|
||||
}
|
||||
|
||||
if (iCurr >= iStart && iCurr < iStart + 3)
|
||||
{
|
||||
_uint iNext = iCurr + 1;
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
|
||||
pairAnimInfo.first = iNext;
|
||||
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bLookAt = true;
|
||||
},
|
||||
0.01f);
|
||||
|
||||
if (fRatio >= 0.1f)
|
||||
{
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
@@ -1003,6 +1074,7 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck()
|
||||
|
||||
if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
m_bLookAt = false;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -1011,6 +1083,7 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck()
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
m_bLookAt = false;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -1030,15 +1103,63 @@ void CPlayer::Behavior_SpellEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
m_pFSM->Enable_State(FSMSTATE::SPELL);
|
||||
if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END))
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL];
|
||||
_float fRatio = 0.f;
|
||||
if (m_LockOnInfo.pUnit)
|
||||
{
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
_vector vTargetLook = m_LockOnInfo.pUnit->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
vLook = XMVector3Normalize(vLook);
|
||||
vTargetLook = XMVector3Normalize(vTargetLook);
|
||||
|
||||
_float fDot = XMVectorGetX(XMVector3Dot(vLook, vTargetLook));
|
||||
fDot = clamp(fDot, -1.0f, 1.0f);
|
||||
|
||||
_float fAngleRad = acosf(fDot);
|
||||
_float Degree = XMConvertToDegrees(fAngleRad);
|
||||
_vector vCross = XMVector3Cross(vLook, vTargetLook);
|
||||
_float Cross = XMVectorGetY(vCross);
|
||||
|
||||
if (Degree <= 30.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL_180_R];
|
||||
fRatio = 0.15f;
|
||||
}
|
||||
else if (Degree <= 120.f)
|
||||
{
|
||||
if (Cross > 0.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL_90_L];
|
||||
}
|
||||
else {
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bLookAt = true;
|
||||
},
|
||||
0.01f);
|
||||
}
|
||||
fRatio = 0.15f;
|
||||
}
|
||||
else {
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bLookAt = true;
|
||||
},
|
||||
0.01f);
|
||||
fRatio = 0.2f;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fRatio = 0.2f;
|
||||
}
|
||||
|
||||
if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END) && m_eSpell != -1)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL];
|
||||
switch (m_eSpell)
|
||||
{
|
||||
case ENUM_CLASS(SKILL_TYPE::BOMBARDA):
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this); },
|
||||
0.2f);
|
||||
fRatio);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA_SIDE, Get_PartObject<CWand>()); },
|
||||
0.f);
|
||||
@@ -1046,7 +1167,7 @@ void CPlayer::Behavior_SpellEnter()
|
||||
case ENUM_CLASS(SKILL_TYPE::DESCENDO):
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, Get_PartObject<CWand>()); },
|
||||
0.2f);
|
||||
fRatio);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO_SIDE, Get_PartObject<CWand>()); },
|
||||
0.f);
|
||||
@@ -1054,7 +1175,7 @@ void CPlayer::Behavior_SpellEnter()
|
||||
case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this); },
|
||||
0.2f);
|
||||
fRatio);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO_SIDE, Get_PartObject<CWand>()); },
|
||||
0.f);
|
||||
@@ -1110,14 +1231,10 @@ void CPlayer::Behavior_SpellEnter()
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL_FAIL];
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::WAND_END, Get_PartObject<CWand>()); },
|
||||
0.2f);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1128,11 +1245,8 @@ void CPlayer::Behavior_SpellEnter()
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::WAND_END, Get_PartObject<CWand>()); },
|
||||
0.2f);
|
||||
|
||||
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_SpellExitCheck()
|
||||
@@ -1146,17 +1260,27 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
|
||||
_uint iCurr = m_pModelCom->Get_AnimIndex();
|
||||
_uint iStart = m_Animation[STATEANIM::SPELL].first;
|
||||
|
||||
if (iCurr == m_Animation[STATEANIM::SPELL_180_R].first||
|
||||
iCurr == m_Animation[STATEANIM::SPELL_90_L].first) {
|
||||
iCurr = iStart;
|
||||
}
|
||||
|
||||
if (iCurr >= iStart && iCurr < iStart + 3)
|
||||
{
|
||||
if (fRatio >= 0.2f)
|
||||
if (fRatio >= 0.15f)
|
||||
{
|
||||
_uint iNext = iCurr + 1;
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL];
|
||||
pairAnimInfo.first = iNext;
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bLookAt = true;
|
||||
},
|
||||
0.01f);
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END))
|
||||
if (m_eSpell != ENUM_CLASS(SKILL_TYPE::END)&& m_eSpell != -1)
|
||||
{
|
||||
_float fRatio = 0.2f;
|
||||
if (iNext - iStart == 2) {
|
||||
@@ -1196,6 +1320,10 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL_FAIL];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1226,12 +1354,14 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
|
||||
}
|
||||
|
||||
|
||||
if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Combat")) {
|
||||
if (SUCCEEDED(InputMove()) && fRatio>=0.3f) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
m_bLookAt = false;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_bLookAt = false;
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
@@ -1301,12 +1431,6 @@ HRESULT CPlayer::Behavior_Broom_RideExitCheck(_float fTimeDelta)
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
_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 (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT].first)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
@@ -1316,141 +1440,203 @@ HRESULT CPlayer::Behavior_Broom_RideExitCheck(_float fTimeDelta)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
|
||||
}
|
||||
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_Broom_RideExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE);
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_Broom_Ride_MoveEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::BROOM_RIDE_MOVE);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
_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_pGameInstance->Key_Down(DIK_LSHIFT))
|
||||
{
|
||||
m_bHoverToggle = !m_bHoverToggle;
|
||||
}
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::DISMOUNT))
|
||||
|
||||
if (m_bHoverToggle)
|
||||
{
|
||||
if (m_bHoverToggle)
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_FWD);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_LEFT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_RIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE);
|
||||
}
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_FWD);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_LEFT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_RIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE);
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
else
|
||||
{
|
||||
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)
|
||||
{
|
||||
_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)
|
||||
{
|
||||
if (bUp)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
|
||||
}
|
||||
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);
|
||||
_float ax = fabsf(vInput.x);
|
||||
_float ay = fabsf(vInput.y);
|
||||
_float az = fabsf(vInput.z);
|
||||
|
||||
if (ay > ax && ay > az)
|
||||
if (ay > ax && ay > az)
|
||||
{
|
||||
if (vInput.y > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
|
||||
}
|
||||
else if (ax >= az)
|
||||
{
|
||||
if (ay >= ax)
|
||||
{
|
||||
if (vInput.y > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
|
||||
}
|
||||
else if (ax >= az)
|
||||
{
|
||||
if (ay >= ax)
|
||||
{
|
||||
if (vInput.y > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
|
||||
}
|
||||
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_FWD];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vInput.y > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
|
||||
else if (vInput.y < 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
|
||||
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_FWD];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
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_bOnce = false;
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DISMOUNT);
|
||||
m_pFSM->Enable_State(FSMSTATE::DISMOUNT);
|
||||
m_pBroom->Set_Ride(false);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pFSM->Change_State(FSMSTATE::BROOM_DISMOUNT);
|
||||
}
|
||||
else {
|
||||
m_pBroomTransform->Go_Down(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_Broom_Ride_MoveExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE_MOVE);
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_Broom_DismountEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
m_bOnce = false;
|
||||
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);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta)
|
||||
{
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_DISMOUNT].first)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
_vector look = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
_vector worldUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
_vector right = XMVector3Normalize(XMVector3Cross(worldUp, look));
|
||||
_vector up = XMVector3Normalize(XMVector3Cross(look, right));
|
||||
|
||||
m_pTransformCom->Set_State(STATE::RIGHT, right);
|
||||
m_pTransformCom->Set_State(STATE::UP, up);
|
||||
m_pTransformCom->Set_State(STATE::LOOK, look);
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
}
|
||||
else {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_Broom_RideExit()
|
||||
void CPlayer::Behavior_Broom_DismountExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE | FSMSTATE::DISMOUNT);
|
||||
m_pFSM->Disable_State(FSMSTATE::BROOM_DISMOUNT);
|
||||
}
|
||||
|
||||
void CPlayer::Player_InterpTurn(_float fTimeDelta)
|
||||
@@ -1660,7 +1846,7 @@ void CPlayer::Add_FSM()
|
||||
CState_LightAttack::STATE_LIGHTATTACK_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_LightAttackEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_LightAttackExitCheck(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_LightAttackExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_LightAttackExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
@@ -1705,12 +1891,10 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcExitEvent = [this]() { Behavior_Broom_RideExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
if (m_pFSM->IsEnable(FSMSTATE::DISMOUNT))
|
||||
return;
|
||||
|
||||
_vector OffsetY = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
if (!m_bOnce) {
|
||||
m_pBroomTransform->Set_State(STATE::POSITION, Get_WorldPostion()+ OffsetY);
|
||||
m_pBroomTransform->Set_WorldMatrix(m_pTransformCom->Get_XMWorldMatrix());
|
||||
m_pBroomTransform->Set_State(STATE::POSITION, m_pBroomTransform->Get_State(STATE::POSITION)+XMVectorSet(0.f, 2.5f, 0.f, 0.f));
|
||||
m_bOnce = true;
|
||||
}
|
||||
|
||||
@@ -1723,10 +1907,7 @@ void CPlayer::Add_FSM()
|
||||
|
||||
_matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
|
||||
|
||||
m_OffsetPos = { 0.f, 1.4f, 0.f };
|
||||
#ifdef _DEBUG
|
||||
GUI::DragFloat3("BroomOffset", (_float*)&m_OffsetPos, 0.01f);
|
||||
#endif // _DEBUG
|
||||
m_OffsetPos = { 0.f, 0.9f, 0.f };
|
||||
|
||||
_matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
|
||||
m_OffsetPos.y, m_OffsetPos.z);
|
||||
@@ -1737,25 +1918,6 @@ void CPlayer::Add_FSM()
|
||||
|
||||
_matrix FinalWorld = FixRot * SocketWorld;
|
||||
|
||||
//_matrix PlayerWorld = XMLoadFloat4x4(m_pTransformCom->Get_WorldMatrixPtr());
|
||||
|
||||
//_matrix GoalWorld = FinalWorld;
|
||||
|
||||
//_vector CurS, CurR, CurT;
|
||||
//_vector GoalS, GoalR, GoalT;
|
||||
|
||||
//XMMatrixDecompose(&CurS, &CurR, &CurT, PlayerWorld);
|
||||
//XMMatrixDecompose(&GoalS, &GoalR, &GoalT, GoalWorld);
|
||||
|
||||
//_vector finalR = XMQuaternionSlerp(CurR, GoalR, fTimeDelta); // 8~12는 튐 방지
|
||||
//_vector finalT = XMVectorLerp(CurT, GoalT, fTimeDelta);
|
||||
|
||||
//_matrix finalMat = XMMatrixAffineTransformation(GoalS, XMVectorZero(), finalR, finalT);
|
||||
|
||||
//m_pTransformCom->Set_WorldMatrix(finalMat);
|
||||
//m_pCharacter_Controller->Set_Position(finalMat.r[3]);
|
||||
|
||||
|
||||
_vector SourS, SourR, SourT;
|
||||
_vector DestS, DestR, DestT;
|
||||
XMMatrixDecompose(&SourS, &SourR, &SourT, FinalWorld);
|
||||
@@ -1773,6 +1935,62 @@ void CPlayer::Add_FSM()
|
||||
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();
|
||||
|
||||
_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, 0.9f, 0.f };
|
||||
_matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
|
||||
m_OffsetPos.y, m_OffsetPos.z);
|
||||
|
||||
_matrix SocketWorld = BoneNoScale * Offset * BroomWorld;
|
||||
|
||||
_matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f));
|
||||
|
||||
_matrix FinalWorld = FixRot * SocketWorld;
|
||||
|
||||
_vector SourS, SourR, SourT;
|
||||
_vector DestS, DestR, DestT;
|
||||
XMMatrixDecompose(&SourS, &SourR, &SourT, FinalWorld);
|
||||
XMMatrixDecompose(&DestS, &DestR, &DestT, m_pTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
_vector finalR = XMQuaternionSlerp(SourR, DestR, fTimeDelta);
|
||||
_vector finalT = XMVectorLerp(SourT, DestT, fTimeDelta);
|
||||
|
||||
_matrix finalMat = XMMatrixAffineTransformation(DestS, XMVectorZero(), finalR, finalT);
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(finalMat);
|
||||
m_pCharacter_Controller->Set_Position(finalMat.r[3]);
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::BROOM_RIDE_MOVE, CState_Broom_Ride_Move::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
|
||||
|
||||
}
|
||||
@@ -1815,8 +2033,19 @@ void CPlayer::Set_Anim()
|
||||
|
||||
m_Animation[STATEANIM::SKILL] = { 593,false };
|
||||
m_Animation[STATEANIM::SKILL2] = { 991,false };
|
||||
|
||||
m_Animation[STATEANIM::LIGHT_ATTACK] = { 413,false };
|
||||
m_Animation[STATEANIM::LIGHT_ATTACK_180_R] = { 809,false };
|
||||
|
||||
m_Animation[STATEANIM::LIGHT_ATTACK_90_L] = { 801,false };
|
||||
m_Animation[STATEANIM::LIGHT_ATTACK_90_R1] = { 849,false };
|
||||
m_Animation[STATEANIM::LIGHT_ATTACK_90_R2] = { 853,false };
|
||||
m_Animation[STATEANIM::LIGHT_ATTACK_90_R3] = { 854,false };
|
||||
|
||||
m_Animation[STATEANIM::SPELL] = { 772,false };
|
||||
m_Animation[STATEANIM::SPELL_180_R] = { 837,false }; // 837 805
|
||||
m_Animation[STATEANIM::SPELL_90_L] = { 826,false };
|
||||
|
||||
m_Animation[STATEANIM::MAPHELP] = { 122,false };
|
||||
m_Animation[STATEANIM::POTION] = { 114,false }; // 114 포션 // 909 루모스
|
||||
m_Animation[STATEANIM::ACCIO] = { 417,false };
|
||||
@@ -1876,6 +2105,12 @@ void CPlayer::Set_Anim()
|
||||
|
||||
//906 마법 실패
|
||||
|
||||
|
||||
|
||||
// 821 90도 L
|
||||
// 849 90도 R
|
||||
// 853 90도 R
|
||||
// 854 90도 R
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
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()
|
||||
{
|
||||
}
|
||||
@@ -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<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
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()
|
||||
{
|
||||
}
|
||||
@@ -83,6 +83,13 @@ class CBroom final : public CUnit
|
||||
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();
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom_State_Fly final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagFly : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_FLY_DESC;
|
||||
private:
|
||||
CBroom_State_Fly();
|
||||
virtual ~CBroom_State_Fly() = 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_FLY_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CBroom_State_Fly* Create(STATE_FLY_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 CBroom_State_Hover final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagHover : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_HOVER_DESC;
|
||||
private:
|
||||
CBroom_State_Hover();
|
||||
virtual ~CBroom_State_Hover() = 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_HOVER_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CBroom_State_Hover* Create(STATE_HOVER_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -110,6 +110,7 @@ class CPlayer final : public CUnit
|
||||
_bool m_bAim = { false };
|
||||
_float m_fAnimSpeed = {};
|
||||
_bool m_bOnce = { };
|
||||
_bool m_bLookAt = {false};
|
||||
|
||||
HRESULT InputAction();
|
||||
HRESULT InputMove();
|
||||
@@ -143,7 +144,7 @@ class CPlayer final : public CUnit
|
||||
void Behavior_CombatExit();
|
||||
|
||||
void Behavior_LightAttackEnter();
|
||||
HRESULT Behavior_LightAttackExitCheck();
|
||||
HRESULT Behavior_LightAttackExitCheck(_float fTimeDelta);
|
||||
void Behavior_LightAttackExit();
|
||||
|
||||
void Behavior_SpellEnter();
|
||||
@@ -158,6 +159,13 @@ class CPlayer final : public CUnit
|
||||
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_DismountEnter();
|
||||
HRESULT Behavior_Broom_DismountExitCheck(_float fTimeDelta);
|
||||
void Behavior_Broom_DismountExit();
|
||||
|
||||
void Player_InterpTurn(_float fTimeDelta);
|
||||
void Throwing_Interactive();
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Broom_Dismount final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagBroomDismount : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> 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<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> 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
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Broom_Ride_Move final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagBroomRideMove : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> 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<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> 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
|
||||
@@ -39,6 +39,8 @@ void CBroom::Priority_Update(_float fTimeDelta)
|
||||
void CBroom::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
Describe_Entity();
|
||||
}
|
||||
|
||||
void CBroom::Late_Update(_float fTimeDelta)
|
||||
@@ -160,4 +162,5 @@ void CBroom::Free()
|
||||
|
||||
void CBroom::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -2061,11 +2061,6 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
|
||||
m_strMessage = TEXT("Model Loading..");
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VFX_SM_Rock_01_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Props\\Weapons\\Goblins\\SK_WPN_GOB_BattleAxe01.fbx", XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
// Heavy Wall
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
@@ -2096,10 +2091,6 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
}
|
||||
vector<future<pair<_wstring, CModel*>*>> futures = {};
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_troll_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma region BODY
|
||||
|
||||
@@ -2184,11 +2175,6 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
TEXT("Prototype_Component_GoblinMage_Model")
|
||||
));
|
||||
|
||||
//futures.emplace_back(Deferred_ModelLoad(
|
||||
// MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/SK_GOB_M_Specter_Master.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
|
||||
// TEXT("Prototype_Component_SK_GOB_M_Specter_Master_Model")
|
||||
//));
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Anim_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector_Anim.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
@@ -2230,15 +2216,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
));
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::NONANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/Goblin_Dagger.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f)* XMMatrixIdentity(),
|
||||
MODEL::NONANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/Goblin_Dagger.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f)* XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Dagger_Model")
|
||||
));
|
||||
|
||||
/*futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ENVIROMENT, "C:\\Users\\Bin\\Desktop\\Hogwart\\Game\\RiggedObjects\\Characters\\Human\\Body\\Generic_M\\SK_GenericDarkWizard_14.fbx", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Npc_Model")
|
||||
));*/
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Npc_Model")
|
||||
|
||||
@@ -327,8 +327,8 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _boo
|
||||
m_Animations[m_iCurrentAnimIndex]->Set_AnimSpeed(1.f);
|
||||
}
|
||||
|
||||
//m_fBlendTime = 0.f;
|
||||
//m_fRatio = 0.f;
|
||||
m_fBlendTime = 0.f;
|
||||
m_fRatio = 0.f;
|
||||
|
||||
m_iCurrentAnimIndex = iIndex;
|
||||
m_bIsLoop = isLoop;
|
||||
|
||||
@@ -37,6 +37,10 @@ enum ESTATE : _u64Flag
|
||||
DEAD = 1ULL << 30,
|
||||
STUN = 1ULL << 31,
|
||||
SUSTAIN = 1ULL << 32,
|
||||
BROOM_RIDE_MOVE = 1ULL << 33,
|
||||
BROOM_DISMOUNT = 1ULL << 34,
|
||||
HOVER = 1ULL << 35,
|
||||
FLY = 1ULL << 36,
|
||||
END
|
||||
};
|
||||
NS_END
|
||||
|
||||
@@ -12,7 +12,9 @@ enum ESTATE
|
||||
JUMP,JUMP_JOG,JUMP_SPRINT,
|
||||
LAND,
|
||||
DODGE,DODGE_BLINK, DODGE_LEFT, DODGE_RIGHT,
|
||||
COMBAT, LIGHT_ATTACK, SPELL, SKILL, SKILL2,
|
||||
COMBAT, SKILL, SKILL2,
|
||||
SPELL, SPELL_180_R, SPELL_90_L,
|
||||
LIGHT_ATTACK,LIGHT_ATTACK_180_R, LIGHT_ATTACK_90_L, LIGHT_ATTACK_90_R1, LIGHT_ATTACK_90_R2, LIGHT_ATTACK_90_R3,
|
||||
ATTACK_END,
|
||||
SHUFFLE1, SHUFFLE2, SHUFFLE3, SHUFFLE4,
|
||||
MAPHELP,POTION,
|
||||
|
||||
Reference in New Issue
Block a user