[Modify] 병합 수락
This commit is contained in:
@@ -0,0 +1,231 @@
|
||||
#include "pch.h"
|
||||
#include "Broom.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_Dodge.h"
|
||||
#include "State_Jump.h"
|
||||
#include "State_Land.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_Broom_Ride.h"
|
||||
#pragma endregion
|
||||
|
||||
#pragma region States
|
||||
|
||||
HRESULT CBroom::InputAction()
|
||||
{
|
||||
if (
|
||||
m_pGameInstance->Key_Down(DIK_SPACE)
|
||||
|| m_pGameInstance->Key_Down(DIK_LCONTROL)
|
||||
|| m_pGameInstance->Key_Down(DIK_E)
|
||||
|| m_pGameInstance->Key_Down(DIK_R)
|
||||
|| m_pGameInstance->Key_Down(DIK_Q)
|
||||
|| m_pGameInstance->Mouse_Up(DIM_LBUTTON)
|
||||
|| m_pGameInstance->Key_Down(DIK_LSHIFT)
|
||||
|| m_pGameInstance->Key_Down(DIK_C)
|
||||
|| m_pGameInstance->Key_Down(DIK_V)
|
||||
|| m_pGameInstance->Key_Down(DIK_Z)
|
||||
|| m_pGameInstance->Key_Down(DIK_G)
|
||||
|| m_pGameInstance->Key_Down(DIK_B)
|
||||
)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CBroom::InputMove()
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_A)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_S)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_D))
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CBroom::InputKeyUpMove()
|
||||
{
|
||||
if (m_pGameInstance->Key_Up(DIK_W)
|
||||
|| m_pGameInstance->Key_Up(DIK_A)
|
||||
|| m_pGameInstance->Key_Up(DIK_S)
|
||||
|| m_pGameInstance->Key_Up(DIK_D))
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CBroom::InputSpell()
|
||||
{
|
||||
if (
|
||||
m_pGameInstance->Key_Down(DIK_1)
|
||||
|| m_pGameInstance->Key_Down(DIK_2)
|
||||
|| m_pGameInstance->Key_Down(DIK_3)
|
||||
|| m_pGameInstance->Key_Down(DIK_4)
|
||||
)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CBroom::InputAim()
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON) ||
|
||||
m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CBroom::Behavior_IdleEnter() {
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLE);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B];
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CBroom::Behavior_IdleExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
void CBroom::Behavior_MoveEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_bool bFoward = m_pGameInstance->Key_Pressing(DIK_W);
|
||||
_bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
|
||||
_bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
|
||||
_bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
|
||||
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::JOG);
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
if (bFoward)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
}
|
||||
else if (bLeft)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
|
||||
}
|
||||
else if (bRight)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_bool bFoward = m_pGameInstance->Key_Pressing(DIK_W);
|
||||
_bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
|
||||
_bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
|
||||
_bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
|
||||
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
if (bFoward)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
m_pTransformCom->Go_Straight(fTimeDelta);
|
||||
}
|
||||
else if (bLeft)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
|
||||
}
|
||||
else if (bRight)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CBroom::Behavior_MoveExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK);
|
||||
}
|
||||
|
||||
void CBroom::Add_FSM()
|
||||
{
|
||||
#pragma region Behavior_Movement_NotFocus
|
||||
{
|
||||
CState_Idle::STATE_IDLE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
|
||||
}
|
||||
{
|
||||
CState_Move::STATE_MOVE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
|
||||
void CBroom::Set_Anim()
|
||||
{
|
||||
m_Animation[STATEANIM::BROOM_MOUNT_B] = { 29,false };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_IDLE_B] = { 24,true };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_STOP_B] = { 6,false };
|
||||
m_Animation[STATEANIM::BROOM_FLY_B] = { 5,true };
|
||||
m_Animation[STATEANIM::BROOM_FLY_DOWN_B] = { 13,true };
|
||||
m_Animation[STATEANIM::BROOM_FLY_LEFT_B] = { 15,true };
|
||||
m_Animation[STATEANIM::BROOM_FLY_RIGHT_B] = { 16,true };
|
||||
m_Animation[STATEANIM::BROOM_FLY_UP_B] = { 17,true };
|
||||
//Mount 29
|
||||
//호버 스탑 6
|
||||
//호버 제자리 24
|
||||
//플라이 업 17 다운 13 왼쪽15 오른쪽 16
|
||||
}
|
||||
#pragma endregion State
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
//_CrtSetBreakAlloc(1181);
|
||||
//_CrtSetBreakAlloc(45489776);
|
||||
//_CrtSetBreakAlloc(1182);
|
||||
//_CrtSetBreakAlloc(1183);
|
||||
//_CrtSetBreakAlloc(1184);
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd /d "$(SolutionDir)"
|
||||
call Update_Shaders.bat
|
||||
call Update_Resources.bat
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
@@ -154,7 +154,7 @@ call Update_Shaders.bat
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd /d "$(SolutionDir)"
|
||||
call Update_Shaders.bat
|
||||
call Update_Resources.bat
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
@@ -228,6 +228,7 @@ call Update_Shaders.bat
|
||||
<ClInclude Include="..\Public\Spell_Overlay.h" />
|
||||
<ClInclude Include="..\Public\Spell_Slot.h" />
|
||||
<ClInclude Include="..\Public\Spell_UI.h" />
|
||||
<ClInclude Include="..\Public\State_Broom_Ride.h" />
|
||||
<ClInclude Include="..\Public\State_Combat.h" />
|
||||
<ClInclude Include="..\Public\State_Dodge.h" />
|
||||
<ClInclude Include="..\Public\State_Idle.h" />
|
||||
@@ -235,6 +236,7 @@ call Update_Shaders.bat
|
||||
<ClInclude Include="..\Public\State_Land.h" />
|
||||
<ClInclude Include="..\Public\State_Move.h" />
|
||||
<ClInclude Include="..\Public\State_Root.h" />
|
||||
<ClInclude Include="..\public\StreetContainer.h" />
|
||||
<ClInclude Include="..\public\Terrain.h" />
|
||||
<ClInclude Include="..\Public\TrailObject.h" />
|
||||
<ClInclude Include="..\Public\Wand.h" />
|
||||
@@ -315,6 +317,7 @@ call Update_Shaders.bat
|
||||
<ClCompile Include="..\Private\Spell_Overlay.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_UI.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_Ride.cpp" />
|
||||
<ClCompile Include="..\Private\State_Combat.cpp" />
|
||||
<ClCompile Include="..\Private\State_Dodge.cpp" />
|
||||
<ClCompile Include="..\Private\State_Idle.cpp" />
|
||||
@@ -322,9 +325,11 @@ call Update_Shaders.bat
|
||||
<ClCompile Include="..\Private\State_Land.cpp" />
|
||||
<ClCompile Include="..\Private\State_Move.cpp" />
|
||||
<ClCompile Include="..\Private\State_Root.cpp" />
|
||||
<ClCompile Include="..\private\StreetContainer.cpp" />
|
||||
<ClCompile Include="..\private\Terrain.cpp" />
|
||||
<ClCompile Include="..\Private\TrailObject.cpp" />
|
||||
<ClCompile Include="..\Private\Wand.cpp" />
|
||||
<ClCompile Include="Broom_States.cpp" />
|
||||
<ClCompile Include="Client.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -250,6 +250,12 @@
|
||||
<ClInclude Include="..\Public\Potion.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Action_Panel\Potion</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\StreetContainer.h">
|
||||
<Filter>02.GameObjects\Environment\00.MapContainer\StreetContainer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Broom_Ride.h">
|
||||
<Filter>04.Mechanic\State\Broom</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -548,6 +554,12 @@
|
||||
<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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -787,6 +799,15 @@
|
||||
<ClCompile Include="..\Private\Potion.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Action_Panel\Potion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Broom_States.cpp">
|
||||
<Filter>02.GameObjects\Item\Broom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Broom_Ride.cpp">
|
||||
<Filter>04.Mechanic\State\Broom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\StreetContainer.cpp">
|
||||
<Filter>02.GameObjects\Environment\00.MapContainer\StreetContainer</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc">
|
||||
|
||||
@@ -25,15 +25,18 @@ HRESULT CBombard::Initialize_Prototype()
|
||||
|
||||
HRESULT CBombard::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
if (FAILED(__super::Initialize(pArg))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Bombard")))
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Bombard"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_wstrEffectName = L"Bombard";
|
||||
@@ -78,13 +81,15 @@ void CBombard::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CBombard::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
if (pObject == nullptr) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pOwner = pObject;
|
||||
|
||||
if (FAILED(Ready_Child()))
|
||||
if (FAILED(Ready_Child())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
@@ -141,7 +146,7 @@ HRESULT CBombard::Ready_Child()
|
||||
XMStoreFloat3(&vDir, vOwnerLook * 2.f);
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_BOMBARD_STRIKE);
|
||||
Desc.vDeltaPos = vDir;
|
||||
Desc.vLifeTime = { 0.f, 2.f };
|
||||
|
||||
@@ -150,6 +155,8 @@ HRESULT CBombard::Ready_Child()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -201,15 +208,15 @@ void CBombard::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
Get_PartObject<CEffectParts>("Bombard_Circle0")->Set_Visible(false);
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
void CBombard::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pLight_Projectile);
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
#include "GameInstance.h"
|
||||
|
||||
CBroom::CBroom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
: CUnit(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom::CBroom(const CBroom& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
: CUnit(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -20,14 +20,28 @@ HRESULT CBroom::Initialize_Prototype()
|
||||
|
||||
HRESULT CBroom::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Add_FSM();
|
||||
|
||||
Set_Anim();
|
||||
|
||||
{
|
||||
CFSM::FSM_DESC FSMDesc{};
|
||||
FSMDesc.pStates = &m_States;
|
||||
FSMDesc.pStateMask = &m_iStateMask;
|
||||
|
||||
m_pFSM->Bind_States(FSMDesc);
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(5);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -38,12 +52,14 @@ void CBroom::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CBroom::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
}
|
||||
|
||||
void CBroom::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CBroom::Render()
|
||||
@@ -91,13 +107,16 @@ HRESULT CBroom::Ready_Components()
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Broom_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -151,11 +170,6 @@ CGameObject* CBroom::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CBroom::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "BuildingContainer.h"
|
||||
#include "PartObject.h"
|
||||
//#include "Terrain.h"
|
||||
//#include "Layer.h"
|
||||
//#include "VIBuffer_Terrain.h"
|
||||
|
||||
CBuildingContainer::CBuildingContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CMapContainer(pDevice, pContext)
|
||||
@@ -27,16 +24,21 @@ void CBuildingContainer::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
m_fCamDepth = XMVectorGetX(XMVector3Length(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMLoadFloat3(&m_vExtentWorldPosition)));
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
pCollisiton->Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBuildingContainer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Late_Update(fTimeDelta);
|
||||
if (m_pOcclusionQueryCom->isDraw())
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
pCollisiton->Late_Update(fTimeDelta);
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this);
|
||||
}
|
||||
|
||||
HRESULT CBuildingContainer::Render()
|
||||
@@ -44,6 +46,41 @@ HRESULT CBuildingContainer::Render()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBuildingContainer::Render_BoundingBox()
|
||||
{
|
||||
/* Begin_Query, End_Query 사이에 Render */
|
||||
|
||||
m_pOcclusionQueryCom->Begin_Query();
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pOcclusionQueryCom->End_Query();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBuildingContainer::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
@@ -65,6 +102,8 @@ HRESULT CBuildingContainer::Initialize(void* pArg)
|
||||
m_pTransformCom->Set_Scale(pDesc->vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
|
||||
|
||||
XMStoreFloat3(&m_vExtentWorldPosition, XMVector3TransformCoord(XMLoadFloat3(&m_vExtentWorldPosition), m_pTransformCom->Get_XMWorldMatrix()));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -74,6 +113,47 @@ HRESULT CBuildingContainer::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_VTXPOS,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
MAP_CONTAINER_DESC* pDesc = static_cast<MAP_CONTAINER_DESC*>(pArg);
|
||||
|
||||
_float3 vBoxCorners[8] = {};
|
||||
|
||||
vBoxCorners[0] = _float3(pDesc->vContainerMin.x, pDesc->vContainerMax.y, pDesc->vContainerMin.z);
|
||||
vBoxCorners[1] = _float3(pDesc->vContainerMax.x, pDesc->vContainerMax.y, pDesc->vContainerMin.z);
|
||||
vBoxCorners[2] = _float3(pDesc->vContainerMax.x, pDesc->vContainerMin.y, pDesc->vContainerMin.z);
|
||||
vBoxCorners[3] = _float3(pDesc->vContainerMin.x, pDesc->vContainerMin.y, pDesc->vContainerMin.z);
|
||||
vBoxCorners[4] = _float3(pDesc->vContainerMin.x, pDesc->vContainerMax.y, pDesc->vContainerMax.z);
|
||||
vBoxCorners[5] = _float3(pDesc->vContainerMax.x, pDesc->vContainerMax.y, pDesc->vContainerMax.z);
|
||||
vBoxCorners[6] = _float3(pDesc->vContainerMax.x, pDesc->vContainerMin.y, pDesc->vContainerMax.z);
|
||||
vBoxCorners[7] = _float3(pDesc->vContainerMin.x, pDesc->vContainerMin.y, pDesc->vContainerMax.z);
|
||||
|
||||
_float3 vRadius = {};
|
||||
|
||||
vRadius.x = (pDesc->vContainerMax.x - pDesc->vContainerMin.x) * 0.5f;
|
||||
vRadius.y = (pDesc->vContainerMax.y - pDesc->vContainerMin.y) * 0.5f;
|
||||
vRadius.z = (pDesc->vContainerMax.z - pDesc->vContainerMin.z) * 0.5f;
|
||||
|
||||
m_vExtentWorldPosition.x = pDesc->vContainerMin.x + vRadius.x;
|
||||
m_vExtentWorldPosition.y = pDesc->vContainerMin.y + vRadius.y;
|
||||
m_vExtentWorldPosition.z = pDesc->vContainerMin.z + vRadius.z;
|
||||
|
||||
/* Com_VIBuffer */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Box"),
|
||||
reinterpret_cast<CComponent**>(&m_pVIBufferCom), &vBoxCorners))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Com_OcclusionQuery */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_OcclusionQuery"),
|
||||
reinterpret_cast<CComponent**>(&m_pOcclusionQueryCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -112,6 +192,10 @@ void CBuildingContainer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
SAFE_RELEASE(m_pOcclusionQueryCom);
|
||||
|
||||
for (auto& pCollision : m_ColiisonPartObjects)
|
||||
SAFE_RELEASE(pCollision);
|
||||
}
|
||||
|
||||
@@ -88,6 +88,9 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
GUI::DragFloat3("Camera Shoulder Position",(_float*)&m_vShoulderPosRatio,0.01f);
|
||||
GUI::DragFloat("Camera Shoulder Length",&m_fCameraFocalLength, 0.01f);
|
||||
if (m_pGameInstance->Key_Up(DIK_O)) {
|
||||
m_pBinded_Camera->Toggle_Priority();
|
||||
}
|
||||
@@ -110,6 +113,14 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
m_bLerp = true;
|
||||
m_vLerpTimer.x = 0.f;
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)) {
|
||||
m_pBinded_Camera->ZoomIn(fTimeDelta);
|
||||
m_bZoomIn = true;
|
||||
}
|
||||
else if(m_bZoomIn)
|
||||
{
|
||||
m_pBinded_Camera->Set_Fov(XMConvertToRadians(60.f),fTimeDelta, m_bZoomIn);
|
||||
}
|
||||
}
|
||||
|
||||
void CCamPosition_Shoulder::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -26,14 +26,17 @@ HRESULT CDecendo::Initialize_Prototype()
|
||||
|
||||
HRESULT CDecendo::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Decendo")))
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Decendo"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_wstrEffectName = L"Decendo";
|
||||
@@ -53,12 +56,18 @@ void CDecendo::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->RewindMomentum();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CDecendo::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
if (m_bVisible == false){
|
||||
return;
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
@@ -68,6 +77,10 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vOwnerLook * 0.5f);
|
||||
}
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
@@ -76,6 +89,10 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
}
|
||||
}
|
||||
|
||||
void CDecendo::Late_Update(_float fTimeDelta)
|
||||
@@ -90,15 +107,17 @@ void CDecendo::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
if (pObject == nullptr) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* 부모 할당 */
|
||||
m_pOwner = pObject;
|
||||
|
||||
/* 피직스 생성*/
|
||||
if (FAILED(Ready_Child()))
|
||||
if (FAILED(Ready_Child())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* 초기 셋팅 초기화 */
|
||||
Reset_EffectParts();
|
||||
@@ -107,7 +126,7 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
CPartObject* pCircle0 = m_PartObjects.begin()->second;
|
||||
CPartObject* pCircle0 = Get_PartObject<CEffectParts>();
|
||||
|
||||
/* 초기 객체 위치 초기화 */
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
@@ -118,7 +137,7 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
pCircle0->Set_Visible(true);
|
||||
m_pProjectile->Set_Visible(true);
|
||||
m_pProjectile_Blur->Set_Visible(true);
|
||||
|
||||
|
||||
/*트레일 초기화 */
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(true);
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTrail>()->Reset_Trail();
|
||||
@@ -132,7 +151,6 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
_vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2));
|
||||
|
||||
m_vRotateUp = XMVector3Rotate(vUp, vQuaternion);
|
||||
|
||||
m_vRotateUp = XMVector3Normalize(m_vRotateUp);
|
||||
|
||||
m_bVisible = true;
|
||||
@@ -157,24 +175,19 @@ HRESULT CDecendo::Ready_Child()
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir , vOwnerLook * 0.5f);
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = vDir ;
|
||||
Desc.vDeltaPos = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -205,10 +218,10 @@ CGameObject* CDecendo::Clone(void* pArg, CGameObject* pOwner)
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDecendo::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
void CDecendo::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
@@ -229,28 +242,29 @@ void CDecendo::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
Get_PartObject<CEffectParts>("Decendo_Down")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
Get_PartObject<CEffectParts>("Decendo_Smoke")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
|
||||
m_PartObjects.begin()->second->Set_Visible(false);
|
||||
Get_PartObject<CEffectParts>()->Set_Visible(false);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
void CDecendo::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
if (m_pPhysHitBox != nullptr){
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pProjectile_Blur);
|
||||
SAFE_RELEASE(m_pProjectile);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CDecendo::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("VALUE");
|
||||
@@ -263,6 +277,7 @@ void CDecendo::Describe_Entity()
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ HRESULT CEffectObject::Render()
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(m_EffectInfo.eShaderPass)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -102,12 +102,55 @@ HRESULT CEffectObject::Render_Blur()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectObject::Render_Bloom()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBloomStrength", &m_EffectInfo.fBloomStrength, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBloomType", &m_EffectInfo.eBloomType, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomDissolve", &m_EffectInfo.isBloomDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomReverseDissolve", &m_EffectInfo.isBloomReverseDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::BLOOM)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Render(i)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel)
|
||||
{
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pNoise_TextureCom);
|
||||
@@ -119,7 +162,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
|
||||
if (m_pLightCom != nullptr)
|
||||
SAFE_RELEASE(m_pLightCom);
|
||||
|
||||
|
||||
_string strPerfectFilePath = pFilePath;
|
||||
|
||||
strPerfectFilePath += ".bin";
|
||||
@@ -161,7 +204,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_EffectInfo.isDiffuse)
|
||||
{
|
||||
@@ -253,7 +296,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isDissolve)
|
||||
@@ -286,7 +329,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isEmissive)
|
||||
@@ -317,7 +360,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isDistortion)
|
||||
@@ -390,8 +433,6 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
HRESULT CEffectObject::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
@@ -637,7 +678,6 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CEffectObject::Ready_Components(void* pArg)
|
||||
@@ -652,7 +692,7 @@ HRESULT CEffectObject::Ready_Components(void* pArg)
|
||||
if (FAILED(__super::Ready_Components(&TransformDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//나중에 로드할 때 라이트를 값을 입력받아서 생성 하자
|
||||
return S_OK;
|
||||
@@ -690,7 +730,7 @@ void CEffectObject::Free()
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pInstance_ModelCom);
|
||||
|
||||
if(m_pLightCom != nullptr)
|
||||
if (m_pLightCom != nullptr)
|
||||
SAFE_RELEASE(m_pLightCom);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,11 @@ void CEffectParts::Late_Update(_float fTimeDelta)
|
||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||
|
||||
|
||||
if (m_EffectInfo.isBloom == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this);
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isBlur == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this);
|
||||
|
||||
@@ -111,7 +111,7 @@ HRESULT CEffectPool::Bind_ShaderResources()
|
||||
HRESULT CEffectPool::Ready_Effect()
|
||||
{
|
||||
|
||||
if(FAILED(Create_Effect(SKILL_TYPE::JAP, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if(FAILED(Create_Effect(SKILL_TYPE::JAP, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CNomalJap* pEffect = nullptr;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "EffectParts.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
#include "PhysXEffectHitBox.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@@ -175,6 +176,7 @@ HRESULT CEffect_Container::Bind_ShaderResources()
|
||||
void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
{
|
||||
|
||||
|
||||
m_fPreAccTime = m_fAccTime;
|
||||
m_fAccTime += fTimeDelta;
|
||||
|
||||
@@ -198,12 +200,18 @@ void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bVisible = false;
|
||||
|
||||
for (auto& pPart : m_PartObjects)
|
||||
{
|
||||
pPart.second->Set_Visible(false);
|
||||
}
|
||||
|
||||
m_bVisible = false;
|
||||
if (m_pPhysHitBox != nullptr && m_pPhysHitBox->isDead() == false)
|
||||
{
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ void CGoblin::Update(_float fTimeDelta)
|
||||
void CGoblin::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Late_Update(fTimeDelta);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position());
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
|
||||
m_pTransformCom->LookAt(XMLoadFloat4(&m_vTargetPos));
|
||||
|
||||
@@ -148,7 +148,7 @@ HRESULT CGoblin::Ready_Components()
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(COLLIDABLEOBJECT::MONSTER);
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::GOBLIN_WARRIOR);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.1f;
|
||||
@@ -167,7 +167,7 @@ HRESULT CGoblin::Ready_Components()
|
||||
m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(COLLIDABLEOBJECT::MONSTER);
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::GOBLIN_WARRIOR);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,16 @@ void CInfoInstance::Change_Level()
|
||||
m_pMapInfo->Change_Level();
|
||||
}
|
||||
|
||||
void CInfoInstance::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight)
|
||||
{
|
||||
m_pPlayerInfo->Update_CameraCoordinateSystem(vLook, vRight);
|
||||
}
|
||||
|
||||
pair<_float3, _float3> CInfoInstance::Get_CameraCoordinateSystem()
|
||||
{
|
||||
return m_pPlayerInfo->Get_CameraCoordinateSystem();
|
||||
}
|
||||
|
||||
#pragma region MONSTER_INFO
|
||||
HRESULT CInfoInstance::Regist_PlayerAlly(CUnit* pUnit)
|
||||
{
|
||||
|
||||
@@ -182,13 +182,15 @@ HRESULT CLevel_GamePlay::Ready_Markers()
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))){
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, strLayerTag,nullptr,nullptr,&m_pBroom)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, m_pBroom))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
/*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
|
||||
return E_FAIL;*/
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -202,7 +204,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
|
||||
CDummy_PhysXWall::PHYSXDUMMY_DESC Desc{};
|
||||
Desc.vPos = { 0.f, 0.f, 0.f };
|
||||
Desc.vRotRPY = { 0.f, m_pGameInstance->Random_Float(0.f, XM_2PI), 0.f };
|
||||
Desc.iSubKind = 23;
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::WALL);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXWall>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE, &Desc))) {
|
||||
return E_FAIL;
|
||||
@@ -213,12 +215,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
{
|
||||
/*for (_uint i = 0; i < 2; ++i)
|
||||
for (_uint i = 0; i < 2; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER,&i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
#include "VIBuffer_Terrain.h"
|
||||
#include "VIBuffer_Model_Instance.h"
|
||||
#include "BuildingContainer.h"
|
||||
#include "StreetContainer.h"
|
||||
#include "MapObject_Render.h"
|
||||
#include "MapObject_Collision.h"
|
||||
#include "InstancedProp.h"
|
||||
@@ -443,6 +444,12 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_VTXPOS,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxPos.hlsl"),
|
||||
VTXPOS::Elements, VTXPOS::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_MESH,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl"),
|
||||
VTXMESH::Elements, VTXMESH::iNumElements)))) {
|
||||
@@ -557,7 +564,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Broom_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Model"),
|
||||
@@ -1055,9 +1062,27 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
#pragma region MAP PROTOTYPE
|
||||
/* For.Prototype_Component_VIBuffer_Terrain */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"),
|
||||
CVIBuffer_Terrain::Create(m_pDevice, m_pContext, "Hogsmeade_HeightMap.bin", 512, 512))))
|
||||
return E_FAIL;
|
||||
{
|
||||
CVIBuffer_Terrain* pTerrain = CVIBuffer_Terrain::Create(m_pDevice, m_pContext, "Hogsmeade_HeightMap.bin", 512, 512);
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"), pTerrain))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
pTerrain->ConvertToHeightField(TEXT("Hogsmeade_HeightMap"));
|
||||
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_PROTOTYPEDESC Desc{}; // 터레인 리지드 지형 추가
|
||||
{
|
||||
Desc.eType = ACTOR::HEIGHTFIELD;
|
||||
Desc.ePxRigidBodyFlags = {};
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
|
||||
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
|
||||
Desc.fContactOffset = 0.f;
|
||||
}
|
||||
CRigidBody_Static* pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"), pRigid))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"),
|
||||
@@ -1073,6 +1098,16 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Box */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Box"),
|
||||
CVIBuffer_Box::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_OcclusionQuery */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_OcclusionQuery"),
|
||||
COcclusionQuery::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Terrain */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTerrain>(g_iStaticLevel, CTerrain::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -1081,6 +1116,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBuildingContainer>(g_iStaticLevel, CBuildingContainer::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_CStreetContainer */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CStreetContainer>(g_iStaticLevel, CStreetContainer::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_CMapObject_Render */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapObject_Render>(g_iStaticLevel, CMapObject_Render::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -28,7 +28,7 @@ HRESULT CMainApp::Initialize()
|
||||
EngineDesc.iWinSizeY = g_iWinSizeY;
|
||||
EngineDesc.iStaticLevel = g_iStaticLevel;
|
||||
EngineDesc.iNumLevels = ENUM_CLASS(LEVEL::END);
|
||||
EngineDesc.iNumCollidableGroup = ENUM_CLASS(COLLIDABLEOBJECT::END);
|
||||
EngineDesc.iNumCollidableGroup = ENUM_CLASS(COLLIDABLEOBJECT_KIND::END);
|
||||
|
||||
//ShowCursor(false);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "BuildingContainer.h"
|
||||
#include "StreetContainer.h"
|
||||
#include "MAPPartObject.h"
|
||||
#include "MapObject_Render.h"
|
||||
#include "MapObject_Collision.h"
|
||||
@@ -40,123 +41,28 @@ HRESULT CMapInfo::Load_MapObjects(const _char* pFileName)
|
||||
for (auto* Container = root->FirstChildElement("Container"); Container; Container = Container->NextSiblingElement("Container"))
|
||||
{
|
||||
const _char* pName = {};
|
||||
|
||||
_uint iMapContainerType = {};
|
||||
Container->QueryStringAttribute("Name", &pName);
|
||||
#pragma region ADD_CONTAINER_OBJECT
|
||||
Container->QueryUnsignedAttribute("MapContainerType", &iMapContainerType);
|
||||
|
||||
CBuildingContainer* pContainerObject = { nullptr };
|
||||
CMapContainer::MAP_CONTAINER_DESC ContainerDesc = {};
|
||||
CMapContainer* pContainerObject = nullptr;
|
||||
|
||||
auto* ContainerPosition = Container->FirstChildElement("Position");
|
||||
ContainerPosition->QueryFloatAttribute("x", &ContainerDesc.vPosition.x);
|
||||
ContainerPosition->QueryFloatAttribute("y", &ContainerDesc.vPosition.y);
|
||||
ContainerPosition->QueryFloatAttribute("z", &ContainerDesc.vPosition.z);
|
||||
|
||||
auto* ContainerScale = Container->FirstChildElement("Scale");
|
||||
ContainerScale->QueryFloatAttribute("x", &ContainerDesc.vScale.x);
|
||||
ContainerScale->QueryFloatAttribute("y", &ContainerDesc.vScale.y);
|
||||
ContainerScale->QueryFloatAttribute("z", &ContainerDesc.vScale.z);
|
||||
|
||||
auto* ContainerRotation = Container->FirstChildElement("Rotation");
|
||||
ContainerRotation->QueryFloatAttribute("x", &ContainerDesc.vRotation.x);
|
||||
ContainerRotation->QueryFloatAttribute("y", &ContainerDesc.vRotation.y);
|
||||
ContainerRotation->QueryFloatAttribute("z", &ContainerDesc.vRotation.z);
|
||||
|
||||
m_pGameInstance->Add_GameObject_ToLayer<CBuildingContainer>(
|
||||
g_iStaticLevel, ENUM_CLASS(LEVEL::GAMEPLAY), LAYER_BACKGROUND, &ContainerDesc, nullptr, &pContainerObject);
|
||||
#pragma endregion
|
||||
|
||||
#pragma region ADD_PARTOBJECT
|
||||
for (auto* PartObject = Container->FirstChildElement("PartObject"); PartObject; PartObject = PartObject->NextSiblingElement("PartObject"))
|
||||
if (0 == iMapContainerType)
|
||||
{
|
||||
_uint iLodLevel = {};
|
||||
_uint iKeyIndex = {};
|
||||
|
||||
PartObject->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
|
||||
PartObject->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
|
||||
|
||||
#pragma region MAPOBJECT_RENDER
|
||||
CMapPartObject::MAPOBJECT_DESC Desc = {};
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
|
||||
Desc.iMaxLodLevel = iLodLevel;
|
||||
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
|
||||
const string strKey = CMyTools::ToString(Desc.ModelPrototypeTags.front()) + to_string(iKeyIndex);
|
||||
|
||||
/* Position */
|
||||
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
/* Scale */
|
||||
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
/* Rotation */
|
||||
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
if (FAILED(pContainerObject->Add_Part<CMapObject_Render>(strKey, g_iStaticLevel, nullptr, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
Load_BuildingContainer(Container, &pContainerObject);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region ADD_COLLISION
|
||||
for (auto* Collision = Container->FirstChildElement("Collision"); Collision; Collision = Collision->NextSiblingElement("Collision"))
|
||||
else if (1 == iMapContainerType)
|
||||
{
|
||||
_uint iLodLevel = {};
|
||||
_uint iKeyIndex = {};
|
||||
|
||||
Collision->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
|
||||
Collision->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
|
||||
|
||||
#pragma region MAPOBJECT_LOD
|
||||
CMapPartObject::MAPOBJECT_DESC Desc = {};
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = Collision->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(PrototypeTag->GetText()));
|
||||
}
|
||||
Desc.iMaxLodLevel = iLodLevel;
|
||||
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
|
||||
|
||||
/* Position */
|
||||
tinyxml2::XMLElement* Position = Collision->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
/* Scale */
|
||||
tinyxml2::XMLElement* Scale = Collision->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
/* Rotation */
|
||||
tinyxml2::XMLElement* Rotation = Collision->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
pContainerObject->Add_Collision<CMapObject_Collision>(g_iStaticLevel, &Desc);
|
||||
#pragma endregion
|
||||
|
||||
Load_StreetContainer(Container, &pContainerObject);
|
||||
}
|
||||
#pragma endregion
|
||||
else
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Load_MapRenderObjects(Container, pContainerObject)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Load_MapCollisionObjects(Container, pContainerObject)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
@@ -201,6 +107,165 @@ HRESULT CMapInfo::Load_MapObjects(const _char* pFileName)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Load_BuildingContainer(tinyxml2::XMLElement* Container, CMapContainer** ppContainerObject)
|
||||
{
|
||||
CBuildingContainer::MAP_CONTAINER_DESC ContainerDesc = {};
|
||||
|
||||
auto* ContainerPosition = Container->FirstChildElement("Position");
|
||||
ContainerPosition->QueryFloatAttribute("x", &ContainerDesc.vPosition.x);
|
||||
ContainerPosition->QueryFloatAttribute("y", &ContainerDesc.vPosition.y);
|
||||
ContainerPosition->QueryFloatAttribute("z", &ContainerDesc.vPosition.z);
|
||||
|
||||
auto* ContainerScale = Container->FirstChildElement("Scale");
|
||||
ContainerScale->QueryFloatAttribute("x", &ContainerDesc.vScale.x);
|
||||
ContainerScale->QueryFloatAttribute("y", &ContainerDesc.vScale.y);
|
||||
ContainerScale->QueryFloatAttribute("z", &ContainerDesc.vScale.z);
|
||||
|
||||
auto* ContainerRotation = Container->FirstChildElement("Rotation");
|
||||
ContainerRotation->QueryFloatAttribute("x", &ContainerDesc.vRotation.x);
|
||||
ContainerRotation->QueryFloatAttribute("y", &ContainerDesc.vRotation.y);
|
||||
ContainerRotation->QueryFloatAttribute("z", &ContainerDesc.vRotation.z);
|
||||
|
||||
auto* BoundingBox_Min = Container->FirstChildElement("BoundingBox_Min");
|
||||
BoundingBox_Min->QueryFloatAttribute("x", &ContainerDesc.vContainerMin.x);
|
||||
BoundingBox_Min->QueryFloatAttribute("y", &ContainerDesc.vContainerMin.y);
|
||||
BoundingBox_Min->QueryFloatAttribute("z", &ContainerDesc.vContainerMin.z);
|
||||
|
||||
auto* BoundingBox_Max = Container->FirstChildElement("BoundingBox_Max");
|
||||
BoundingBox_Max->QueryFloatAttribute("x", &ContainerDesc.vContainerMax.x);
|
||||
BoundingBox_Max->QueryFloatAttribute("y", &ContainerDesc.vContainerMax.y);
|
||||
BoundingBox_Max->QueryFloatAttribute("z", &ContainerDesc.vContainerMax.z);
|
||||
|
||||
m_pGameInstance->Add_GameObject_ToLayer<CBuildingContainer>(
|
||||
g_iStaticLevel, ENUM_CLASS(LEVEL::GAMEPLAY), LAYER_BACKGROUND, &ContainerDesc, nullptr, reinterpret_cast<CBuildingContainer**>(ppContainerObject));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Load_StreetContainer(tinyxml2::XMLElement* Container, CMapContainer** ppContainerObject)
|
||||
{
|
||||
CMapContainer::MAP_CONTAINER_DESC ContainerDesc = {};
|
||||
|
||||
auto* ContainerPosition = Container->FirstChildElement("Position");
|
||||
ContainerPosition->QueryFloatAttribute("x", &ContainerDesc.vPosition.x);
|
||||
ContainerPosition->QueryFloatAttribute("y", &ContainerDesc.vPosition.y);
|
||||
ContainerPosition->QueryFloatAttribute("z", &ContainerDesc.vPosition.z);
|
||||
|
||||
auto* ContainerScale = Container->FirstChildElement("Scale");
|
||||
ContainerScale->QueryFloatAttribute("x", &ContainerDesc.vScale.x);
|
||||
ContainerScale->QueryFloatAttribute("y", &ContainerDesc.vScale.y);
|
||||
ContainerScale->QueryFloatAttribute("z", &ContainerDesc.vScale.z);
|
||||
|
||||
auto* ContainerRotation = Container->FirstChildElement("Rotation");
|
||||
ContainerRotation->QueryFloatAttribute("x", &ContainerDesc.vRotation.x);
|
||||
ContainerRotation->QueryFloatAttribute("y", &ContainerDesc.vRotation.y);
|
||||
ContainerRotation->QueryFloatAttribute("z", &ContainerDesc.vRotation.z);
|
||||
|
||||
m_pGameInstance->Add_GameObject_ToLayer<CStreetContainer>(
|
||||
g_iStaticLevel, ENUM_CLASS(LEVEL::GAMEPLAY), LAYER_BACKGROUND, &ContainerDesc, nullptr, reinterpret_cast<CStreetContainer**>(ppContainerObject));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Load_MapRenderObjects(tinyxml2::XMLElement* Container, CMapContainer* pContainerObject)
|
||||
{
|
||||
#pragma region ADD_PARTOBJECT
|
||||
for (auto* PartObject = Container->FirstChildElement("PartObject"); PartObject; PartObject = PartObject->NextSiblingElement("PartObject"))
|
||||
{
|
||||
_uint iLodLevel = {};
|
||||
_uint iKeyIndex = {};
|
||||
|
||||
PartObject->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
|
||||
PartObject->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
|
||||
|
||||
#pragma region MAPOBJECT_RENDER
|
||||
CMapPartObject::MAPOBJECT_DESC Desc = {};
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
|
||||
Desc.iMaxLodLevel = iLodLevel;
|
||||
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
|
||||
const string strKey = CMyTools::ToString(Desc.ModelPrototypeTags.front()) + to_string(iKeyIndex);
|
||||
|
||||
/* Position */
|
||||
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
/* Scale */
|
||||
tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
/* Rotation */
|
||||
tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
if (FAILED(pContainerObject->Add_Part<CMapObject_Render>(strKey, g_iStaticLevel, nullptr, &Desc)))
|
||||
return E_FAIL;
|
||||
#pragma endregion
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Load_MapCollisionObjects(tinyxml2::XMLElement* Container, CMapContainer* pContainerObject)
|
||||
{
|
||||
#pragma region ADD_COLLISION
|
||||
for (auto* Collision = Container->FirstChildElement("Collision"); Collision; Collision = Collision->NextSiblingElement("Collision"))
|
||||
{
|
||||
_uint iLodLevel = {};
|
||||
_uint iKeyIndex = {};
|
||||
|
||||
Collision->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
|
||||
Collision->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
|
||||
|
||||
#pragma region MAPOBJECT_LOD
|
||||
CMapPartObject::MAPOBJECT_DESC Desc = {};
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = Collision->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(PrototypeTag->GetText()));
|
||||
}
|
||||
Desc.iMaxLodLevel = iLodLevel;
|
||||
Desc.pParentTransform = pContainerObject->Get_Component<CTransform>();
|
||||
|
||||
/* Position */
|
||||
tinyxml2::XMLElement* Position = Collision->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
/* Scale */
|
||||
tinyxml2::XMLElement* Scale = Collision->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
/* Rotation */
|
||||
tinyxml2::XMLElement* Rotation = Collision->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
pContainerObject->Add_Collision<CMapObject_Collision>(g_iStaticLevel, &Desc);
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||
{
|
||||
m_pGameInstance = CGameInstance::GetInstance();
|
||||
|
||||
@@ -63,17 +63,16 @@ HRESULT CMonster::Render_OutLine()
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
GUI::Begin("OutLine");
|
||||
|
||||
GUI::SetNextItemWidth(80.f);
|
||||
static _float3 vOutLineColor = _float3(1.f, 0.960784376f, 0.933333397f);
|
||||
static _float fOutLineThickness = { 1.f }; // 카메라로부터 거리가 멀어지면 늘어나게끔 바꾸는걸 추천함
|
||||
static _float fOutLineThickness = { 2.f }; // 카메라로부터 거리가 멀어지면 늘어나게끔 바꾸는걸 추천함
|
||||
static _float fOutLineScale = { 1.f };
|
||||
static _float fOutLinePower = { 1.f };
|
||||
GUI::ColorPicker3("vOutLineColor", (_float*)&vOutLineColor);
|
||||
GUI::SliderFloat("Thickness", &fOutLineThickness, 0.1f, 2.f, "%.1f");
|
||||
GUI::SliderFloat("Scale", &fOutLineScale, 0.1f, 2.f, "%.1f");
|
||||
GUI::SliderFloat("Power", &fOutLinePower, 0.1f, 2.f, "%.1f");
|
||||
GUI::End();
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -36,8 +36,9 @@ HRESULT CNomalJap::Initialize(void* pArg)
|
||||
|
||||
m_wstrEffectName = L"Nomal_Jap";
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Jap")))
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Jap"))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_pProjectile_Side = Get_PartObject<CEffectParts>("JapProjSide");
|
||||
@@ -54,6 +55,11 @@ HRESULT CNomalJap::Initialize(void* pArg)
|
||||
void CNomalJap::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->RewindMomentum();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CNomalJap::Update(_float fTimeDelta)
|
||||
@@ -70,6 +76,10 @@ void CNomalJap::Update(_float fTimeDelta)
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vOwnerLook * 1.2f);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vOwnerLook * 1.2f);
|
||||
}
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
@@ -78,6 +88,12 @@ void CNomalJap::Update(_float fTimeDelta)
|
||||
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CNomalJap::Late_Update(_float fTimeDelta)
|
||||
@@ -99,8 +115,9 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject)
|
||||
m_pOwner = pObject;
|
||||
|
||||
/* 피직스 생성*/
|
||||
if (FAILED(Ready_Child()))
|
||||
if (FAILED(Ready_Child())){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* 초기 셋팅 초기화 */
|
||||
Reset_EffectParts();
|
||||
@@ -122,12 +139,10 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject)
|
||||
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
|
||||
//나아가는 벡터와 한점을 가져와 수직인 평면상에 하나의 점으로 DIR 을 만듬
|
||||
m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
|
||||
_vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
|
||||
_vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2));
|
||||
|
||||
m_vRotateUp = XMVector3Rotate(vUp, vQuaternion);
|
||||
@@ -156,19 +171,9 @@ HRESULT CNomalJap::Ready_Child()
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir, vOwnerLook * 0.6f);
|
||||
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = vDir;
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_NORMALJAP);
|
||||
Desc.vDeltaPos = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
@@ -176,6 +181,7 @@ HRESULT CNomalJap::Ready_Child()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -226,16 +232,18 @@ void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
}
|
||||
|
||||
void CNomalJap::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
Safe_Release(m_pProjectile);
|
||||
Safe_Release(m_pProjectile_Side);
|
||||
|
||||
@@ -39,10 +39,7 @@ void CPhysXEffectHitBox::Priority_Update(_float fTimeDelta)
|
||||
void CPhysXEffectHitBox::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->AccumulateMomentum(XMLoadFloat3(&m_vDeltaPos));
|
||||
m_vLifeTime.x += fTimeDelta;
|
||||
if (m_vLifeTime.x > m_vLifeTime.y) {
|
||||
m_bDead = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CPhysXEffectHitBox::Late_Update(_float fTimeDelta)
|
||||
@@ -91,6 +88,9 @@ HRESULT CPhysXEffectHitBox::Ready_Components(void* pArg)
|
||||
m_pTransformCom->Rotation(pDesc->vRotRPY.x, pDesc->vRotRPY.y, pDesc->vRotRPY.z);
|
||||
m_vDeltaPos = pDesc->vDeltaPos;
|
||||
m_vLifeTime = pDesc->vLifeTime;
|
||||
|
||||
|
||||
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
@@ -109,6 +109,8 @@ HRESULT CPhysXEffectHitBox::Ready_Components(void* pArg)
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pCharacter_Controller->SetGravity(pDesc->bGravity);
|
||||
}
|
||||
m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
/* Com_Shader */
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "State_Land.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_Broom_Ride.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "Layer.h"
|
||||
@@ -58,6 +59,8 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
Load_KeyFrame();
|
||||
#endif // _DEBUG
|
||||
|
||||
m_pBroomModel = static_cast<CGameObject*>(pArg)->Get_Component<CModel>();
|
||||
m_pBroomTransform = static_cast<CGameObject*>(pArg)->Get_Component<CTransform>();
|
||||
|
||||
Add_FSM();
|
||||
|
||||
@@ -98,7 +101,7 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
void CPlayer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
ReLockOnTarget();
|
||||
|
||||
SetGravity();
|
||||
m_pTransformCom->RewindMomentum();
|
||||
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
@@ -110,7 +113,6 @@ void CPlayer::Update(_float fTimeDelta)
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
|
||||
@@ -127,7 +129,7 @@ void CPlayer::Update(_float fTimeDelta)
|
||||
|
||||
void CPlayer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position());
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
@@ -192,15 +194,16 @@ void CPlayer::Render_CameraCoordinateSystem()
|
||||
GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z);
|
||||
GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z);
|
||||
|
||||
GUI::Button("##0", { 100.f, 100.f }); GUI::SameLine();
|
||||
GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), {100.f, 100.f}); GUI::SameLine();
|
||||
GUI::Button("##2", {100.f, 100.f});
|
||||
GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { 100.f, 100.f }); GUI::SameLine();
|
||||
GUI::Button("##4", { 100.f, 100.f }); GUI::SameLine();
|
||||
GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { 100.f, 100.f });
|
||||
GUI::Button("##6", {100.f, 100.f}); GUI::SameLine();
|
||||
GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { 100.f, 100.f }); GUI::SameLine();
|
||||
GUI::Button("##8", {100.f, 100.f});
|
||||
_float fButtonSize = 25.f;
|
||||
GUI::Button("##0", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##2", { fButtonSize, fButtonSize });
|
||||
GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##4", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize });
|
||||
GUI::Button("##6", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##8", { fButtonSize, fButtonSize });
|
||||
//W CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })
|
||||
//A CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , - m_vCameraRightDir.z })
|
||||
//S CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })
|
||||
@@ -251,12 +254,12 @@ HRESULT CPlayer::Ready_Components()
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(COLLIDABLEOBJECT::PLAYER);
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::PLAYER);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.1f;
|
||||
Desc.fContactOffset = 0.17f;
|
||||
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.bAutoStepping = { true };
|
||||
Desc.fStepOffset = { 0.05f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 1.0f;
|
||||
@@ -266,11 +269,12 @@ HRESULT CPlayer::Ready_Components()
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pCharacter_Controller->SetGravity(false);
|
||||
}
|
||||
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(COLLIDABLEOBJECT::PLAYER);
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::PLAYER);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -298,8 +302,8 @@ HRESULT CPlayer::Ready_Parts()
|
||||
Desc.fMouseSensor = 0.1f;
|
||||
Desc.fShoulderDistance = 2.f;
|
||||
Desc.fBackFrontRatio = 0.9f;
|
||||
Desc.fCameraFocalLength = 10.f;
|
||||
Desc.vInitialLook = { 1.f, 2.f, -1.f };
|
||||
Desc.fCameraFocalLength = 13.4f;
|
||||
Desc.vInitialLook = { 0.77f, 1.35f, -1.f };
|
||||
|
||||
if (FAILED(Add_PartObject<CCamPosition_Shoulder>("Cam_Shoulder_Part", g_iStaticLevel, &m_pCamPosition_ShoulderPart, &Desc))) {
|
||||
return E_FAIL;
|
||||
@@ -335,6 +339,23 @@ void CPlayer::ReLockOnTarget()
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::SetGravity()
|
||||
{
|
||||
PSX::PxControllerCollisionFlags eCollisionFlags = m_pCharacter_Controller->Get_CollisionFlags();
|
||||
eCollisionFlags;
|
||||
if ( false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_DOWN)
|
||||
&& false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_SIDES)) {
|
||||
if (false == m_pFSM->IsEnable(STATEANIM::JUMP)) { // 벽에 닿지 않았는데 점프 중이 아닐 땐 중력 on
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
else { // 점프 중일 땐 off
|
||||
m_pCharacter_Controller->SetGravity(false);
|
||||
}
|
||||
}
|
||||
else { // 벽에 닿는중일 땐 항상 중력 off
|
||||
m_pCharacter_Controller->SetGravity(false);
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Update_CameraCoordinateSystem()
|
||||
{
|
||||
@@ -342,6 +363,27 @@ void CPlayer::Update_CameraCoordinateSystem()
|
||||
_vector xmvUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
XMStoreFloat3(&m_vCameraRightDir, XMVector3Normalize(XMVector3Cross(xmvUp, xmvCameraLook)));
|
||||
XMStoreFloat3(&m_vCameraLookDir, xmvCameraLook);
|
||||
m_pInfoInstance->Update_CameraCoordinateSystem(m_vCameraLookDir, m_vRimLightColor);
|
||||
}
|
||||
|
||||
_matrix CPlayer::Get_WandPos()
|
||||
{
|
||||
CModel* pWand = Get_PartObject<CWand>()->Get_Component<CModel>();
|
||||
|
||||
if (pWand == nullptr)
|
||||
return _matrix();
|
||||
|
||||
_matrix BoneMatrix = XMLoadFloat4x4(pWand->Get_BoneMatrixPtr("root"));
|
||||
|
||||
BoneMatrix = BoneMatrix * m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
_float3 vOffset = _float3(0.f, -0.27f, -0.32f);
|
||||
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[0]) * vOffset.x;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[1]) * vOffset.y;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[2]) * vOffset.z;
|
||||
|
||||
return BoneMatrix;
|
||||
}
|
||||
|
||||
CPlayer* CPlayer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -431,6 +473,8 @@ void CPlayer::Describe_Entity()
|
||||
|
||||
GUI::Checkbox("Render", &m_bVisible);
|
||||
|
||||
GUI::Text("%d", m_iStateMask);
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -11,6 +11,17 @@ void CPlayerInfo::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CPlayerInfo::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight)
|
||||
{
|
||||
m_vCameraLookDir = vLook;
|
||||
m_vCameraRightDir = vRight;
|
||||
}
|
||||
|
||||
pair<_float3, _float3> CPlayerInfo::Get_CameraCoordinateSystem()
|
||||
{
|
||||
return { m_vCameraLookDir, m_vCameraRightDir };
|
||||
}
|
||||
|
||||
void CPlayerInfo::Change_Level()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -18,25 +18,13 @@
|
||||
#include "State_Land.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_Broom_Ride.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "EffectPool.h"
|
||||
|
||||
template<typename T>
|
||||
void CPlayer::Spawn_Effect()
|
||||
{
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<T>(NEXT_LEVEL, NEXT_LEVEL, TEXT("Layer_Effect"), &PartsDesc, this, nullptr))) {
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma region States
|
||||
|
||||
void CPlayer::TestKeyInput(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_F1))
|
||||
@@ -79,6 +67,8 @@ HRESULT CPlayer::InputAction()
|
||||
|| m_pGameInstance->Key_Down(DIK_C)
|
||||
|| m_pGameInstance->Key_Down(DIK_V)
|
||||
|| m_pGameInstance->Key_Down(DIK_Z)
|
||||
|| m_pGameInstance->Key_Down(DIK_G)
|
||||
|| m_pGameInstance->Key_Down(DIK_B)
|
||||
)
|
||||
{
|
||||
return S_OK;
|
||||
@@ -124,10 +114,34 @@ HRESULT CPlayer::InputSpell()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CPlayer::InputAim()
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)||
|
||||
m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_IdleEnter() {
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLE);
|
||||
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
if (SUCCEEDED(InputAim()))
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_AIM];
|
||||
}
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
}
|
||||
|
||||
m_bSprintToggle = false;
|
||||
m_bWalkToggle = false;
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
@@ -163,6 +177,12 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
else if (m_pGameInstance->Key_Down(DIK_V)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_B)) {
|
||||
m_pFSM->Change_State(FSMSTATE::BROOM_RIDE);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -237,11 +257,16 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
if (!SUCCEEDED(InputAim()))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -272,9 +297,6 @@ void CPlayer::Behavior_MoveEnter()
|
||||
if (true == bFoward) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
|
||||
}
|
||||
else if (true == bBackward) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -300,9 +322,6 @@ void CPlayer::Behavior_MoveEnter()
|
||||
if (true == bFoward) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
|
||||
}
|
||||
else if (true == bBackward) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_pFSM->Enable_State(FSMSTATE::JOG);
|
||||
@@ -312,7 +331,7 @@ void CPlayer::Behavior_MoveEnter()
|
||||
}
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, m_fAmount);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, m_fAmount, m_bRatio);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
@@ -347,6 +366,12 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
else if (m_pGameInstance->Key_Down(DIK_Z)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_B)) {
|
||||
m_pFSM->Change_State(FSMSTATE::BROOM_RIDE);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_LSHIFT)) {
|
||||
m_bSprintToggle = !m_bSprintToggle;
|
||||
m_bWalkToggle = false;
|
||||
@@ -381,7 +406,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove())) {
|
||||
@@ -389,7 +414,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
|
||||
_vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f));
|
||||
_vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f));
|
||||
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
xmvInputDir += xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S))
|
||||
@@ -405,7 +430,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
xmvInputDir = XMVector3Normalize(xmvInputDir);
|
||||
|
||||
_float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
|
||||
|
||||
GUI::Text("%.1f, %.1f", vInputDir.x, vInputDir.y);
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
@@ -415,90 +440,94 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
|
||||
_float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x;
|
||||
|
||||
_vector vCameraLook = XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f);
|
||||
|
||||
vCameraLook = XMVector3Normalize(vCameraLook);
|
||||
|
||||
_float2 fCamLook = { XMVectorGetX(vCameraLook), XMVectorGetZ(vCameraLook) };
|
||||
|
||||
_float angle = CMyTools::Get_Direction2D(vCurLook, fCamLook);
|
||||
|
||||
_float degree = XMConvertToDegrees(angle);
|
||||
if (m_pModelCom->Get_AnimIndex() == m_Animation[STATEANIM::JOG_FWD].first)
|
||||
{
|
||||
_float targetAngle = degree;
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
targetAngle = 0.f;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
targetAngle = 90.f;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
targetAngle = -90.f;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S))
|
||||
targetAngle = 180.f;
|
||||
|
||||
_float angleDiff = degree - targetAngle;
|
||||
|
||||
if (angleDiff > 180.f) angleDiff -= 360.f;
|
||||
if (angleDiff < -180.f) angleDiff += 360.f;
|
||||
|
||||
_float threshold = 2.f;
|
||||
|
||||
if (angleDiff > threshold)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
else if (angleDiff < -threshold)
|
||||
{
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
_bool bSkipAngleCheck = { false };
|
||||
if (m_pFSM->IsEnable(FSMSTATE::JOG)) {
|
||||
if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first) {
|
||||
if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK)) {
|
||||
if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first &&
|
||||
iCurrentAnimIndex != m_Animation[STATEANIM::WALK_FWD].first) {
|
||||
bSkipAngleCheck = true;
|
||||
if (m_pModelCom->IsFinishedAnim()||
|
||||
m_pFSM->IsEnable(FSMSTATE::STOP)) {
|
||||
if (m_pModelCom->IsFinishedAnim() || m_pFSM->IsEnable(FSMSTATE::STOP)|| SUCCEEDED(InputAim())) {
|
||||
m_pFSM->Disable_State(FSMSTATE::STOP);
|
||||
bSkipAngleCheck = false;
|
||||
}
|
||||
}
|
||||
if (!bSkipAngleCheck) {
|
||||
_float absDir = fabsf(vDir);
|
||||
if (absDir <= XMConvertToRadians(80.f)) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
m_fAmount = 1.f;
|
||||
m_bRatio = true;
|
||||
if (absDir <= XMConvertToRadians(90.f)) {
|
||||
if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
if (m_pFSM->IsEnable(FSMSTATE::WALK))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_FWD];
|
||||
}
|
||||
}
|
||||
else if (absDir < XMConvertToRadians(160.f)) {
|
||||
if (cross > 0)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_LEFT];
|
||||
m_fAmount = 0.8f;
|
||||
if (SUCCEEDED(InputAim()))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_LEFT];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_LEFT];
|
||||
}
|
||||
|
||||
/*if (m_pFSM->IsEnable(FSMSTATE::WALK))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_LEFT];
|
||||
}*/
|
||||
m_fAmount = 0.5f;
|
||||
m_bRatio = true;
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_RIGHT];
|
||||
m_fAmount = 0.8f;
|
||||
if (SUCCEEDED(InputAim()))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_RIGHT];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_RIGHT];
|
||||
}
|
||||
|
||||
/*if (m_pFSM->IsEnable(FSMSTATE::WALK))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_RIGHT];
|
||||
}*/
|
||||
m_fAmount = 0.5f;
|
||||
m_bRatio = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_BWD];
|
||||
m_fAmount = 0.8f;
|
||||
if (SUCCEEDED(InputAim()))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_BWD];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_BWD];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::WALK))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
|
||||
}
|
||||
m_fAmount = 0.5f;
|
||||
m_bRatio = true;
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,m_fAmount, m_bRatio);
|
||||
m_fAmount = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
Player_InterpTurn(fTimeDelta);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::SPRINT)||
|
||||
!SUCCEEDED(InputMove())) {
|
||||
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::STOP))
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::STOP);
|
||||
@@ -511,12 +540,26 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG)) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
|
||||
if (iCurrentAnimIndex == m_Animation[STATEANIM::JOG_AIM_LEFT].first)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_STOP_L];
|
||||
}
|
||||
else if (iCurrentAnimIndex == m_Animation[STATEANIM::JOG_AIM_RIGHT].first)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_STOP_R];
|
||||
}
|
||||
else if (iCurrentAnimIndex == m_Animation[STATEANIM::JOG_AIM_BWD].first)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_STOP_BWD];
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_STOP];
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
}
|
||||
else if (IsCurrentKeyFrame("TurnStop"))
|
||||
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
m_pFSM->Disable_State(FSMSTATE::STOP);
|
||||
@@ -539,16 +582,16 @@ void CPlayer::Behavior_JumpEnter()
|
||||
m_pFSM->Enable_State(FSMSTATE::JUMP);
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::WALK | FSMSTATE::JOG | FSMSTATE::SPRINT)) {
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP);
|
||||
pairAnimInfo = m_Animation[STATEANIM::JUMP];
|
||||
}
|
||||
else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JUMP_SPRINT];
|
||||
}
|
||||
else if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) {
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP);
|
||||
pairAnimInfo = m_Animation[STATEANIM::JUMP];
|
||||
}
|
||||
else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) {
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::JUMP_JOG);
|
||||
pairAnimInfo = m_Animation[STATEANIM::JUMP_JOG];
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -574,7 +617,7 @@ void CPlayer::Behavior_JumpExit()
|
||||
void CPlayer::Behavior_LandEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::LAND);
|
||||
pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::LAND);
|
||||
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::LAND];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
@@ -601,7 +644,7 @@ void CPlayer::Behavior_DodgeEnter()
|
||||
{
|
||||
// 혹시 @@ to Dodge 있으면 여기에
|
||||
m_pFSM->Enable_State(FSMSTATE::DODGE);
|
||||
pair<_uint, _bool> pairAnimInfo = Get_AnimInfo(STATEANIM::DODGE);
|
||||
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::DODGE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
@@ -612,7 +655,7 @@ HRESULT CPlayer::Behavior_DodgeExitCheck()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Dodge")) {
|
||||
if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -642,10 +685,11 @@ void CPlayer::Behavior_CombatEnter()
|
||||
else if (m_pGameInstance->Mouse_Up(DIM_LBUTTON)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK);
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
|
||||
m_pModelCom->Anim_Event(0.1f, m_Animation[STATEANIM::LIGHT_ATTACK].first, [this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, this);
|
||||
/*m_pModelCom->Anim_Event(0.1f, m_Animation[STATEANIM::LIGHT_ATTACK].first, [this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, this);
|
||||
return E_FAIL;
|
||||
});
|
||||
});*/
|
||||
}
|
||||
else if (SUCCEEDED(InputSpell())) {
|
||||
m_pFSM->Enable_State(FSMSTATE::SPELL);
|
||||
@@ -685,6 +729,10 @@ void CPlayer::Behavior_CombatEnter()
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::POTION);
|
||||
pairAnimInfo = m_Animation[STATEANIM::POTION];
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
@@ -743,6 +791,11 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::POTION);
|
||||
pairAnimInfo = m_Animation[STATEANIM::POTION];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pFSM->IsEnable(FSMSTATE::SPELL) && IsCurrentKeyFrame("Combat"))
|
||||
@@ -754,8 +807,6 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
case STATEANIM::ACCIO:
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::ACCIO];
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case STATEANIM::DESCENDO:
|
||||
@@ -766,11 +817,8 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
|
||||
|
||||
m_pModelCom->Anim_Event(0.f, m_Animation[STATEANIM::ACCIO].first, [this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARD, this);
|
||||
|
||||
@@ -784,11 +832,9 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
m_eSpell = STATEANIM::END;
|
||||
return E_FAIL;
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (m_pFSM->IsEnable(FSMSTATE::ANCIENT_THROW))
|
||||
{
|
||||
if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) {
|
||||
@@ -815,7 +861,149 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
|
||||
void CPlayer::Behavior_CombatExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::LIGHT_ATTACK | FSMSTATE::SPELL | FSMSTATE::SKILL | FSMSTATE::SKILL2 | FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW);
|
||||
m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::LIGHT_ATTACK | FSMSTATE::SPELL | FSMSTATE::SKILL |
|
||||
FSMSTATE::SKILL2 | FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW | FSMSTATE::POTION);
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_HitEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::HIT);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
std::random_device rd;
|
||||
std::mt19937 mt(rd());
|
||||
std::uniform_int_distribution<int> Index(0, 1);
|
||||
auto RandIndex = Index(mt);
|
||||
if (RandIndex == 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_R];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_L];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_HitExitCheck()
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_HitExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::HIT);
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_Broom_RideEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::BROOM_RIDE);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_Broom_RideExitCheck()
|
||||
{
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT].first)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_END];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
/*if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}*/
|
||||
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
else
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_N)) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_Broom_RideExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE);
|
||||
}
|
||||
|
||||
void CPlayer::Player_InterpTurn(_float fTimeDelta)
|
||||
{
|
||||
_uint iCurrIndex = m_pModelCom->Get_AnimIndex();
|
||||
if (iCurrIndex != m_Animation[STATEANIM::JOG_FWD].first&&
|
||||
iCurrIndex != m_Animation[STATEANIM::WALK_FWD].first&&
|
||||
iCurrIndex != m_Animation[STATEANIM::SPRINT].first)
|
||||
return;
|
||||
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
|
||||
_vector vCameraLook = XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f);
|
||||
|
||||
_vector vCameraRight = XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f);
|
||||
|
||||
_float2 fCamLook = { XMVectorGetX(vCameraLook), XMVectorGetZ(vCameraLook) };
|
||||
|
||||
vCameraRight = XMVector3Normalize(vCameraRight);
|
||||
|
||||
_float angle = CMyTools::Get_Direction2D(vCurLook, fCamLook);
|
||||
|
||||
_float degree = XMConvertToDegrees(angle);
|
||||
|
||||
_vector xmvInput = XMVectorZero();
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
xmvInput += vCameraLook;
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S))
|
||||
xmvInput -= vCameraLook;
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
xmvInput -= vCameraRight;
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
xmvInput += vCameraRight;
|
||||
|
||||
xmvInput = XMVector3Normalize(xmvInput);
|
||||
|
||||
_float2 fInput2D = { XMVectorGetX(xmvInput), XMVectorGetZ(xmvInput) };
|
||||
|
||||
_float targetAngle = XMConvertToDegrees(CMyTools::Get_Direction2D(fCamLook, fInput2D));
|
||||
|
||||
_float angleDiff = degree - targetAngle;
|
||||
|
||||
if (angleDiff > 180.f) angleDiff -= 360.f;
|
||||
if (angleDiff < -180.f) angleDiff += 360.f;
|
||||
|
||||
_float Offset = 2.f;
|
||||
|
||||
if (angleDiff > Offset)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
else if (angleDiff < -Offset)
|
||||
{
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Add_FSM()
|
||||
@@ -827,7 +1015,15 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
{
|
||||
if (SUCCEEDED(InputAim()))
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.05f);
|
||||
}
|
||||
}
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
|
||||
}
|
||||
@@ -838,37 +1034,13 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
_vector xmvRight = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::RIGHT), 0.f));
|
||||
_vector xmvPlayerDir = { };
|
||||
|
||||
{
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::STOP))
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.05f);
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.y * 0.05f);
|
||||
}
|
||||
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A)) {
|
||||
xmvPlayerDir -= xmvRight;
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D)) {
|
||||
xmvPlayerDir += xmvRight;
|
||||
}
|
||||
}
|
||||
|
||||
xmvPlayerDir = XMVectorSetW(XMVector3Normalize(xmvPlayerDir), 0.f);
|
||||
_float2 vPlayerDir = { XMVectorGetX(xmvPlayerDir), XMVectorGetZ(xmvPlayerDir) };
|
||||
_float2 vCameraLookDir = { m_vCameraLookDir.x, m_vCameraLookDir.z };
|
||||
|
||||
_float vDir = CMyTools::Get_Direction2D(vCameraLookDir, vPlayerDir);
|
||||
_float absDir = fabsf(vDir);
|
||||
/*if (m_pGameInstance->Key_Pressing(DIK_A)&& vDir < XMConvertToRadians(140.f) ) {
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D)&& vDir > XMConvertToRadians(-140.f) ) {
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); };*/
|
||||
|
||||
};
|
||||
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
@@ -922,24 +1094,68 @@ void CPlayer::Add_FSM()
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Behavior_Broom_Ride
|
||||
{
|
||||
CState_Broom_Ride::STATE_BROOM_RIDE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_Broom_RideEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_RideExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_Broom_RideExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pBroomTransform->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.03f);
|
||||
}
|
||||
_matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
|
||||
_matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
|
||||
|
||||
XMVECTOR Scale, Rot, Trans;
|
||||
XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal);
|
||||
|
||||
_matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
|
||||
static _float3 OffsetPos = { 0.f, 0.f, 0.f };
|
||||
GUI::DragFloat3("BroomOffset", (_float*)&OffsetPos, 0.01f);
|
||||
_matrix Offset = XMMatrixTranslation(OffsetPos.x,
|
||||
OffsetPos.y, OffsetPos.z);
|
||||
|
||||
_matrix SocketWorld = BoneNoScale * Offset* BroomWorld;
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(SocketWorld);
|
||||
m_pCharacter_Controller->Set_Position(SocketWorld.r[3]);
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc));
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
|
||||
void CPlayer::Set_Anim()
|
||||
{
|
||||
m_Animation[STATEANIM::IDLE] = { 266,true };
|
||||
m_Animation[STATEANIM::IDLE_AIM] = { 5,true };
|
||||
m_Animation[STATEANIM::IDLE_TURN_L] = { 270,false };
|
||||
m_Animation[STATEANIM::IDLE_TURN_R] = { 430,false };
|
||||
m_Animation[STATEANIM::IDLE_TURN_BWD] = { 268,false };
|
||||
|
||||
m_Animation[STATEANIM::WALK_FWD] = { 625,true };
|
||||
m_Animation[STATEANIM::WALK_BWD] = { 166,true };
|
||||
m_Animation[STATEANIM::WALK_LEFT] = { 337,false };
|
||||
m_Animation[STATEANIM::WALK_RIGHT] = { 504,false };
|
||||
m_Animation[STATEANIM::WALK_BWD] = { 352,false };
|
||||
|
||||
m_Animation[STATEANIM::WALK_STOP] = { 344,false };
|
||||
|
||||
m_Animation[STATEANIM::JOG_FWD] = { 167,true };
|
||||
m_Animation[STATEANIM::JOG_LEFT] = { 164,false };
|
||||
m_Animation[STATEANIM::JOG_RIGHT] = { 185,false };
|
||||
m_Animation[STATEANIM::JOG_BWD] = { 154,false };//176
|
||||
m_Animation[STATEANIM::JOG_STOP] = { 289,false };
|
||||
m_Animation[STATEANIM::JOG_LEFT] = { 164,false }; // Turn
|
||||
m_Animation[STATEANIM::JOG_RIGHT] = { 185,false };// Turn
|
||||
m_Animation[STATEANIM::JOG_BWD] = { 154,false }; // Turn
|
||||
m_Animation[STATEANIM::JOG_STOP] = { 289,false };
|
||||
|
||||
m_Animation[STATEANIM::JOG_AIM_LEFT] = { 171,true };
|
||||
m_Animation[STATEANIM::JOG_AIM_RIGHT] = { 175,true };
|
||||
m_Animation[STATEANIM::JOG_AIM_BWD] = { 166,true };
|
||||
|
||||
m_Animation[STATEANIM::JUMP] = { 205,false };
|
||||
m_Animation[STATEANIM::JUMP_JOG] = { 203,false };
|
||||
@@ -949,22 +1165,40 @@ void CPlayer::Set_Anim()
|
||||
|
||||
m_Animation[STATEANIM::LAND] = { 259,false };
|
||||
|
||||
m_Animation[STATEANIM::DODGE] = { 802,false };
|
||||
m_Animation[STATEANIM::DODGE_BLINK] = { 799,true };
|
||||
m_Animation[STATEANIM::DODGE] = { 878,false };
|
||||
m_Animation[STATEANIM::DODGE_BLINK] = { 876,true };
|
||||
|
||||
m_Animation[STATEANIM::SKILL] = { 593,false };
|
||||
m_Animation[STATEANIM::SKILL2] = { 915,false };
|
||||
m_Animation[STATEANIM::SKILL2] = { 991,false };
|
||||
m_Animation[STATEANIM::LIGHT_ATTACK] = { 413,false };
|
||||
m_Animation[STATEANIM::SPELL] = { 696,false };
|
||||
m_Animation[STATEANIM::SPELL] = { 772,false };
|
||||
m_Animation[STATEANIM::MAPHELP] = { 122,false };
|
||||
m_Animation[STATEANIM::POTION] = { 114,false };
|
||||
m_Animation[STATEANIM::ACCIO] = { 417,false };
|
||||
m_Animation[STATEANIM::DESCENDO] = { 418,false };
|
||||
m_Animation[STATEANIM::DEPULSO] = { 782,false };
|
||||
m_Animation[STATEANIM::DIFFINDO] = { 786,false };
|
||||
m_Animation[STATEANIM::LUMOS] = { 782,false };
|
||||
m_Animation[STATEANIM::DESCENDO] = { 857,false };
|
||||
m_Animation[STATEANIM::DEPULSO] = { 858,false };
|
||||
m_Animation[STATEANIM::DIFFINDO] = { 862,false };
|
||||
m_Animation[STATEANIM::LUMOS] = { 851,false };
|
||||
m_Animation[STATEANIM::DISILLUSION_ENTER] = { 585,false };
|
||||
m_Animation[STATEANIM::DISILLUSION_EXIT] = { 586,false };
|
||||
m_Animation[STATEANIM::ANCIENT_THROW] = { 843,false };
|
||||
m_Animation[STATEANIM::ANCIENT_THROW] = { 919,false };
|
||||
|
||||
|
||||
m_Animation[STATEANIM::HIT_L] = { 1124,false };
|
||||
m_Animation[STATEANIM::HIT_R] = { 1125,false };
|
||||
|
||||
m_Animation[STATEANIM::BROOM_IDLE] = { 679,true };
|
||||
m_Animation[STATEANIM::BROOM_FWD] = { 680,true };
|
||||
|
||||
m_Animation[STATEANIM::BROOM_MOUNT] = { 734,false };
|
||||
m_Animation[STATEANIM::BROOM_MOUNT_END] = { 737,false };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_START] = { 699,false };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_IDLE] = { 703,true };
|
||||
|
||||
|
||||
m_Animation[STATEANIM::JOG_AIM_STOP_L] = { 295,false };
|
||||
m_Animation[STATEANIM::JOG_AIM_STOP_R] = { 456,false };
|
||||
m_Animation[STATEANIM::JOG_AIM_STOP_BWD] = { 444,false };
|
||||
}
|
||||
#pragma endregion State
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "PhysXEffectHitBox.h"
|
||||
|
||||
|
||||
CProtego::CProtego(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -46,6 +45,18 @@ HRESULT CProtego::Initialize(void* pArg)
|
||||
m_wstrEffectName = L"Protego";
|
||||
|
||||
|
||||
m_Events.emplace(1.3f, [&]() {
|
||||
|
||||
m_pSphere->Set_Dissolve(true);
|
||||
m_pBottom->Set_Dissolve(true);
|
||||
m_pCircle->Set_Dissolve(true);
|
||||
|
||||
});
|
||||
|
||||
|
||||
m_fAmountSize = 0.1f;
|
||||
m_fSpeed = 5.f;
|
||||
|
||||
m_fDuration = 2.5f;
|
||||
|
||||
return S_OK;
|
||||
@@ -64,11 +75,25 @@ void CProtego::Update(_float fTimeDelta)
|
||||
|
||||
m_pSphere->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pBottom->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pCircle-> Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pCircle->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
/* 시작 사이즈 러프 */
|
||||
if (m_fSizeAccTime > XM_PIDIV2)
|
||||
return;
|
||||
|
||||
m_fSizeAccTime += fTimeDelta * m_fSpeed;
|
||||
|
||||
_float fSize = 1 + sinf(m_fSizeAccTime) * m_fAmountSize;
|
||||
_float3 vSize = _float3(fSize, fSize, fSize);
|
||||
|
||||
m_pSphere->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
m_pCircle->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
}
|
||||
|
||||
void CProtego::Late_Update(_float fTimeDelta)
|
||||
@@ -94,10 +119,26 @@ HRESULT CProtego::Pre_Setting(CGameObject* pObject)
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
m_pSphere->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pBottom->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pCircle->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
m_pSphere->Set_Visible(true);
|
||||
m_pCircle->Set_Visible(true);
|
||||
m_pBottom->Set_Visible(true);
|
||||
|
||||
|
||||
_float3 vSize = _float3(1.f, 1.f, 1.f);
|
||||
m_pSphere->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
m_pCircle->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
|
||||
m_fSizeAccTime = 0.f;
|
||||
|
||||
m_pSphere->Set_Dissolve(false);
|
||||
m_pBottom->Set_Dissolve(false);
|
||||
m_pCircle->Set_Dissolve(false);
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
@@ -155,10 +196,6 @@ void CProtego::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pSphere);
|
||||
SAFE_RELEASE(m_pBottom);
|
||||
SAFE_RELEASE(m_pCircle);
|
||||
@@ -168,7 +205,12 @@ void CProtego::Free()
|
||||
|
||||
void CProtego::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("PROTEGO");
|
||||
|
||||
GUI::DragFloat("fAmountSize", &m_fAmountSize);
|
||||
GUI::DragFloat("fSpeed", &m_fSpeed);
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Broom_Ride.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Broom_Ride::CState_Broom_Ride()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Broom_Ride::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Broom_Ride::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Broom_Ride::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Broom_Ride::Initialize(STATE_BROOM_RIDE_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Broom_Ride* CState_Broom_Ride::Create(STATE_BROOM_RIDE_DESC* pDesc)
|
||||
{
|
||||
CState_Broom_Ride* pInstance = new CState_Broom_Ride;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Broom_Ride::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Broom_Ride::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
#include "pch.h"
|
||||
#include "StreetContainer.h"
|
||||
#include "PartObject.h"
|
||||
|
||||
CStreetContainer::CStreetContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CMapContainer(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CStreetContainer::CStreetContainer(const CStreetContainer& rhs)
|
||||
:CMapContainer(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CStreetContainer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
pCollisiton->Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CStreetContainer::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
pCollisiton->Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CStreetContainer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
pCollisiton->Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CStreetContainer::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CStreetContainer::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CStreetContainer::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
MAP_CONTAINER_DESC* pDesc = static_cast<MAP_CONTAINER_DESC*>(pArg);
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(pDesc->vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CStreetContainer::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CStreetContainer::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CStreetContainer* CStreetContainer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CStreetContainer* pInstance = new CStreetContainer(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CStreetContainer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CStreetContainer::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CStreetContainer* pInstance = new CStreetContainer(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CStreetContainer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CStreetContainer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& pCollision : m_ColiisonPartObjects)
|
||||
SAFE_RELEASE(pCollision);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CStreetContainer::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -35,6 +35,15 @@ HRESULT CTerrain::Initialize(void* pArg)
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
|
||||
|
||||
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{};
|
||||
Desc.pMeshName = TEXT("Hogsmeade_HeightMap");
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
/* Com_RigidBody */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"),
|
||||
reinterpret_cast<CComponent**>(&m_pRigidBody), &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -65,10 +74,31 @@ HRESULT CTerrain::Render()
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
static _int iValue1 = 16;
|
||||
static _int iValue2 = 16;
|
||||
static _int iValue3 = 16;
|
||||
GUI::SliderInt("DSN1", (_int*)&iValue1, 1, 1024);
|
||||
GUI::SliderInt("DSN2", (_int*)&iValue2, 1, 1024);
|
||||
GUI::SliderInt("DSN3", (_int*)&iValue3, 1, 1024);
|
||||
m_vDRN.x = 1.f / (_float)iValue1;
|
||||
m_vDRN.y = 1.f / (_float)iValue2;
|
||||
m_vDRN.z = 1.f / (_float)iValue3;
|
||||
#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDiffuseMultiplier", &m_vDRN.x, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fSurfaceMultiplier", &m_vDRN.y, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNormalMultiplier", &m_vDRN.z, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (m_bWasWireFrame)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::TERRAIN)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::ENV_TERRAIN_ANISO)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -78,14 +108,11 @@ HRESULT CTerrain::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::DEFAULT)))) {
|
||||
#endif // _DEBUG
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NORTEX::ENV_TERRAIN_ANISO)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
@@ -106,8 +133,10 @@ HRESULT CTerrain::Ready_Components(void* pArg)
|
||||
|
||||
/* Com_VIBuffer */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"),
|
||||
reinterpret_cast<CComponent**>(&m_pVIBufferCom))))
|
||||
reinterpret_cast<CComponent**>(&m_pVIBufferCom)))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NORTEX,
|
||||
@@ -205,6 +234,7 @@ void CTerrain::Free()
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pDiffuseTextureCom);
|
||||
SAFE_RELEASE(m_pNormalTextureCom);
|
||||
SAFE_RELEASE(m_pMROTextureCom);
|
||||
|
||||
@@ -51,6 +51,18 @@ void CTrailObject::Update(_float fTimeDelta)
|
||||
{
|
||||
m_TrailInfo.vDistortionTime.x = 0.f;
|
||||
}
|
||||
|
||||
/* 블룸 타임*/
|
||||
|
||||
if (m_TrailInfo.vBloomTime.y != 0)
|
||||
{
|
||||
m_TrailInfo.vBloomTime.x += fTimeDelta;
|
||||
|
||||
if (m_TrailInfo.vBloomTime.x > m_TrailInfo.vBloomTime.y)
|
||||
{
|
||||
m_TrailInfo.vBloomTime.x = 0.f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CTrailObject::Late_Update(_float fTimeDelta)
|
||||
@@ -59,6 +71,11 @@ void CTrailObject::Late_Update(_float fTimeDelta)
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
if (m_TrailInfo.isBloom == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this);
|
||||
}
|
||||
|
||||
if (m_TrailInfo.isBlur == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this);
|
||||
@@ -310,6 +327,44 @@ void CTrailObject::Describe_Entity()
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CTrailObject::Render_Bloom()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBloomStrength", &m_TrailInfo.fBloomStrength, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBloomType", &m_TrailInfo.eBloomType, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomDissolve", &m_TrailInfo.isBloomDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomReverseDissolve", &m_TrailInfo.isBloomReverseDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vBloomTime", &m_TrailInfo.vBloomTime, sizeof(_float2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL_BLOOM))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pTrailCom->Render()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CTrailObject::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
@@ -32,31 +32,6 @@ HRESULT CWand::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTrailObject>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this , &m_pTrail))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pTrail->Load_Trail("../Bin/Resources/Data/Effect/Trail/Bombard_Trail" , static_cast<LEVEL>(NEXT_LEVEL))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectParts>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this, &m_pEffectParts))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
SAFE_ADDREF(m_pTrail);
|
||||
SAFE_ADDREF(m_pEffectParts);
|
||||
|
||||
m_pEffectParts->Load("../Bin/Resources/Data/Effect/Lumos/Lumos", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
|
||||
m_pEffectParts->Set_Visible(true);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -81,22 +56,6 @@ void CWand::Priority_Update(_float fTimeDelta)
|
||||
void CWand::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
//m_pTrail->Trail_Update(CombinedMat, fTimeDelta);
|
||||
|
||||
|
||||
m_pModelCom->Combined_BoneMatrix();
|
||||
|
||||
_matrix BoneMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Effect"));
|
||||
|
||||
BoneMatrix = BoneMatrix * m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[0]) * m_vOffset.x;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[1]) * m_vOffset.y;
|
||||
BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[2]) * m_vOffset.z;
|
||||
|
||||
m_pEffectParts->Get_Component<CTransform>()->Set_WorldMatrix(BoneMatrix);
|
||||
|
||||
}
|
||||
|
||||
void CWand::Late_Update(_float fTimeDelta)
|
||||
@@ -205,22 +164,12 @@ void CWand::Free()
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
SAFE_RELEASE(m_pEffectParts);
|
||||
SAFE_RELEASE(m_pTrail);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CWand::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("VALUE");
|
||||
|
||||
_float4 vValue = {};
|
||||
|
||||
if (GUI::InputFloat3("OFFSET", (_float*)&m_vOffset))
|
||||
{
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -32,7 +32,6 @@ class CBombard final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
class CPartObject* m_pLight_Projectile = {};
|
||||
public:
|
||||
static CBombard* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
#include "Unit.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom final : public CGameObject
|
||||
class CBroom final : public CUnit
|
||||
{
|
||||
private:
|
||||
CBroom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -21,14 +21,8 @@ class CBroom final : public CGameObject
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
|
||||
_bool m_bRimLight = { true };
|
||||
_float m_fRimLightPower = { 3.2f };
|
||||
_float m_fRimLightStrength = { 3.04f };
|
||||
_float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f };
|
||||
|
||||
_bool m_bSprintToggle = { false };
|
||||
_bool m_bWalkToggle = { false };
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
@@ -41,6 +35,31 @@ class CBroom final : public CGameObject
|
||||
virtual void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
#pragma region STATE
|
||||
virtual void Add_FSM();
|
||||
virtual void Set_Anim();
|
||||
|
||||
_float m_fAmount = { 1.f };
|
||||
_float m_fInputTime = {};
|
||||
_bool m_bRatio = { false };
|
||||
|
||||
HRESULT InputAction();
|
||||
HRESULT InputMove();
|
||||
HRESULT InputKeyUpMove();
|
||||
HRESULT InputSpell();
|
||||
HRESULT InputAim();
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck(_float fTimeDelta);
|
||||
void Behavior_IdleExit();
|
||||
|
||||
void Behavior_MoveEnter();
|
||||
HRESULT Behavior_MoveExitCheck(_float fTimeDelta);
|
||||
void Behavior_MoveExit();
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -3,10 +3,23 @@
|
||||
#include "Client_Define.h"
|
||||
#include "MapContainer.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CShader;
|
||||
class CVIBuffer_Box;
|
||||
class COcclusionQuery;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBuildingContainer final : public CMapContainer
|
||||
class CBuildingContainer final : public CMapContainer // OCCLUSION CONTAINER
|
||||
{
|
||||
public:
|
||||
typedef struct tagMapContainerDesc : public CMapContainer::MAP_CONTAINER_DESC
|
||||
{
|
||||
_float3 vContainerMin;
|
||||
_float3 vContainerMax;
|
||||
}MAP_CONTAINER_DESC;
|
||||
|
||||
private:
|
||||
CBuildingContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBuildingContainer(const CBuildingContainer& rhs);
|
||||
@@ -17,25 +30,14 @@ class CBuildingContainer final : public CMapContainer
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_BoundingBox() override;
|
||||
|
||||
public:
|
||||
template<typename T>
|
||||
HRESULT Add_Part(const _string& strPartKey, _uint iPrototypeLevelIndex, T** ppOut, void* pArg = nullptr) {
|
||||
return Add_PartObject<T>(strPartKey, iPrototypeLevelIndex, ppOut, pArg);
|
||||
}
|
||||
template<typename T>
|
||||
HRESULT Add_Collision(_uint iPrototypeLevelIndex, void* pArg = nullptr)
|
||||
{
|
||||
T* pPartObject = m_pGameInstance->Clone_Prototype<T>(iPrototypeLevelIndex, pArg, this);
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Box* m_pVIBufferCom = { nullptr };
|
||||
COcclusionQuery* m_pOcclusionQueryCom = { nullptr };
|
||||
|
||||
if (nullptr == pPartObject) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_ColiisonPartObjects.push_back(pPartObject);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
_float3 m_vExtentWorldPosition = {};
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
|
||||
@@ -49,6 +49,8 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
_bool m_bLerp = { false };
|
||||
_float2 m_vLerpTimer = { 0.f, 1.f };
|
||||
|
||||
_bool m_bZoomIn = { false };
|
||||
|
||||
|
||||
CCamPosition_Target* m_pTarget_LookPart = { nullptr };
|
||||
CCamPosition_Target* m_pTarget_FollowPart = { nullptr };
|
||||
|
||||
@@ -3,20 +3,129 @@
|
||||
namespace Client
|
||||
{
|
||||
enum class LEVEL { STATIC, LOADING, LOGO, INTRO, GAMEPLAY, FIELD, RESTART, END };
|
||||
enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END };
|
||||
enum class MAPOBJECT_TYPE { CONTAINER, ELEMENT_STATIC, ELEMENT_INTERACT };
|
||||
enum class MAPOBJECT_RENDER_TYPE { NORMAL, DECAL, GLASS };
|
||||
|
||||
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ, END };
|
||||
enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END };
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, END };
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END };
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, ALPHA_BLEND, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR, TRAIL_BLOOM, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, ALPHA_BLEND, BLOOM, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, SPELLTYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END };
|
||||
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
enum class SKILL_TYPE { JAP, BOMBARD, DESCENDO, PROTEGO, END };
|
||||
enum class SKILL_TYPE { JAP, BOMBARD, DESCENDO, PROTEGO, END };
|
||||
enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END };
|
||||
}
|
||||
|
||||
|
||||
namespace Client {
|
||||
enum class COLLIDABLEOBJECT_KIND {
|
||||
NOT_DEFINE,
|
||||
PLAYER,
|
||||
MONSTER,
|
||||
HOSTILE_HITBOX,
|
||||
ALLY_HITBOX,
|
||||
NEUTRAL_HITBOX,
|
||||
ENVIRONMENT,
|
||||
NPC,
|
||||
ITEM,
|
||||
TRIGGERBOX,
|
||||
REGION,
|
||||
NOCOLLIDE,
|
||||
END,
|
||||
};
|
||||
enum class PXOBJECT : _uint {
|
||||
#pragma region NOT_DEFINE
|
||||
NOT_DEFINE = 000,
|
||||
#pragma endregion
|
||||
#pragma region PLAYER
|
||||
PLAYER = 010,
|
||||
#pragma endregion
|
||||
#pragma region MONSTER
|
||||
MONSTER = 030,
|
||||
GOBLIN_WARRIOR, // 031
|
||||
GOBLIN_MAGICIAN,
|
||||
GOBLIN_THEIF,
|
||||
TROLL,
|
||||
PENSIVE_GUARDIAN,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region HOSTILE_HITBOX
|
||||
HOSTILE_HITBOX = 100,
|
||||
GOBLIN_SMASH,
|
||||
GOBLIN_DAGGER,
|
||||
GOBLIN_SHIELD_BREAK_MELEE,
|
||||
GOBLIN_SHIELD_BREAK_MAGIC,
|
||||
GOBLIN_NORMAL_MAGIC,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region ALLY_HITBOX
|
||||
ALLY_HITBOX = 200,
|
||||
SKILL_REVAILIO,
|
||||
SKILL_ACCIO,
|
||||
SKILL_DEPULSO,
|
||||
SKILL_DEPULSO_OBSTACLE,
|
||||
SKILL_DEPULSO_OBSTACLE_FLAMED,
|
||||
SKILL_NORMALJAP,
|
||||
SKILL_NORMALJAP_FINAL,
|
||||
SKILL_BOMBARD_STRIKE,
|
||||
SKILL_BOMBARD_FLAME,
|
||||
SKILL_INCENDIO_STRIKE,
|
||||
SKILL_INCENDIO_SPREAD,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region NEUTRAL_HITBOX
|
||||
NEUTRAL_HITBOX = 300,
|
||||
FLAMED_FLOOR,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region ENVIRIONMENT
|
||||
ENVIRIONMENT = 400,
|
||||
TERRAIN,
|
||||
WATER,
|
||||
WALL,
|
||||
WALL_BREAKABLE,
|
||||
WALL_CLIMBABLE,
|
||||
DOOR,
|
||||
BUILDING,
|
||||
BOX,
|
||||
#pragma endregion
|
||||
#pragma region NPC
|
||||
NPC = 500,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region ITEM
|
||||
ITEM = 600,
|
||||
DROPITEM = 630,
|
||||
TRAP = 660,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region TRIGGERBOX
|
||||
TRIGGERBOX = 700,
|
||||
|
||||
|
||||
CINEMATIC = 770,
|
||||
CINEMATIC_INTRO,
|
||||
CINEMATIC_HOGSMEADE_ENTER,
|
||||
CINEMATIC_TROLL_ENCOUNTER,
|
||||
CINEMATIC_TROLL_DEAD,
|
||||
#pragma endregion
|
||||
#pragma region REGION
|
||||
REGION = 800,
|
||||
HOGWARTS,
|
||||
HOGSMEADE,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region NOCOLLIDE
|
||||
NOCOLLIDE = 900,
|
||||
GAIL,
|
||||
|
||||
#pragma endregion
|
||||
END = 999
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Client {
|
||||
#define FX_INSTANCE_PROP_MODEL TEXT("FX_INSTANCE_PROP_MODEL")
|
||||
#define FX_UIEDITOR TEXT("FX_UIEDITOR")
|
||||
#define FX_UIINSTANCE TEXT("FX_UIINSTANCE")
|
||||
#define FX_VTXPOS TEXT("FX_VTXPOS")
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_PROTOTYPE
|
||||
|
||||
@@ -32,7 +32,6 @@ class CDecendo final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
class CPartObject* m_pProjectile = {};
|
||||
class CPartObject* m_pProjectile_Blur = {};
|
||||
|
||||
@@ -93,6 +93,17 @@ class CEffectObject abstract : public CPartObject
|
||||
|
||||
_float fBluringStrength = { 0.01f };
|
||||
|
||||
|
||||
|
||||
_bool isBloom = {};
|
||||
|
||||
_bool isBloomDissolve = {};
|
||||
_bool isBloomReverseDissolve = {};
|
||||
|
||||
_float fBloomStrength = {};
|
||||
|
||||
BLOOM_TYPE eBloomType = {};
|
||||
|
||||
}EFFECT_INFO;
|
||||
|
||||
|
||||
@@ -107,9 +118,14 @@ class CEffectObject abstract : public CPartObject
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Blur() override;
|
||||
virtual HRESULT Render_Bloom() override;
|
||||
public:
|
||||
HRESULT Load(const _char* pFilePath, LEVEL eLevel);
|
||||
|
||||
void Set_Dissolve(_bool isDissolve)
|
||||
{
|
||||
m_EffectInfo.isDissolve = isDissolve;
|
||||
}
|
||||
protected:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
|
||||
@@ -34,6 +34,9 @@ class CEffect_Container abstract : public CContainerObject
|
||||
|
||||
void Update_Event(_float fTimeDelta);
|
||||
HRESULT Reset_EffectParts();
|
||||
protected:
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
protected:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
|
||||
@@ -25,6 +25,10 @@ class CInfoInstance final : public CBase
|
||||
void Update(_float fTimeDelta);
|
||||
void Change_Level();
|
||||
|
||||
#pragma region PLAYER_INFO
|
||||
void Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight);
|
||||
pair<_float3, _float3> Get_CameraCoordinateSystem();
|
||||
#pragma endregion
|
||||
#pragma region MONSTER_INFO
|
||||
HRESULT Regist_PlayerAlly(CUnit* pUnit);
|
||||
HRESULT Deregist_PlayerAlly(CUnit* pUnit);
|
||||
|
||||
@@ -18,6 +18,7 @@ class CLevel_GamePlay final : public CLevel
|
||||
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
class CBroom* m_pBroom = { nullptr };
|
||||
private:
|
||||
virtual HRESULT Initialize() override;
|
||||
HRESULT Initialize(void* pArg);
|
||||
|
||||
@@ -26,6 +26,25 @@ class CMapContainer abstract : public CContainerObject
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
public:
|
||||
template<typename T>
|
||||
HRESULT Add_Part(const _string& strPartKey, _uint iPrototypeLevelIndex, T** ppOut, void* pArg = nullptr) {
|
||||
return Add_PartObject<T>(strPartKey, iPrototypeLevelIndex, ppOut, pArg);
|
||||
}
|
||||
template<typename T>
|
||||
HRESULT Add_Collision(_uint iPrototypeLevelIndex, void* pArg = nullptr)
|
||||
{
|
||||
T* pPartObject = m_pGameInstance->Clone_Prototype<T>(iPrototypeLevelIndex, pArg, this);
|
||||
|
||||
if (nullptr == pPartObject) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_ColiisonPartObjects.push_back(pPartObject);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
@@ -18,7 +18,10 @@ class CMapInfo final : public CBase
|
||||
void Update(_float fTimeDelta);
|
||||
void Change_Level();
|
||||
HRESULT Load_MapObjects(const _char* pFilePath);
|
||||
|
||||
HRESULT Load_BuildingContainer(tinyxml2::XMLElement* Container, class CMapContainer** ppContainerObject);
|
||||
HRESULT Load_StreetContainer(tinyxml2::XMLElement* Container, class CMapContainer** ppContainerObject);
|
||||
HRESULT Load_MapRenderObjects(tinyxml2::XMLElement* Container, class CMapContainer* pContainerObject);
|
||||
HRESULT Load_MapCollisionObjects(tinyxml2::XMLElement* Container, class CMapContainer* pContainerObject);
|
||||
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
|
||||
@@ -33,7 +33,6 @@ class CNomalJap final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
class CPartObject* m_pProjectile = {};
|
||||
class CPartObject* m_pProjectile_Side = {};
|
||||
|
||||
@@ -23,6 +23,7 @@ class CPhysXEffectHitBox final : public CGameObject
|
||||
_uint iSubKind = {};
|
||||
_float3 vDeltaPos = {};
|
||||
_float2 vLifeTime = {};
|
||||
_bool bGravity = {};
|
||||
}PHYSXDUMMY_DESC;
|
||||
private:
|
||||
CPhysXEffectHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -20,8 +20,8 @@ class CPlayer final : public CUnit
|
||||
#ifdef _DEBUG
|
||||
void Render_CameraCoordinateSystem();
|
||||
#endif // _DEBUG
|
||||
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
|
||||
|
||||
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
|
||||
_matrix Get_WandPos();
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
class CMonster* m_pLockOnMonster = { nullptr };
|
||||
@@ -42,6 +42,9 @@ class CPlayer final : public CUnit
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
class CCallBack_Playable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
class CCallBack_Playable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
|
||||
class CModel* m_pBroomModel = { nullptr };
|
||||
class CTransform* m_pBroomTransform = { nullptr };
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
@@ -49,6 +52,7 @@ class CPlayer final : public CUnit
|
||||
HRESULT Ready_Parts();
|
||||
HRESULT Bind_ShaderResources();
|
||||
void ReLockOnTarget();
|
||||
void SetGravity();
|
||||
|
||||
void Update_CameraCoordinateSystem();
|
||||
#ifdef _DEBUG
|
||||
@@ -71,12 +75,10 @@ class CPlayer final : public CUnit
|
||||
public:
|
||||
virtual void Reset_Sprint() { m_bSprintToggle = false; }
|
||||
virtual void Reset_Walk() { m_bWalkToggle = false; }
|
||||
template<typename T>
|
||||
void Spawn_Effect();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
void TestKeyInput(_float fTimeDelta);
|
||||
virtual void Add_FSM();
|
||||
virtual void Set_Anim();
|
||||
@@ -89,6 +91,7 @@ class CPlayer final : public CUnit
|
||||
HRESULT InputMove();
|
||||
HRESULT InputKeyUpMove();
|
||||
HRESULT InputSpell();
|
||||
HRESULT InputAim();
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck(_float fTimeDelta);
|
||||
@@ -114,6 +117,17 @@ class CPlayer final : public CUnit
|
||||
HRESULT Behavior_CombatExitCheck();
|
||||
void Behavior_CombatExit();
|
||||
|
||||
void Behavior_HitEnter();
|
||||
HRESULT Behavior_HitExitCheck();
|
||||
void Behavior_HitExit();
|
||||
|
||||
void Behavior_Broom_RideEnter();
|
||||
HRESULT Behavior_Broom_RideExitCheck();
|
||||
void Behavior_Broom_RideExit();
|
||||
|
||||
|
||||
void Player_InterpTurn(_float fTimeDelta);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
private:
|
||||
|
||||
@@ -19,6 +19,8 @@ class CPlayerInfo final : public CBase
|
||||
void Update(_float fTimeDelta);
|
||||
void Change_Level();
|
||||
|
||||
void Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight);
|
||||
pair<_float3, _float3> Get_CameraCoordinateSystem();
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
@@ -27,6 +29,8 @@ class CPlayerInfo final : public CBase
|
||||
|
||||
private:
|
||||
CTransform* m_pTransform = { nullptr };
|
||||
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
|
||||
_float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -33,9 +33,13 @@ class CProtego final : public CEffect_Container
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
CPartObject* m_pSphere = { nullptr };
|
||||
CPartObject* m_pBottom = { nullptr };
|
||||
CPartObject* m_pCircle = { nullptr };
|
||||
class CEffectParts* m_pSphere = { nullptr };
|
||||
class CEffectParts* m_pBottom = { nullptr };
|
||||
class CEffectParts* m_pCircle = { nullptr };
|
||||
|
||||
_float m_fSizeAccTime = {};
|
||||
_float m_fAmountSize = {};
|
||||
_float m_fSpeed = {};
|
||||
public:
|
||||
static CProtego* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Broom_Ride final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagBroomRide : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_BROOM_RIDE_DESC;
|
||||
private:
|
||||
CState_Broom_Ride();
|
||||
virtual ~CState_Broom_Ride() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_BROOM_RIDE_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Broom_Ride* Create(STATE_BROOM_RIDE_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "MapContainer.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CStreetContainer final : public CMapContainer // NON OCCLUSION CONTAINER
|
||||
{
|
||||
private:
|
||||
CStreetContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CStreetContainer(const CStreetContainer& rhs);
|
||||
~CStreetContainer() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources()override;
|
||||
|
||||
public:
|
||||
static CStreetContainer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner = nullptr)override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity()override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -38,11 +38,14 @@ class CTerrain final : public CGameObject
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Terrain* m_pVIBufferCom = { nullptr };
|
||||
CRigidBody_Static* m_pRigidBody = { nullptr };
|
||||
CTexture* m_pDiffuseTextureCom = { nullptr };
|
||||
CTexture* m_pNormalTextureCom = { nullptr };
|
||||
CTexture* m_pMROTextureCom = { nullptr };
|
||||
CTexture* m_pAlphaMapTextureCom = { nullptr };
|
||||
|
||||
_float3 m_vDRN = { (1.f / 16.f), (1.f / 16.f), (1.f / 16.f) };
|
||||
|
||||
_float m_fUsingSurfaceParams = {};
|
||||
_float3 m_vPickingPosition = {};
|
||||
|
||||
|
||||
@@ -56,6 +56,17 @@ class CTrailObject final : public CPartObject
|
||||
_float fBlurIntensity = {};
|
||||
_int iBlurWeight = {};
|
||||
|
||||
/* 블룸 */
|
||||
_bool isBloom = {};
|
||||
|
||||
_bool isBloomDissolve = {};
|
||||
_bool isBloomReverseDissolve = {};
|
||||
|
||||
_float fBloomStrength = {};
|
||||
|
||||
BLOOM_TYPE eBloomType = {};
|
||||
_float2 vBloomTime = {};
|
||||
|
||||
}TRAIL_INFO;
|
||||
private:
|
||||
CTrailObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -79,7 +90,7 @@ class CTrailObject final : public CPartObject
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Blur() override;
|
||||
|
||||
virtual HRESULT Render_Bloom() override;
|
||||
|
||||
public:
|
||||
static CTrailObject* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -24,16 +24,13 @@ class CWand final : public CPartObject
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
public:
|
||||
|
||||
private:
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
|
||||
class CTrailObject* m_pTrail = { nullptr };
|
||||
class CEffectParts* m_pEffectParts = { nullptr };
|
||||
|
||||
_float3 m_vOffset = {};
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user