Merge branch 'Develope' into Effect
This commit is contained in:
@@ -1270,7 +1270,7 @@ PS_OUT PS_Camera_LockOn(PS_IN In)
|
||||
|
||||
Color.a = tex1 * 0.3f;
|
||||
|
||||
if (g_iHover != 0)
|
||||
if (g_iHover == 0)
|
||||
{
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, maskuv);
|
||||
|
||||
|
||||
@@ -83,6 +83,15 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Present")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Picking")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_PhysX")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Level")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_FrameCount")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ call Update_Resources.bat
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Action_Panel.h" />
|
||||
<ClInclude Include="..\Public\CallBack_Troll_Behavior.h" />
|
||||
<ClInclude Include="..\Public\CallBack_Troll_HitReport.h" />
|
||||
<ClInclude Include="..\Public\CameraLockOn.h" />
|
||||
<ClInclude Include="..\Public\Current_Slot_Number.h" />
|
||||
<ClInclude Include="..\Public\Current_Spell_Slot.h" />
|
||||
@@ -175,6 +175,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Goblin_Protego.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h" />
|
||||
<ClInclude Include="..\Public\HpBarBG.h" />
|
||||
<ClInclude Include="..\Public\InteractiveInfo.h" />
|
||||
<ClInclude Include="..\Public\Intro_BG.h" />
|
||||
<ClInclude Include="..\Public\Intro_Image.h" />
|
||||
<ClInclude Include="..\public\Land.h" />
|
||||
@@ -183,6 +184,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Logo.h" />
|
||||
<ClInclude Include="..\Public\Logo_Glow.h" />
|
||||
<ClInclude Include="..\Public\Logo_Text.h" />
|
||||
<ClInclude Include="..\Public\Troll_State_Stun.h" />
|
||||
<ClInclude Include="..\Public\WandEnd.h" />
|
||||
<ClInclude Include="..\Public\Magic_Icon.h" />
|
||||
<ClInclude Include="..\Public\Magic_Item.h" />
|
||||
@@ -316,7 +318,7 @@ call Update_Resources.bat
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_States.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_Troll_Behavior.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_Troll_HitReport.cpp" />
|
||||
<ClCompile Include="..\Private\CameraLockOn.cpp" />
|
||||
<ClCompile Include="..\Private\Current_Slot_Number.cpp" />
|
||||
<ClCompile Include="..\Private\Current_Spell_Slot.cpp" />
|
||||
@@ -332,6 +334,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Goblin_Protego.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Spector.cpp" />
|
||||
<ClCompile Include="..\Private\HpBarBG.cpp" />
|
||||
<ClCompile Include="..\Private\InteractiveInfo.cpp" />
|
||||
<ClCompile Include="..\Private\Intro_BG.cpp" />
|
||||
<ClCompile Include="..\Private\Intro_Image.cpp" />
|
||||
<ClCompile Include="..\private\Land.cpp" />
|
||||
@@ -340,6 +343,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Logo.cpp" />
|
||||
<ClCompile Include="..\Private\Logo_Glow.cpp" />
|
||||
<ClCompile Include="..\Private\Logo_Text.cpp" />
|
||||
<ClCompile Include="..\Private\Troll_State_Stun.cpp" />
|
||||
<ClCompile Include="..\Private\WandEnd.cpp" />
|
||||
<ClCompile Include="..\Private\Magic_Icon.cpp" />
|
||||
<ClCompile Include="..\Private\Magic_Item.cpp" />
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
<Filter>02.GameObjects\UI\Screen\Logo\Logo_Text</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Dead.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\Dead</Filter>
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Dead</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Enemy_Panel.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel</Filter>
|
||||
@@ -434,9 +434,24 @@
|
||||
<ClInclude Include="..\Public\CallBack_Playable_HitReport.h">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\HitReport\Player</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\CallBack_Troll_Behavior.h">
|
||||
<ClInclude Include="..\Public\CallBack_Troll_HitReport.h">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\HitReport\Monster\Troll</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\InteractiveInfo.h">
|
||||
<Filter>03.InfoInstance\03.InteractiveInfo</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Land.h">
|
||||
<Filter>02.GameObjects\Environment\04.Land</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Unified.h">
|
||||
<Filter>02.GameObjects\Environment\05.Unified</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement_Lake.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Lake</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_BattleAxe.h">
|
||||
<Filter>02.GameObjects\Item\Goblin_Axe</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
||||
</ClInclude>
|
||||
@@ -468,6 +483,9 @@
|
||||
<ClInclude Include="..\Public\Goblin_BattleAxe.h">
|
||||
<Filter>02.GameObjects\Item\Goblin_Axe</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Troll_State_Stun.h">
|
||||
<Filter>04.Mechanic\State\Troll_Combat\Troll_State_Stun</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -925,9 +943,6 @@
|
||||
<Filter Include="04.Mechanic\State\Movement\Shuffle">
|
||||
<UniqueIdentifier>{0ed6a11e-5d22-4b9f-a39c-f2319c27caf4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\Dead">
|
||||
<UniqueIdentifier>{81add99f-7450-4730-8d3f-bf1de06b2b8d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage">
|
||||
<UniqueIdentifier>{5973b96c-42c3-4cda-9627-f741e12124cd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -997,6 +1012,18 @@
|
||||
<Filter Include="02.GameObjects\Item\Goblin_Axe">
|
||||
<UniqueIdentifier>{e666a8b4-c92e-48ee-b63b-40d852b27b06}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\WandEnd">
|
||||
<UniqueIdentifier>{14ad0431-680b-4c8b-93d7-601aee5ce435}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.InfoInstance\03.InteractiveInfo">
|
||||
<UniqueIdentifier>{1d1dc743-5cf2-4b8f-a80e-16b16437c7aa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Dead">
|
||||
<UniqueIdentifier>{81add99f-7450-4730-8d3f-bf1de06b2b8d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Troll_Combat\Troll_State_Stun">
|
||||
<UniqueIdentifier>{2e2a53dc-9ea6-427f-88b3-d8857193d432}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -1384,7 +1411,7 @@
|
||||
<Filter>02.GameObjects\Item\Broom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Dead.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\Dead</Filter>
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Dead</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Mage.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Mage</Filter>
|
||||
@@ -1426,6 +1453,9 @@
|
||||
<ClCompile Include="..\Private\WandEnd.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\WandEnd</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Troll_State_Stun.cpp">
|
||||
<Filter>04.Mechanic\State\Troll_Combat\Troll_State_Stun</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
@@ -1452,7 +1482,7 @@
|
||||
<ClCompile Include="..\Private\CallBack_Playable_HitReport.cpp">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\HitReport\Player</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\CallBack_Troll_Behavior.cpp">
|
||||
<ClCompile Include="..\Private\CallBack_Troll_HitReport.cpp">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\HitReport\Monster\Troll</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Land.cpp">
|
||||
@@ -1467,6 +1497,9 @@
|
||||
<ClCompile Include="..\Private\Goblin_BattleAxe.cpp">
|
||||
<Filter>02.GameObjects\Item\Goblin_Axe</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\InteractiveInfo.cpp">
|
||||
<Filter>03.InfoInstance\03.InteractiveInfo</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc">
|
||||
|
||||
@@ -130,10 +130,10 @@ HRESULT CBombard::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
|
||||
{ /* 대상 위치 지정 */
|
||||
|
||||
CUnit* pTargetUnit = m_pInfoInstance->Get_LockOnUnit();
|
||||
if (nullptr != pTargetUnit) {
|
||||
m_pInfoInstance->Get_LockOnInfo(m_Info);
|
||||
if (nullptr != m_Info.pUnit) {
|
||||
|
||||
XMStoreFloat4(&m_vTargetPos, pTargetUnit->Get_LockOnPos());
|
||||
XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos());
|
||||
|
||||
XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
|
||||
}
|
||||
|
||||
@@ -64,10 +64,18 @@ void CCallBack_Playable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& h
|
||||
{
|
||||
case PXOBJECT::END:
|
||||
break;
|
||||
default:
|
||||
case PXOBJECT::BOX:
|
||||
{
|
||||
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
|
||||
pDynamic->addForce(vDir * fLength * 100000.f, PSX::PxForceMode::eIMPULSE);
|
||||
//pDynamic->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
|
||||
PSX::PxVec3 vCompressedDir = vDir;
|
||||
vCompressedDir.y += -vDir.y * 2.f + 1.f;
|
||||
vCompressedDir.normalize();
|
||||
pDynamic->addForce(vCompressedDir * fLength* 100.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
} break;
|
||||
}
|
||||
} break;
|
||||
|
||||
+25
-21
@@ -1,19 +1,20 @@
|
||||
#include "pch.h"
|
||||
#include "CallBack_Troll_Behavior.h"
|
||||
#include "CallBack_Troll_HitReport.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "RigidBody_Dynamic.h"
|
||||
#include "Unit.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
CCallBack_Troll_Behavior::CCallBack_Troll_Behavior()
|
||||
CCallBack_Troll_HitReport::CCallBack_Troll_HitReport()
|
||||
{
|
||||
}
|
||||
|
||||
CCallBack_Troll_Behavior::~CCallBack_Troll_Behavior()
|
||||
CCallBack_Troll_HitReport::~CCallBack_Troll_HitReport()
|
||||
{
|
||||
}
|
||||
|
||||
void CCallBack_Troll_Behavior::onShapeHit(const PSX::PxControllerShapeHit& hit)
|
||||
void CCallBack_Troll_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit)
|
||||
{
|
||||
PSX::PxController* pController = hit.controller;
|
||||
PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점
|
||||
@@ -38,17 +39,20 @@ void CCallBack_Troll_Behavior::onShapeHit(const PSX::PxControllerShapeHit& hit)
|
||||
switch ((PXOBJECT)pTargetActorData->iSubKind)
|
||||
{
|
||||
case PXOBJECT::TERRAIN:
|
||||
//class CGameObject* pOwner = m_pController->Get_Owner();
|
||||
//_vector vLook = pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
//_float fDot = XMVectorGetX(XMVector3Dot(XMLoadFloat3((_float3*)&vDir), vLook));
|
||||
//if (fDot > cosf(XM_PIDIV4)) {
|
||||
// CModel* pModel = pOwner->Get_Component<CModel>();
|
||||
// _uint iAnimIndex = pModel->Get_AnimIndex();
|
||||
// if (STATEANIM::RUSH_LOOP == iAnimIndex) {
|
||||
// CFSM* pFSM = pOwner->Get_Component<CFSM>();
|
||||
// pFSM->Change_State(FSMSTATE::STOP);
|
||||
// }
|
||||
//}
|
||||
{
|
||||
class CUnit* pOwner = (CUnit*)m_pController->Get_Owner();
|
||||
_vector vLook = pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
_float fDot = XMVectorGetX(XMVector3Dot(XMLoadFloat3((_float3*)&vDir), vLook));
|
||||
GUI::Text("DOTDOTResult %f", fDot);
|
||||
if (fDot > cosf(XM_PIDIV4)) {
|
||||
CModel* pModel = pOwner->Get_Component<CModel>();
|
||||
_uint iAnimIndex = pModel->Get_AnimIndex();
|
||||
if (pOwner->Get_AnimInfo(STATEANIM::RUSH_LOOP).first == iAnimIndex) {
|
||||
CFSM* pFSM = pOwner->Get_Component<CFSM>();
|
||||
pFSM->Change_State(FSMSTATE::STUN);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -80,7 +84,7 @@ void CCallBack_Troll_Behavior::onShapeHit(const PSX::PxControllerShapeHit& hit)
|
||||
}
|
||||
}
|
||||
|
||||
void CCallBack_Troll_Behavior::onControllerHit(const PSX::PxControllersHit& hit)
|
||||
void CCallBack_Troll_HitReport::onControllerHit(const PSX::PxControllersHit& hit)
|
||||
{
|
||||
PSX::PxController* pController = hit.controller;
|
||||
PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점
|
||||
@@ -127,7 +131,7 @@ void CCallBack_Troll_Behavior::onControllerHit(const PSX::PxControllersHit& hit)
|
||||
}
|
||||
}
|
||||
|
||||
void CCallBack_Troll_Behavior::onObstacleHit(const PSX::PxControllerObstacleHit& hit)
|
||||
void CCallBack_Troll_HitReport::onObstacleHit(const PSX::PxControllerObstacleHit& hit)
|
||||
{
|
||||
PSX::PxController* pController = hit.controller;
|
||||
PSX::PxExtendedVec3 vWorldPos = hit.worldPos; // 접촉지점
|
||||
@@ -144,7 +148,7 @@ void CCallBack_Troll_Behavior::onObstacleHit(const PSX::PxControllerObstacleHit&
|
||||
//}
|
||||
}
|
||||
|
||||
HRESULT CCallBack_Troll_Behavior::Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject)
|
||||
HRESULT CCallBack_Troll_HitReport::Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject)
|
||||
{
|
||||
m_pController = pController;
|
||||
m_pPartDynamicBody = pPartDynamicObject;
|
||||
@@ -155,7 +159,7 @@ HRESULT CCallBack_Troll_Behavior::Initialize(CCharacter_Controller* pController,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCallBack_Troll_Behavior::Finalize()
|
||||
HRESULT CCallBack_Troll_HitReport::Finalize()
|
||||
{
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
SAFE_RELEASE(m_pPartDynamicBody);
|
||||
@@ -163,7 +167,7 @@ HRESULT CCallBack_Troll_Behavior::Finalize()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CCallBack_Troll_Behavior* CCallBack_Troll_Behavior::Create()
|
||||
CCallBack_Troll_HitReport* CCallBack_Troll_HitReport::Create()
|
||||
{
|
||||
return new CCallBack_Troll_Behavior();
|
||||
return new CCallBack_Troll_HitReport();
|
||||
}
|
||||
@@ -130,7 +130,7 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
|
||||
m_bMovable = !m_bMovable;
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) {
|
||||
if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
}
|
||||
if (m_pGameInstance->Key_Up(DIK_P)) {
|
||||
|
||||
@@ -41,6 +41,7 @@ HRESULT CCameraLockOn::Initialize(void* pArg)
|
||||
m_fTimeMult = 0.5f;
|
||||
Set_Visible(false);
|
||||
m_pInfoInstance->Add_Event(TEXT("MouseTogggle"), [this](void* p) {this->Set_Visible(*reinterpret_cast<_bool*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("CameraLockOn"), [this](void* p) {this->Visible(*reinterpret_cast<_bool*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -50,14 +51,11 @@ void CCameraLockOn::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CCameraLockOn::Update(_float fTimeDelta)
|
||||
{
|
||||
/*if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON))
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_bHover = true;
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
Update_Target();
|
||||
}
|
||||
else
|
||||
m_bHover = false;*/
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
}
|
||||
|
||||
void CCameraLockOn::Late_Update(_float fTimeDelta)
|
||||
@@ -156,6 +154,30 @@ HRESULT CCameraLockOn::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCameraLockOn::Visible(_bool Visible)
|
||||
{
|
||||
if (m_pInfoInstance->Get_UISTATE() == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
m_bVisible = Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
void CCameraLockOn::Update_Target()
|
||||
{
|
||||
if (m_pInfoInstance->Get_TargetMonster() == nullptr)
|
||||
{
|
||||
m_bHover = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bHover = true;
|
||||
}
|
||||
}
|
||||
|
||||
CCameraLockOn* CCameraLockOn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCameraLockOn* pInstance = new CCameraLockOn(pDevice, pContext);
|
||||
|
||||
@@ -32,7 +32,7 @@ void CCamera_Debug::Update(_float fTimeDelta)
|
||||
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
|
||||
m_bMovable = !m_bMovable;
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) {
|
||||
if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
}
|
||||
if (m_bMovable) {
|
||||
|
||||
@@ -162,10 +162,10 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
|
||||
{ /* 대상 위치 지정 */
|
||||
|
||||
CUnit* pTargetUnit = m_pInfoInstance->Get_LockOnUnit();
|
||||
if (nullptr != pTargetUnit) {
|
||||
m_pInfoInstance->Get_LockOnInfo(m_Info);
|
||||
if (nullptr != m_Info.pUnit) {
|
||||
|
||||
XMStoreFloat4(&m_vTargetPos, pTargetUnit->Get_LockOnPos());
|
||||
XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos());
|
||||
|
||||
XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "pch.h"
|
||||
#include "Enemy_HpBar.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Monster.h"
|
||||
|
||||
CEnemy_HpBar::CEnemy_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
@@ -8,7 +10,8 @@ CEnemy_HpBar::CEnemy_HpBar(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
}
|
||||
|
||||
CEnemy_HpBar::CEnemy_HpBar(const CEnemy_HpBar& rhs)
|
||||
:CElementObject(rhs)
|
||||
:CElementObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -41,8 +44,9 @@ HRESULT CEnemy_HpBar::Initialize(void* pArg)
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 10.f;
|
||||
m_vNine_Slice = _float4(15.f, 100.f, 5.f, 15.f);
|
||||
m_fMaxHp = 200.f;
|
||||
m_fCurrentHp = m_fMaxHp;
|
||||
m_fMaxHp = 0.f;
|
||||
m_fCurrentHp = 0.f;
|
||||
m_fTargetHp = 0.f;
|
||||
SizeUpX(360.f);
|
||||
m_fMoveSpeed = 5.f;
|
||||
m_bAnimation = false;
|
||||
@@ -95,41 +99,18 @@ void CEnemy_HpBar::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_fCurrentHp < 0.f)
|
||||
m_fCurrentHp = 0.f;
|
||||
if (m_fDamage <= 0.f)
|
||||
m_fDamage = 0.f;
|
||||
m_fTargetHp = m_fMaxHp - m_fDamage;
|
||||
Update_Target();
|
||||
|
||||
if (m_fTargetHp < m_fCurrentHp)
|
||||
Hit(fTimeDelta);
|
||||
|
||||
m_fHpBar = m_fCurrentHp / m_fMaxHp;
|
||||
|
||||
if (m_fHpBar <= 0.f)
|
||||
if (m_fCurrentHp <= 0.f)
|
||||
{
|
||||
m_bAnimation = true;
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_3))
|
||||
{
|
||||
Lerp_PosX(101.f);
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_K))
|
||||
{
|
||||
Set_FadeIn();
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_L))
|
||||
{
|
||||
Set_FadeOut();
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_J))
|
||||
{
|
||||
m_bAnimation = true;
|
||||
m_bHover = true;
|
||||
m_fTime = 0.f;
|
||||
SizeUpdate(m_fLerpX, m_fLerpY);
|
||||
}
|
||||
if (m_bAnimation == true)
|
||||
{
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
@@ -139,12 +120,11 @@ void CEnemy_HpBar::Update(_float fTimeDelta)
|
||||
}
|
||||
if (m_fTime >= 0.9f)
|
||||
{
|
||||
SizeUpdate(m_fLerpX, m_fLerpY);
|
||||
m_bAnimation = false;
|
||||
m_bHover = false;
|
||||
m_fTime = 0.f;
|
||||
SizeUpdate(m_fLerpX, m_fLerpY);
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -177,7 +157,7 @@ HRESULT CEnemy_HpBar::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -202,14 +182,16 @@ void CEnemy_HpBar::SizeUpX(_float SizeX)
|
||||
m_fLerpX = SizeX;
|
||||
}
|
||||
|
||||
void CEnemy_HpBar::Set_Enemt_Info(void* pArg)
|
||||
void CEnemy_HpBar::Update_Target()
|
||||
{
|
||||
if(m_bAnimation == true)
|
||||
if (m_pInfoInstance->Get_TargetMonster() == nullptr)
|
||||
{
|
||||
Set_FadeOut();
|
||||
return;
|
||||
}
|
||||
//m_fMaxHp
|
||||
//m_fCurrentHp
|
||||
m_fMaxHp = m_pInfoInstance->Get_TargetMonster()->Get_Stat()->Get_Stat().fMaxHp;
|
||||
m_fCurrentHp = m_pInfoInstance->Get_TargetMonster()->Get_Stat()->Get_Stat().fCurrentHp;
|
||||
m_fTargetHp = m_pInfoInstance->Get_TargetMonster()->Get_Stat()->Get_Stat().fTargetHp;
|
||||
Set_FadeIn();
|
||||
}
|
||||
|
||||
@@ -279,7 +261,7 @@ HRESULT CEnemy_HpBar::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "pch.h"
|
||||
#include "Enemy_Info.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Monster.h"
|
||||
|
||||
CEnemy_Info::CEnemy_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
@@ -8,7 +10,8 @@ CEnemy_Info::CEnemy_Info(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
}
|
||||
|
||||
CEnemy_Info::CEnemy_Info(const CEnemy_Info& rhs)
|
||||
:CElementObject(rhs)
|
||||
:CElementObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -104,6 +107,8 @@ void CEnemy_Info::Update(_float fTimeDelta)
|
||||
Set_FadeOut();
|
||||
}
|
||||
|
||||
Update_Target();
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -136,13 +141,12 @@ HRESULT CEnemy_Info::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pEnemy_Name.c_str()) - 29.f) * 0.5f;
|
||||
m_fFont2OffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_pLevel.c_str()) - 13.f) * 0.5f;
|
||||
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pEnemy_Name.c_str(), _float2(m_fFontPos.x + m_fX - m_fFontOffSet, m_fFontPos.y + m_fY), XMVectorSet(1.f* m_fAlpha,1.f* m_fAlpha,1.f* m_fAlpha, m_fAlpha));
|
||||
m_pGameInstance->Render_Text(TEXT("UI_size15"), m_pLevel.c_str(), _float2(m_fFontX + m_fX - m_fFont2OffSet, m_fFontY + m_fY), XMVectorSet(0.f, (120.f / 255.f)* m_fAlpha, 0.f, m_fAlpha));
|
||||
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pEnemy_Name.c_str(), _float2(m_fFontPos.x + m_fX - m_fFontOffSet, m_fFontPos.y + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
|
||||
m_pGameInstance->Render_Text(TEXT("UI_size15"), m_pLevel.c_str(), _float2(m_fFontX + m_fX - m_fFont2OffSet, m_fFontY + m_fY), XMVectorSet(0.f, (120.f / 255.f) * m_fAlpha, 0.f, m_fAlpha));
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -209,14 +213,17 @@ HRESULT CEnemy_Info::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CEnemy_Info::Set_Info(_int Level, _wstring Name)
|
||||
void CEnemy_Info::Update_Target()
|
||||
{
|
||||
if (m_bAnimation == true)
|
||||
if (m_pInfoInstance->Get_TargetMonster() == nullptr)
|
||||
{
|
||||
Set_FadeOut();
|
||||
return;
|
||||
}
|
||||
m_pLevel = to_wstring(Level);
|
||||
m_pEnemy_Name = Name;
|
||||
m_pLevel = to_wstring(m_pInfoInstance->Get_TargetMonster()->Get_Stat()->Get_Stat().iLevel);
|
||||
m_pEnemy_Name = m_pInfoInstance->Get_TargetMonster()->Get_Stat()->Get_Stat().pUnit_Name;
|
||||
m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pEnemy_Name.c_str()) - 29.f) * 0.5f;
|
||||
m_fFont2OffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_pLevel.c_str()) - 13.f) * 0.5f;
|
||||
Set_FadeIn();
|
||||
}
|
||||
|
||||
|
||||
@@ -256,8 +256,8 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
|
||||
_float fSkillRatio = m_pInfoInstance->Get_Spell_Info(ENUM_CLASS(SKILL_TYPE::JAP)).fSpell_Damage;
|
||||
_float fCoefficient = CollisionDesc->pObject->Get_Component<CStat>()->Get_Stat(ENUM_CLASS(STAT::MAGIC));
|
||||
if (true == Get_Damage(fSkillRatio * fCoefficient)) {
|
||||
_float fCoefficient = CollisionDesc->pObject->Get_Component<CStat>()->Get_Stat().fMagic;
|
||||
if (true == Get_Damage(fSkillRatio * fCoefficient * 0.2f)) {
|
||||
m_pFSM->Change_State(FSMSTATE::DEAD);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -224,6 +224,17 @@ HRESULT CGoblin_Mage::Render_Shadow()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CGoblin_Mage::Get_LockOnPos()
|
||||
{
|
||||
if (nullptr != m_pCharacter_Controller && true == m_pCharacter_Controller->IsActive()) {
|
||||
return m_pCharacter_Controller->Get_Position();
|
||||
}
|
||||
else if (nullptr != m_pRigidBody) {
|
||||
return m_pRigidBody->Get_Position();
|
||||
}
|
||||
return Get_WorldPostion();
|
||||
}
|
||||
|
||||
void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
@@ -241,7 +252,7 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
|
||||
_float fSkillRatio = m_pInfoInstance->Get_Spell_Info(ENUM_CLASS(SKILL_TYPE::JAP)).fSpell_Damage;
|
||||
_float fCoefficient = CollisionDesc->pObject->Get_Component<CStat>()->Get_Stat(ENUM_CLASS(STAT::MAGIC));
|
||||
_float fCoefficient = CollisionDesc->pObject->Get_Component<CStat>()->Get_Stat().fMagic;
|
||||
if (true == Get_Damage(fSkillRatio * fCoefficient)) {
|
||||
m_pFSM->Change_State(FSMSTATE::DEAD);
|
||||
return;
|
||||
@@ -288,7 +299,7 @@ HRESULT CGoblin_Mage::Ready_Components()
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::GOBLIN_MAGICIAN);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.3f;
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.05f };
|
||||
@@ -311,7 +322,7 @@ HRESULT CGoblin_Mage::Ready_Components()
|
||||
}
|
||||
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_GOBLIN"), (CComponent**)&m_pStat))) {
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_GOBLIN_WIZARD"), (CComponent**)&m_pStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "MapInfo.h"
|
||||
#include "MonsterInfo.h"
|
||||
#include "PlayerInfo.h"
|
||||
#include "InteractiveInfo.h"
|
||||
#include "Skill_Data.h"
|
||||
|
||||
IMPLEMENT_SINGLETON(CInfoInstance)
|
||||
@@ -19,7 +20,7 @@ void CInfoInstance::Update(_float fTimeDelta)
|
||||
m_pMonsterInfo->Update(fTimeDelta);
|
||||
m_pMapInfo->Update(fTimeDelta);
|
||||
m_pSkillInfo->Update(fTimeDelta);
|
||||
|
||||
m_pInteractiveInfo->Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CInfoInstance::Change_Level()
|
||||
@@ -28,6 +29,7 @@ void CInfoInstance::Change_Level()
|
||||
m_pMonsterInfo->Change_Level();
|
||||
m_pMapInfo->Change_Level();
|
||||
m_pSkillInfo->Change_Level();
|
||||
m_pInteractiveInfo->Change_Level();
|
||||
}
|
||||
|
||||
void CInfoInstance::Update_CameraCoordinateSystem(_float3& vLook, _float3& vRight)
|
||||
@@ -67,18 +69,22 @@ HRESULT CInfoInstance::Deregist_ActiveMonster(CMonster* pUnit)
|
||||
return m_pMonsterInfo->Deregist_ActiveMonster(pUnit);
|
||||
}
|
||||
|
||||
CUnit* CInfoInstance::Get_LockOnUnit()
|
||||
void CInfoInstance::Get_LockOnInfo(LOCKON_INFO& Info)
|
||||
{
|
||||
CUnit* pUnit = { nullptr };
|
||||
pUnit = m_pMonsterInfo->Get_LockOnUnit();
|
||||
// pUnit = m_pInfo->Get_LockOnUnit();
|
||||
return pUnit;
|
||||
Info.pUnit = m_pMonsterInfo->Get_LockOnUnit();
|
||||
Info.pInteractive = m_pInteractiveInfo->Get_LockOnUnit();
|
||||
}
|
||||
|
||||
pair<CUnit*, CTransform*> CInfoInstance::Get_NearestPlayerAlly(_fvector vPos)
|
||||
{
|
||||
return m_pMonsterInfo->Get_NearestPlayerAlly(vPos);
|
||||
}
|
||||
|
||||
CMonster* CInfoInstance::Get_TargetMonster()
|
||||
{
|
||||
return m_pMonsterInfo->Get_TargetMonster();
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MAP_INFO
|
||||
HRESULT CInfoInstance::Load_MapObjects(const _char* pFilePath)
|
||||
@@ -164,14 +170,16 @@ void CInfoInstance::Key_Input(_uint Input)
|
||||
void CInfoInstance::Mouse_Input(_uint Input)
|
||||
{
|
||||
m_eInput = Input;
|
||||
|
||||
_bool bHover = false;
|
||||
switch (m_eInput)
|
||||
{
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_1):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
case ENUM_CLASS(KEYINPUT::DIM_RBUTTON_UP):
|
||||
bHover = false;
|
||||
Event_CallBack(TEXT("CameraLockOn"), &bHover);
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_2):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
case ENUM_CLASS(KEYINPUT::DIM_RBUTTON_DOWN):
|
||||
bHover = true;
|
||||
Event_CallBack(TEXT("CameraLockOn"), &bHover);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -185,6 +193,11 @@ void CInfoInstance::Set_UISTATE(UI_STATE eState)
|
||||
m_eUI_State = eState;
|
||||
}
|
||||
|
||||
UI_STATE CInfoInstance::Get_UISTATE()
|
||||
{
|
||||
return m_eUI_State;
|
||||
}
|
||||
|
||||
void CInfoInstance::Add_Event(_wstring EventName, function<void(void*)> Event)
|
||||
{
|
||||
UI_Event.emplace(EventName, Event);
|
||||
@@ -199,6 +212,22 @@ void CInfoInstance::Event_CallBack(_wstring EventName, void* pArg)
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CInfoInstance::Regist_ActiveInteractive(CMapElement_Interactable* pInteractive)
|
||||
{
|
||||
if (nullptr == s_pInstance || nullptr == m_pInteractiveInfo) {
|
||||
return S_OK; // 게임 종료 된 상태
|
||||
}
|
||||
return m_pInteractiveInfo->Regist_ActiveInteractive(pInteractive);
|
||||
}
|
||||
|
||||
HRESULT CInfoInstance::Deregist_ActiveInteractive(CMapElement_Interactable* pInteractive)
|
||||
{
|
||||
if (nullptr == s_pInstance || nullptr == m_pInteractiveInfo) {
|
||||
return S_OK; // 게임 종료 된 상태
|
||||
}
|
||||
return m_pInteractiveInfo->Deregist_ActiveInteractive(pInteractive);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
LEVEL CInfoInstance::Get_RestartLevel()
|
||||
{
|
||||
@@ -230,6 +259,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic
|
||||
if (nullptr == m_pSkillInfo) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pInteractiveInfo = CInteractiveInfo::Create(pDevice, pContext);
|
||||
if (nullptr == m_pInteractiveInfo) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
@@ -237,13 +270,15 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic
|
||||
|
||||
void CInfoInstance::Release_Information()
|
||||
{
|
||||
DestroyInstance();
|
||||
UI_Event.clear();
|
||||
|
||||
DestroyInstance();
|
||||
|
||||
SAFE_RELEASE(m_pMapInfo);
|
||||
SAFE_RELEASE(m_pPlayerInfo);
|
||||
SAFE_RELEASE(m_pMonsterInfo);
|
||||
SAFE_RELEASE(m_pSkillInfo);
|
||||
SAFE_RELEASE(m_pInteractiveInfo);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
@@ -252,5 +287,6 @@ void CInfoInstance::Release_Information()
|
||||
void CInfoInstance::Free()
|
||||
{
|
||||
__super::Free();
|
||||
UI_Event.clear();
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
#include "pch.h"
|
||||
#include "InteractiveInfo.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "Monster.h"
|
||||
#include "Layer.h"
|
||||
#include "Player.h"
|
||||
|
||||
CInteractiveInfo::CInteractiveInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void CInteractiveInfo::Update(_float fTimeDelta)
|
||||
{
|
||||
Refresh_LockOnTarget();
|
||||
}
|
||||
void CInteractiveInfo::Change_Level()
|
||||
{
|
||||
SAFE_RELEASE(m_pLockOnInteractive);
|
||||
for (CMapElement_Interactable* pInteractive : m_ActiveInteractive) {
|
||||
SAFE_RELEASE(pInteractive);
|
||||
} m_ActiveInteractive.clear();
|
||||
}
|
||||
|
||||
HRESULT CInteractiveInfo::Regist_ActiveInteractive(CMapElement_Interactable* pUnit)
|
||||
{
|
||||
for (CMapElement_Interactable* pInteractive : m_ActiveInteractive) {
|
||||
if (pInteractive == pUnit) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
} m_ActiveInteractive.push_back(pUnit);
|
||||
SAFE_ADDREF(pUnit);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInteractiveInfo::Deregist_ActiveInteractive(CMapElement_Interactable* pUnit)
|
||||
{
|
||||
for (list<CMapElement_Interactable*>::iterator iter = m_ActiveInteractive.begin(); iter != m_ActiveInteractive.end();) {
|
||||
if (*iter == pUnit) {
|
||||
SAFE_RELEASE(*iter);
|
||||
iter = m_ActiveInteractive.erase(iter);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
CMapElement_Interactable* CInteractiveInfo::Get_LockOnUnit()
|
||||
{
|
||||
return m_pLockOnInteractive;
|
||||
}
|
||||
|
||||
HRESULT CInteractiveInfo::Refresh_LockOnTarget()
|
||||
{
|
||||
SAFE_RELEASE(m_pLockOnInteractive);
|
||||
_vector vCameraLook = m_pGameInstance->Get_CameraLook();
|
||||
_vector vCameraPos = m_pGameInstance->Get_CamXMPosition();
|
||||
_float fMaxDot = { 0.f };
|
||||
|
||||
_vector vMonsterPos;
|
||||
_vector vToMonsterDir;
|
||||
_bool bAim = false;
|
||||
_float fFovy = 0.f;
|
||||
if (m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER) != nullptr)
|
||||
{
|
||||
bAim = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER)->Get_Object<CPlayer>()->Get_Aim();
|
||||
}
|
||||
if (true == bAim)
|
||||
{
|
||||
fFovy = max(m_pGameInstance->Get_CameraFov() - XMConvertToRadians(50.f), XMConvertToRadians(5.f));
|
||||
}
|
||||
else {
|
||||
fFovy = max(m_pGameInstance->Get_CameraFov() - XMConvertToRadians(30.f), XMConvertToRadians(20.f));
|
||||
}
|
||||
|
||||
{ // 뷰프러스텀 순회해서 가장 중앙에 근접한 물체 찾기
|
||||
for (list<CMapElement_Interactable*>::iterator iter = m_ActiveInteractive.begin(); iter != m_ActiveInteractive.end(); ++iter) {
|
||||
|
||||
// (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상
|
||||
CMapElement_Interactable* pInteractive = (*iter);
|
||||
|
||||
vMonsterPos = pInteractive->Get_LockOnPos();
|
||||
vToMonsterDir = vMonsterPos - vCameraPos;
|
||||
_float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir);
|
||||
if (fDotResult <= cosf(fFovy)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (nullptr == m_pLockOnInteractive) {
|
||||
m_pLockOnInteractive = pInteractive;
|
||||
fMaxDot = fDotResult;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (fMaxDot < fDotResult) {
|
||||
m_pLockOnInteractive = pInteractive;
|
||||
fMaxDot = fDotResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nullptr != m_pLockOnInteractive) {
|
||||
SAFE_ADDREF(m_pLockOnInteractive);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CInteractiveInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||
{
|
||||
m_pGameInstance = CGameInstance::GetInstance();
|
||||
m_pInfoInstance = CInfoInstance::GetInstance();
|
||||
m_pDevice = pDevice;
|
||||
m_pContext = pContex;
|
||||
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
SAFE_ADDREF(m_pInfoInstance);
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CInteractiveInfo* CInteractiveInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||
{
|
||||
CInteractiveInfo* pInstance = new CInteractiveInfo();
|
||||
|
||||
if (FAILED(pInstance->Initialize(pDevice, pContex))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CInteractiveInfo::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pLockOnInteractive);
|
||||
for (CMapElement_Interactable* pInteractive : m_ActiveInteractive) {
|
||||
SAFE_RELEASE(pInteractive);
|
||||
} m_ActiveInteractive.clear();
|
||||
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
@@ -148,10 +148,10 @@ HRESULT CLevioso::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
|
||||
{ /* 대상 위치 지정 */
|
||||
|
||||
CUnit* pTargetUnit = m_pInfoInstance->Get_LockOnUnit();
|
||||
if (nullptr != pTargetUnit) {
|
||||
m_pInfoInstance->Get_LockOnInfo(m_Info);
|
||||
if (nullptr != m_Info.pUnit) {
|
||||
|
||||
XMStoreFloat4(&m_vTargetPos, pTargetUnit->Get_LockOnPos());
|
||||
XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos());
|
||||
|
||||
XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
#include "NoMountIcon.h"
|
||||
|
||||
#include "Loading_Panel.h"
|
||||
#include "LoadingWidget.h"
|
||||
#include "LoadingWidget_Flame.h"
|
||||
|
||||
#include "Action_Panel.h"
|
||||
@@ -1369,8 +1368,8 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc.vhalfGeometryInfo = { 0.5f, 0.5f, 0.5f };
|
||||
Desc.fDensity = 1.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 100.f, 100.f };
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 1.f, 1.f };
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
}
|
||||
@@ -1386,7 +1385,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
//Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX_KIN"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -1648,10 +1647,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLoading_Panel>(g_iStaticLevel, CLoading_Panel::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_LoadingWidget*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLoadingWidget>(g_iStaticLevel, CLoadingWidget::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_LoadingWidget_Flame*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLoadingWidget_Flame>(g_iStaticLevel, CLoadingWidget_Flame::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
|
||||
@@ -21,8 +21,8 @@ HRESULT CLoadingWidget::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fX = 800.f;
|
||||
Desc.fY = 400.f;
|
||||
Desc.fSizeX = 200.f;
|
||||
Desc.fSizeY = 200.f;
|
||||
|
||||
@@ -47,7 +47,7 @@ HRESULT CLoadingWidget::Initialize(void* pArg)
|
||||
m_iImageFrameX = 6; // 이미지의 x 갯수
|
||||
m_iImageFrameY = 6; // 이미지의 y 갯수
|
||||
|
||||
m_bActive = false;
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ HRESULT CLoadingWidget::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_LoadingWidget"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("LoadingWidget"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -101,11 +101,12 @@ HRESULT CLoading_Panel::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CLoading_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget**>(&m_pLoadingWidget))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("LoadingWidget"), m_pLoadingWidget);
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget**>(&m_pLoadingWidget))))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Element(TEXT("LoadingWidget"), m_pLoadingWidget);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget_Flame>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget_Flame**>(&m_pLoadingWidget_Flame))))
|
||||
{
|
||||
return E_FAIL;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "Loding_Panel.h"
|
||||
#include "GameInstance.h"
|
||||
#include "LoadingWidget.h"
|
||||
|
||||
CLoding_Panel::CLoding_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CUIObject(pDevice, pContext)
|
||||
@@ -38,8 +39,10 @@ HRESULT CLoding_Panel::Initialize(void* pArg)
|
||||
m_fCanvasAlpha = 1.f;
|
||||
m_fOwnerAlpha = 1.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fSortZ = 0.f;
|
||||
m_iImageNum = 0;
|
||||
m_fSortZ = 0.1f;
|
||||
Visible(true);
|
||||
m_bActive = true;
|
||||
//m_vImageposSi = _float4(0.f, 0.f, 1792.f, 1024.f);
|
||||
#ifdef _DEBUG
|
||||
INHYUK = true;
|
||||
@@ -110,6 +113,7 @@ void CLoding_Panel::Update(_float fTimeDelta)
|
||||
break;
|
||||
}
|
||||
#endif // DEBUG
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CLoding_Panel::Late_Update(_float fTimeDelta)
|
||||
@@ -222,6 +226,11 @@ HRESULT CLoding_Panel::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget>(g_iStaticLevel, ENUM_CLASS(LEVEL::LOADING), LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget**>(&m_pLoadingWidget))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Loding_Panel.h"
|
||||
#include "Intro_Image.h"
|
||||
#include "Intro_BG.h"
|
||||
#include "LoadingWidget.h"
|
||||
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -153,6 +154,11 @@ HRESULT CMainApp::Ready_Prototypes()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("LoadingWidget"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Loading/LoadingWidget.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIEDITOR,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl"),
|
||||
VTXPOSTEX::Elements, VTXPOSTEX::iNumElements)))) {
|
||||
@@ -182,6 +188,10 @@ HRESULT CMainApp::Ready_Prototypes()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CLoadingWidget>(g_iStaticLevel, CLoadingWidget::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
|
||||
#include "InfoInstance.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CMapElement_Interactable::CMapElement_Interactable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -9,7 +10,8 @@ CMapElement_Interactable::CMapElement_Interactable(ID3D11Device* pDevice, ID3D11
|
||||
}
|
||||
|
||||
CMapElement_Interactable::CMapElement_Interactable(const CMapElement_Interactable& rhs)
|
||||
: CMapElement(rhs)
|
||||
: CMapElement(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -39,11 +41,23 @@ HRESULT CMapElement_Interactable::Initialize(void* 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));
|
||||
|
||||
|
||||
ELEMENT_INTERACTABLE_DESC* pPhysXDummyDesc = static_cast<ELEMENT_INTERACTABLE_DESC*>(pArg);
|
||||
|
||||
// RIGID_BODY
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::BOX);//pPhysXDummyDesc->iSubKind;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX_KIN"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize);
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition);
|
||||
//static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Set_Kinematic(false);
|
||||
|
||||
m_pInfoInstance->Regist_ActiveInteractive(this);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -58,7 +72,6 @@ void CMapElement_Interactable::Update(_float fTimeDelta)
|
||||
|
||||
void CMapElement_Interactable::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
@@ -71,13 +84,17 @@ HRESULT CMapElement_Interactable::Render()
|
||||
|
||||
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
_uint iShaderPass = ENUM_CLASS(SHADER_PASS_MESH::DEFAULT);
|
||||
if (true == m_bDrawOutLine) {
|
||||
iShaderPass = ENUM_CLASS(SHADER_PASS_MESH::OUTLINE_WRITE);
|
||||
}
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(iShaderPass))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -86,6 +103,9 @@ HRESULT CMapElement_Interactable::Render()
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bDrawOutLine) {
|
||||
Render_OutLine();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pRigidBody->Render())) {
|
||||
return E_FAIL;
|
||||
@@ -115,16 +135,7 @@ HRESULT CMapElement_Interactable::Ready_Components(void* pArg)
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
ELEMENT_INTERACTABLE_DESC* pPhysXDummyDesc = static_cast<ELEMENT_INTERACTABLE_DESC*>(pArg);
|
||||
|
||||
// RIGID_BODY
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::BOX);//pPhysXDummyDesc->iSubKind;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX_KIN"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -151,6 +162,71 @@ HRESULT CMapElement_Interactable::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CMapElement_Interactable::Get_LockOnPos()
|
||||
{
|
||||
return m_pRigidBody->Get_Position();
|
||||
}
|
||||
|
||||
void CMapElement_Interactable::Set_DrawOutLine()
|
||||
{
|
||||
m_bDrawOutLine = true;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Interactable::Render_OutLine()
|
||||
{
|
||||
m_bDrawOutLine = false;
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
GUI::SetNextItemWidth(80.f);
|
||||
GUI::ColorPicker3("vOutLineColor", (_float*)&m_vOutLineColor);
|
||||
GUI::SliderFloat("Thickness", &m_fOutLineThickness, 0.1f, 2.f, "%.1f");
|
||||
GUI::SliderFloat("Scale", &m_fOutLineScale, 0.1f, 2.f, "%.1f");
|
||||
GUI::SliderFloat("Power", &m_fOutLinePower, 0.1f, 2.f, "%.1f");
|
||||
Compute_Depth();
|
||||
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(0.07f, 0.15f, fRatio);
|
||||
if (m_fOutLineThickness > 0.15f) {
|
||||
m_fOutLineThickness = 0.15f;
|
||||
}
|
||||
else if (m_fOutLineThickness < 0.07f) {
|
||||
m_fOutLineThickness = 0.07f;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineThickness", &m_fOutLineThickness, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineScale", &m_fOutLineScale, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLinePower", &m_fOutLinePower, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::OUTLINE_READ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CMapElement_Interactable* CMapElement_Interactable::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMapElement_Interactable* pInstance = new CMapElement_Interactable(pDevice, pContext);
|
||||
@@ -187,8 +263,14 @@ void CMapElement_Interactable::Free()
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
for (auto& pModel : m_pModelComs)
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
pInfo->Deregist_ActiveInteractive(this);
|
||||
}
|
||||
for (auto& pModel : m_pModelComs){
|
||||
SAFE_RELEASE(pModel);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -92,28 +92,25 @@ HRESULT CMonster::Render_OutLine()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
GUI::SetNextItemWidth(80.f);
|
||||
static _float3 vOutLineColor = _float3(1.f, 0.960784376f, 0.933333397f);
|
||||
static _float fOutLineThickness = { 5.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");
|
||||
Compute_Depth();
|
||||
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
|
||||
fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &vOutLineColor, sizeof(_float3)))) {
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
if (m_fOutLineThickness > 6.f) {
|
||||
m_fOutLineThickness = 6.f;
|
||||
}
|
||||
else if (m_fOutLineThickness < 2.f) {
|
||||
m_fOutLineThickness = 2.f;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineThickness", &(fOutLineThickness), sizeof(_float)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineThickness", &m_fOutLineThickness, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineScale", &(fOutLineScale), sizeof(_float)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineScale", &m_fOutLineScale, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLinePower", &(fOutLinePower), sizeof(_float)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLinePower", &m_fOutLinePower, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
|
||||
@@ -154,7 +151,12 @@ _bool CMonster::Get_Damage(_float fDamage)
|
||||
|
||||
_float2 CMonster::Get_Hp()
|
||||
{
|
||||
return { m_pStat->Get_Stat(ENUM_CLASS(STAT::HP)), m_pStat->Get_Stat(ENUM_CLASS(STAT::MAXHP)) };
|
||||
return { m_pStat->Get_Stat().fCurrentHp, m_pStat->Get_Stat().fMaxHp };
|
||||
}
|
||||
|
||||
CStat* CMonster::Get_Stat()
|
||||
{
|
||||
return m_pStat;
|
||||
}
|
||||
|
||||
HRESULT CMonster::Ready_Components(void*pArg)
|
||||
|
||||
@@ -111,6 +111,11 @@ pair<CUnit*, CTransform*> CMonsterInfo::Get_NearestPlayerAlly(_fvector vPos)
|
||||
return { pNearestPlayerAlly, pNearestPlayerAllyTransform };
|
||||
}
|
||||
|
||||
CMonster* CMonsterInfo::Get_TargetMonster()
|
||||
{
|
||||
return m_pLockOnMonster;
|
||||
}
|
||||
|
||||
HRESULT CMonsterInfo::Refresh_LockOnMonsters()
|
||||
{
|
||||
SAFE_RELEASE(m_pLockOnMonster);
|
||||
@@ -122,9 +127,9 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
|
||||
_vector vToMonsterDir;
|
||||
_bool Aim = false;
|
||||
_float fFovy = 0.f;
|
||||
if (m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::GAMEPLAY), LAYER_PLAYER) != nullptr)
|
||||
if (m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER) != nullptr)
|
||||
{
|
||||
Aim = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::GAMEPLAY), LAYER_PLAYER)->Get_Object<CPlayer>()->Get_Aim();
|
||||
Aim = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER)->Get_Object<CPlayer>()->Get_Aim();
|
||||
}
|
||||
if (Aim)
|
||||
{
|
||||
@@ -135,14 +140,15 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
|
||||
}
|
||||
|
||||
{ // 뷰프러스텀 순회해서 가장 중앙에 근접한 몬스터 찾기
|
||||
for (list<CMonster*>::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter) {
|
||||
for (list<CMonster*>::iterator iter = m_ActiveMonsters.begin(); iter != m_ActiveMonsters.end(); ++iter)
|
||||
{
|
||||
|
||||
// (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상
|
||||
CMonster* pMonster = (*iter);
|
||||
if (pMonster->Get_Hp().x <= 0) {
|
||||
continue;
|
||||
}
|
||||
vMonsterPos = pMonster->Get_WorldPostion();
|
||||
vMonsterPos = pMonster->Get_LockOnPos();
|
||||
vToMonsterDir = vMonsterPos - vCameraPos;
|
||||
_float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToMonsterDir);
|
||||
if (fDotResult <= cosf(fFovy)) {
|
||||
@@ -159,7 +165,10 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
|
||||
m_pLockOnMonster = pMonster;
|
||||
fMaxDot = fDotResult;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (nullptr != m_pLockOnMonster) {
|
||||
SAFE_ADDREF(m_pLockOnMonster);
|
||||
|
||||
@@ -172,9 +172,9 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
|
||||
{ /* 대상 위치 지정 */
|
||||
m_bHit = false;
|
||||
CUnit* pTargetUnit = m_pInfoInstance->Get_LockOnUnit();
|
||||
if (nullptr != pTargetUnit) {
|
||||
XMStoreFloat4(&m_vTargetPos, pTargetUnit->Get_LockOnPos());
|
||||
m_pInfoInstance->Get_LockOnInfo(m_Info);
|
||||
if (nullptr != m_Info.pUnit) {
|
||||
XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos());
|
||||
|
||||
if (XMVectorGetX(XMVector3Length(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))) >= 35.f) { //거리가 일정 이상이라면 그냥 정면으로 발사
|
||||
XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
#include "Monster.h"
|
||||
#include "Broom.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
@@ -138,10 +139,10 @@ __super::Update(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON))
|
||||
m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_DOWN));
|
||||
m_pInfoInstance->Mouse_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_DOWN));
|
||||
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
||||
{
|
||||
m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_UP));
|
||||
m_pInfoInstance->Mouse_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_UP));
|
||||
m_bAim = false;
|
||||
}
|
||||
|
||||
@@ -157,14 +158,17 @@ void CPlayer::Late_Update(_float fTimeDelta)
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
if (nullptr != m_pLockOnMonster) {
|
||||
if (false == m_pLockOnMonster->isDead()) {
|
||||
static_cast<CMonster*>(m_pLockOnMonster)->Set_DrawOutLine();
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
if (false == m_LockOnInfo.pUnit->isDead()) {
|
||||
static_cast<CMonster*>(m_LockOnInfo.pUnit)->Set_DrawOutLine();
|
||||
}
|
||||
else {
|
||||
m_pLockOnMonster = nullptr;
|
||||
m_LockOnInfo.pUnit = nullptr;
|
||||
}
|
||||
}
|
||||
if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
static_cast<CMapElement_Interactable*>(m_LockOnInfo.pInteractive)->Set_DrawOutLine();
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
_vector look = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
@@ -272,7 +276,7 @@ void CPlayer::Render_CameraCoordinateSystem()
|
||||
_vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vLook = { XMVectorGetX(xmvLook), XMVectorGetZ(xmvLook) };
|
||||
GUI::Begin("Player_CAM_COOORD");
|
||||
GUI::Text("%d", m_pLockOnMonster);
|
||||
GUI::Text("%d", m_LockOnInfo.pUnit);
|
||||
|
||||
GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z);
|
||||
GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z);
|
||||
@@ -433,12 +437,13 @@ HRESULT CPlayer::Bind_ShaderResources()
|
||||
}
|
||||
void CPlayer::ReLockOnTarget()
|
||||
{
|
||||
m_pLockOnMonster = m_pInfoInstance->Get_LockOnUnit();
|
||||
if (nullptr != m_pLockOnMonster) {
|
||||
if (true == m_pLockOnMonster->isDead()) {
|
||||
m_pLockOnMonster = nullptr;
|
||||
m_pInfoInstance->Get_LockOnInfo(m_LockOnInfo);
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
if (true == m_LockOnInfo.pUnit->isDead()) {
|
||||
m_LockOnInfo.pUnit = nullptr;
|
||||
}
|
||||
}
|
||||
//m_pLockOnMonster->Get_State
|
||||
}
|
||||
|
||||
void CPlayer::SetGravity()
|
||||
|
||||
@@ -323,7 +323,7 @@ void CPlayer::Behavior_MoveEnter()
|
||||
m_bSprintToggle = false;
|
||||
m_bWalkToggle = false;
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
//m_bRatio = true;
|
||||
m_bRatio = true;
|
||||
}
|
||||
}
|
||||
else { // While Moving
|
||||
@@ -732,13 +732,12 @@ void CPlayer::Behavior_DodgeEnter()
|
||||
|
||||
HRESULT CPlayer::Behavior_DodgeExitCheck()
|
||||
{
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove()) && fRatio>=0.32f) {
|
||||
if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -908,7 +907,7 @@ void CPlayer::Behavior_LightAttackEnter()
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {_uint iIndex = 0; m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject<CWand>(), &iIndex); },
|
||||
0.08f);
|
||||
0.1f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE, Get_PartObject<CWand>()); },
|
||||
@@ -930,7 +929,7 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck()
|
||||
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK];
|
||||
pairAnimInfo.first = iNext;
|
||||
|
||||
if (fRatio >= 0.1f)
|
||||
if (fRatio >= 0.2f)
|
||||
{
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
@@ -1063,7 +1062,8 @@ void CPlayer::Behavior_SpellEnter()
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::WAND_END, Get_PartObject<CWand>()); },
|
||||
0.3f);
|
||||
0.2f);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1074,7 +1074,8 @@ void CPlayer::Behavior_SpellEnter()
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::WAND_END, Get_PartObject<CWand>()); },
|
||||
0.3f);
|
||||
0.2f);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1464,41 +1465,8 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_DodgeExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
|
||||
_vector xmvInputDir = XMVectorZero();
|
||||
|
||||
_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))
|
||||
xmvInputDir -= xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
xmvInputDir -= xmvCamRight;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
xmvInputDir += xmvCamRight;
|
||||
|
||||
xmvInputDir = XMVector3Normalize(xmvInputDir);
|
||||
|
||||
_float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
|
||||
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
|
||||
_float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir);
|
||||
_float absDir = fabsf(vDir);
|
||||
|
||||
_float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x;
|
||||
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
if(cross>0)
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
else
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D)) { m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); };
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::DODGE, CState_Dodge::Create(&Desc));
|
||||
@@ -1627,6 +1595,23 @@ void CPlayer::Add_FSM()
|
||||
m_pTransformCom->Set_WorldMatrix(finalMat);
|
||||
m_pCharacter_Controller->Set_Position(finalMat.r[3]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc));
|
||||
|
||||
@@ -64,7 +64,7 @@ HRESULT CTroll::Initialize(void* pArg)
|
||||
|
||||
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(3.f, 5.f, -20.f, 1.f));
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(110.f, 24.f, 135.f, 1.f));
|
||||
|
||||
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
||||
SAFE_ADDREF(m_pEffectPool);
|
||||
@@ -145,7 +145,6 @@ void CTroll::Update(_float fTimeDelta)
|
||||
//m_pWeaponTrail->Trail_Update(WeaponSoket, fTimeDelta);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
|
||||
void CTroll::Late_Update(_float fTimeDelta)
|
||||
@@ -320,13 +319,13 @@ HRESULT CTroll::Ready_Components()
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TROLL);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.3f;
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.05f };
|
||||
Desc.fRadius = 1.2f;
|
||||
Desc.fHeight = 1.5f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Monster_HitReport::Create();
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Troll_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Monster_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "Troll_State_Stun.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Unit.h"
|
||||
|
||||
CTroll_State_Stun::CTroll_State_Stun()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CTroll_State_Stun::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CTroll_State_Stun::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 CTroll_State_Stun::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CTroll_State_Stun::Initialize(TROLL_STATE_STUN* 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;
|
||||
}
|
||||
|
||||
CTroll_State_Stun* CTroll_State_Stun::Create(TROLL_STATE_STUN* pDesc)
|
||||
{
|
||||
CTroll_State_Stun* pInstance = new CTroll_State_Stun;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CTroll_State_Stun::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CTroll_State_Stun::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "State_IdleBreak.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#include "Troll_State_Stun.h"
|
||||
#include "Troll_State_Rush.h"
|
||||
#include "Troll_State_BackHand_Swing.h"
|
||||
#include "State_Throw.h"
|
||||
@@ -100,8 +101,9 @@ void CTroll::Behavior_IdleBreakEnter()
|
||||
|
||||
HRESULT CTroll::Behavior_IdleBreakExitCheck()
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
if (m_pModelCom->IsFinishedAnim()){
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -303,10 +305,12 @@ HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (m_fDegree >= 90.f)
|
||||
{
|
||||
if (m_fCross > 0)
|
||||
if (m_fCross > 0){
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_L];
|
||||
else
|
||||
}
|
||||
else{
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_COMBAT_TURN_BWD_R];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
@@ -538,6 +542,34 @@ void CTroll::Behavior_BackHandSwingExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::BACKHAND_SWING);
|
||||
}
|
||||
|
||||
void CTroll::Behavior_StunEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::STUN);
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
m_bLookAt = false;
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_LOOP].first)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::STUN];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CTroll::Behavior_StunExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (true == m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_StunExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::STUN);
|
||||
}
|
||||
|
||||
void CTroll::Behavior_HitEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::HIT);
|
||||
@@ -696,6 +728,18 @@ void CTroll::Add_FSM()
|
||||
m_States.emplace(FSMSTATE::BACKHAND_SWING, CTroll_State_BackHand_Swing::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma region Behavior_Combat_Focus
|
||||
{
|
||||
CTroll_State_Stun::TROLL_STATE_STUN Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_StunEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_StunExitCheck(fTimeDelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_StunExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::STUN, CTroll_State_Stun::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Behavior_Hit
|
||||
{
|
||||
|
||||
@@ -210,6 +210,7 @@ void CUI_Manager::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
m_Event_map.clear();
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CCallBack_Troll_Behavior final : public PSX::PxUserControllerHitReport
|
||||
class CCallBack_Troll_HitReport final : public PSX::PxUserControllerHitReport
|
||||
{
|
||||
// 구현 예시
|
||||
// CCT는 RigidBody의 PxSimulationEventCallback에 안걸리고, 이 전용 콜백에서 처리되는 구조임
|
||||
@@ -14,9 +14,9 @@ class CCallBack_Troll_Behavior final : public PSX::PxUserControllerHitReport
|
||||
// PxControllerBehaviorCallback = "부딪힌 것에 대해 어떤 행동 정책을 쓸지 물어봄(질의)"
|
||||
// PxSimulationEventCallback = "씬 전체에 대한 글로벌 콜백(일반 물리 이벤트)"
|
||||
private:
|
||||
CCallBack_Troll_Behavior();
|
||||
CCallBack_Troll_HitReport();
|
||||
public:
|
||||
~CCallBack_Troll_Behavior();
|
||||
~CCallBack_Troll_HitReport();
|
||||
|
||||
public:
|
||||
// PxUserControllerHitReport을(를) 통해 상속됨
|
||||
@@ -37,6 +37,6 @@ class CCallBack_Troll_Behavior final : public PSX::PxUserControllerHitReport
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
|
||||
public:
|
||||
static CCallBack_Troll_Behavior* Create();
|
||||
static CCallBack_Troll_HitReport* Create();
|
||||
};
|
||||
NS_END
|
||||
@@ -32,6 +32,10 @@ class CCameraLockOn final : public CUIObject
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
virtual void Visible(_bool Visible) override;
|
||||
void Update_Target();
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Client
|
||||
DIM_RBUTTON_UP, DIM_RBUTTON_DOWN,
|
||||
END
|
||||
};
|
||||
enum class MOUSEINPUT { LBUTTON, RBUTTON };
|
||||
|
||||
enum class ELEMENT_INTERACTABLE_ID { BARREL, BOX, TABLE, END };
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
NS_BEGIN(Engine)
|
||||
class CModel;
|
||||
class CRigidBody_Static;
|
||||
class CUnit;
|
||||
NS_END
|
||||
|
||||
namespace Client
|
||||
@@ -35,4 +36,26 @@ namespace Client
|
||||
_float fPreview{};
|
||||
_float fVidio{};
|
||||
}SPELL_INFO;
|
||||
|
||||
typedef struct tagLockOnInfo {
|
||||
CUnit* pUnit = { nullptr };
|
||||
class CMapElement_Interactable* pInteractive = { nullptr };
|
||||
}LOCKON_INFO;
|
||||
|
||||
typedef struct tagUnitInfo
|
||||
{
|
||||
_wstring pUnit_Name;
|
||||
_float fCurrentHp{};
|
||||
_float fMaxHp{};
|
||||
_float fTargetHp{};
|
||||
_float fMelee{};
|
||||
_float fMagic{};
|
||||
_float fDefense{};
|
||||
_float fSpeed{};
|
||||
_float fAgility{};
|
||||
_int iLevel{};
|
||||
_float fExprince{};
|
||||
_float fMaxExprience{};
|
||||
_int iGold{};
|
||||
}UNITINFO;
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ class CEffect_Container abstract : public CContainerObject
|
||||
HRESULT Load_Directory(const _char* pPath);
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr);
|
||||
HRESULT Load_Package(const _char* pPath);
|
||||
_uint Get_SkillType() const { return m_iSkillType; }
|
||||
_uint Get_SkillType() const { return m_iSkillType; }
|
||||
void Reset_Light();
|
||||
|
||||
protected:
|
||||
@@ -58,7 +58,7 @@ class CEffect_Container abstract : public CContainerObject
|
||||
map<_float, function<void()>> m_Events = {};
|
||||
_uint m_iSkillType = ENUM_CLASS(SKILL_TYPE::END);
|
||||
_bool m_bHasDamage = { false };
|
||||
|
||||
LOCKON_INFO m_Info = {};
|
||||
public:
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
@@ -28,7 +28,8 @@ class CEnemy_HpBar final : public CElementObject
|
||||
void Hit(_float fTimeDelta);
|
||||
virtual void SizeUpX(_float SizeX) override;
|
||||
|
||||
void Set_Enemt_Info(void* pArg);
|
||||
void Update_Target();
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
@@ -41,12 +42,13 @@ class CEnemy_HpBar final : public CElementObject
|
||||
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
_float m_fMaxHp{};
|
||||
_float m_fCurrentHp{};
|
||||
_float m_fTargetHp{};
|
||||
_float m_fHpBar{};
|
||||
_float m_fDamage{};
|
||||
_float m_fTargetHp{};
|
||||
|
||||
_bool m_bAnimation = { false };
|
||||
public:
|
||||
|
||||
@@ -31,19 +31,20 @@ class CEnemy_Info final : public CElementObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Set_Info(_int Level, _wstring Name);
|
||||
void Update_Target();
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
_float2 m_fFontPos{};
|
||||
_float m_fFont2OffSet{};
|
||||
_wstring m_pEnemy_Name;
|
||||
_wstring m_pLevel;
|
||||
_bool m_bAnimation = {false};
|
||||
|
||||
_bool m_bTarget = { false };
|
||||
public:
|
||||
static CEnemy_Info* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -27,6 +27,7 @@ class CGoblin_Mage final : public CMonster
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Shadow() override;
|
||||
virtual _vector Get_LockOnPos() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ NS_BEGIN(Engine)
|
||||
class CGameInstance;
|
||||
class CTransform;
|
||||
class CUnit;
|
||||
class CState;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
@@ -35,8 +36,9 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
HRESULT Regist_ActiveMonster(class CMonster* pUnit);
|
||||
HRESULT Deregist_ActiveMonster(class CMonster* pUnit);
|
||||
|
||||
class CUnit* Get_LockOnUnit();
|
||||
void Get_LockOnInfo(LOCKON_INFO& Info);
|
||||
pair<CUnit*, CTransform*> Get_NearestPlayerAlly(_fvector vPos);
|
||||
CMonster* Get_TargetMonster();
|
||||
#pragma endregion
|
||||
#pragma region MAP_INFO
|
||||
HRESULT Load_MapObjects(const _char* pFilePath);
|
||||
@@ -52,9 +54,14 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
void Key_Input(_uint Input); // 플레이어 키 입력
|
||||
void Mouse_Input(_uint Input); // 플레이어 키 입력
|
||||
void Set_UISTATE(UI_STATE eState);
|
||||
UI_STATE Get_UISTATE();
|
||||
void Add_Event(_wstring EventName, function<void(void*)> Event);
|
||||
void Event_CallBack(_wstring EventName, void* pArg = nullptr);
|
||||
#pragma endregion
|
||||
#pragma region Interactive_INFO
|
||||
HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
|
||||
HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
|
||||
#pragma endregion
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
@@ -63,7 +70,8 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
class CPlayerInfo* m_pPlayerInfo = { nullptr };
|
||||
class CMonsterInfo* m_pMonsterInfo = { nullptr };
|
||||
class CMapInfo* m_pMapInfo = { nullptr };
|
||||
class CSkill_Data* m_pSkillInfo= { nullptr };
|
||||
class CSkill_Data* m_pSkillInfo = { nullptr };
|
||||
class CInteractiveInfo* m_pInteractiveInfo = { nullptr };
|
||||
_uint m_eInput = ENUM_CLASS(KEYINPUT::END);
|
||||
_int m_eSpell = ENUM_CLASS(SKILL_TYPE::END);
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameInstance;
|
||||
class CUnit;
|
||||
class CTransform;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CInteractiveInfo final : public CBase
|
||||
{
|
||||
private:
|
||||
CInteractiveInfo();
|
||||
~CInteractiveInfo() = default;
|
||||
public:
|
||||
void Update(_float fTimeDelta);
|
||||
void Change_Level();
|
||||
|
||||
HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pUnit);
|
||||
HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pUnit);
|
||||
|
||||
class CMapElement_Interactable* Get_LockOnUnit();
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
|
||||
class CMapElement_Interactable* m_pLockOnInteractive = { nullptr };
|
||||
list<class CMapElement_Interactable*> m_ActiveInteractive = {};
|
||||
|
||||
private:
|
||||
HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||
HRESULT Refresh_LockOnTarget();
|
||||
public:
|
||||
static CInteractiveInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -43,6 +43,8 @@ class CLoding_Panel final : public CUIObject
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pCurrent_Spell_Slot = { nullptr };
|
||||
CGameObject* m_pLoadingWidget = { nullptr };
|
||||
|
||||
|
||||
_int m_iImageNum{};
|
||||
_float4 m_vImageposSi{};
|
||||
|
||||
@@ -26,12 +26,21 @@ class CMapElement_Interactable final : public CMapElement
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
_vector Get_LockOnPos();
|
||||
virtual void Set_DrawOutLine();
|
||||
virtual HRESULT Render_OutLine() override;
|
||||
|
||||
private:
|
||||
ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END };
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
class CRigidBody* m_pRigidBody = { nullptr };
|
||||
PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
class CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
_bool m_bDrawOutLine = { false };
|
||||
_float4 m_vOutLineColor = CMyTools::ColorRGBA_HEXtoFLOAT4(0xfefefe00);
|
||||
_float m_fOutLineThickness = { 5.f };
|
||||
_float m_fOutLineScale = { 1.f };
|
||||
_float m_fOutLinePower = { 1.f };
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -22,7 +22,7 @@ class CMonster abstract : public CUnit
|
||||
_float4 Get_TargetPos() { return m_vTargetPos; }
|
||||
virtual _bool Get_Damage(_float fDamage);
|
||||
virtual _float2 Get_Hp();
|
||||
|
||||
virtual CStat* Get_Stat();
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CUnit* m_pTarget = { nullptr };
|
||||
@@ -33,6 +33,10 @@ class CMonster abstract : public CUnit
|
||||
_float m_fDeadRatio = { 0.f };
|
||||
_bool m_bDrawOutLine = { false };
|
||||
_bool m_bLookAt = { true };
|
||||
_float4 m_vOutLineColor = CMyTools::ColorRGBA_HEXtoFLOAT4(0xfefefe00);
|
||||
_float m_fOutLineThickness = { 5.f };
|
||||
_float m_fOutLineScale = { 1.f };
|
||||
_float m_fOutLinePower = { 1.f };
|
||||
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
|
||||
@@ -28,6 +28,7 @@ class CMonsterInfo final : public CBase
|
||||
CUnit* Get_LockOnUnit();
|
||||
pair<CUnit*, CTransform*> Get_NearestPlayerAlly(_fvector vPos);
|
||||
|
||||
CMonster* Get_TargetMonster();
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
@@ -28,7 +28,7 @@ class CPlayer final : public CUnit
|
||||
_matrix Get_WandPos();
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CUnit* m_pLockOnMonster = { nullptr };
|
||||
LOCKON_INFO m_LockOnInfo = {};
|
||||
_float m_fDirectionRadian = 0.f;
|
||||
|
||||
_bool m_bSprintToggle = { false };
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "Client_Define.h"
|
||||
#include "Monster.h"
|
||||
#include "CallBack_Monster_Behavior.h"
|
||||
#include "CallBack_Monster_HitReport.h"
|
||||
#include "CallBack_Troll_HitReport.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
@@ -38,7 +38,7 @@ class CTroll final : public CMonster
|
||||
|
||||
private:
|
||||
CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
CCallBack_Monster_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CCallBack_Troll_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
@@ -126,6 +126,10 @@ class CTroll final : public CMonster
|
||||
HRESULT Behavior_BackHandSwingExitCheck(_float fTimeDelta);
|
||||
void Behavior_BackHandSwingExit();
|
||||
|
||||
void Behavior_StunEnter();
|
||||
HRESULT Behavior_StunExitCheck(_float fTimeDelta);
|
||||
void Behavior_StunExit();
|
||||
|
||||
void Behavior_HitEnter();
|
||||
HRESULT Behavior_HitExitCheck();
|
||||
void Behavior_HitExit();
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CTroll_State_Stun final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagTrollStun : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}TROLL_STATE_STUN;
|
||||
public:
|
||||
CTroll_State_Stun();
|
||||
virtual ~CTroll_State_Stun() = 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(TROLL_STATE_STUN* pDesc);
|
||||
|
||||
public:
|
||||
static CTroll_State_Stun* Create(TROLL_STATE_STUN* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -1,214 +1,174 @@
|
||||
0 Hu_Rct_Accio_Loop_anm
|
||||
1 Hu_Rct_Accio_Splat_anm
|
||||
2 Hu_Rct_Accio_Start_anm
|
||||
3 Hu_Rct_Bola_Frnt_anm
|
||||
4 Hu_Rct_Bump_Stand_Rct2_Jogger_FwdLft_v02_anm
|
||||
5 Hu_Rct_Bump_Stand_Rct2_Jogger_FwdRht_v01_anm
|
||||
6 Hu_Rct_Bump_Stand_Rct2_Walker_BckRht_v02_anm
|
||||
7 Hu_Rct_Dazed_Start_anm
|
||||
8 Hu_Rct_Descendo_Grnd_anm
|
||||
9 Hu_Rct_Descendo_Grnd_End_anm
|
||||
10 Hu_Rct_Descendo_Grnd_Loop_anm
|
||||
11 Hu_Rct_Descendo_Grnd_Start_anm
|
||||
12 Hu_Rct_Dodge_Bwd_Duck_anm
|
||||
13 Hu_Rct_Dodge_Fwd_Duck_anm
|
||||
14 Hu_Rct_Dodge_Lft_anm
|
||||
15 Hu_Rct_Dodge_Lft_Duck_135_anm
|
||||
16 Hu_Rct_Dodge_Lft_Duck_45_anm
|
||||
17 Hu_Rct_Dodge_Lft_Duck_anm
|
||||
18 Hu_Rct_Dodge_Rht_anm
|
||||
19 Hu_Rct_Dodge_Rht_Duck_135_anm
|
||||
20 Hu_Rct_Dodge_Rht_Duck_45_anm
|
||||
21 Hu_Rct_Dodge_Rht_Duck_anm
|
||||
22 Hu_Rct_Env_UpperBody_Bats_anm
|
||||
23 Hu_Rct_Env_UpperBody_SpdrWeb_anm
|
||||
24 Hu_Rct_Flinch_BMIdle_Fwd_anm
|
||||
25 Hu_Rct_Flinch_BMIdle_Lft_anm
|
||||
26 Hu_Rct_Flinch_BMIdle_Rht_anm
|
||||
27 Hu_Rct_Flinch_Fwd_Spine_ADD_anm
|
||||
28 Hu_Rct_Flinch_LF_BMIdle_Fwd_anm
|
||||
29 Hu_Rct_Flinch_LF_BMIdle_Lft_anm
|
||||
30 Hu_Rct_Flinch_LF_BMIdle_Rht_anm
|
||||
31 Hu_Rct_Flinch_Lft_anm
|
||||
32 Hu_Rct_Flinch_Lft_Jog_Loop_anm
|
||||
33 Hu_Rct_Flinch_Lft_Spine_ADD_anm
|
||||
34 Hu_Rct_Flinch_Lft_Walk_Loop_anm
|
||||
35 Hu_Rct_Flinch_Rht_anm
|
||||
36 Hu_Rct_Flinch_Rht_Jog_Loop_anm
|
||||
37 Hu_Rct_Flinch_Rht_Spine_ADD_anm
|
||||
38 Hu_Rct_Flinch_Rht_Walk_Loop_anm
|
||||
39 Hu_Rct_Flip_Bwd_01_anm
|
||||
40 Hu_Rct_Frozen_ShakeOff_anm
|
||||
41 Hu_Rct_Frozen_ShakeOff_v2_anm
|
||||
42 Hu_Rct_Getup_Bck_2Crouch_anm
|
||||
43 Hu_Rct_Getup_Bck_2Knee_anm
|
||||
44 Hu_Rct_Getup_Frnt_2Crouch_anm
|
||||
45 Hu_Rct_Getup_Frnt_2Knee_anm
|
||||
46 Hu_Rct_Getup_Frnt_anm
|
||||
47 Hu_Rct_Getup_Lftside_2Knee_anm
|
||||
48 Hu_Rct_Getup_Lftside_FD_2Knee_anm
|
||||
49 Hu_Rct_Getup_LftSide_FD_anm
|
||||
50 Hu_Rct_Getup_Lftside_FU_2Knee_anm
|
||||
51 Hu_Rct_Getup_LftSide_FU_anm
|
||||
52 Hu_Rct_Getup_Rhtside_2Knee_anm
|
||||
53 Hu_Rct_Getup_Rhtside_FD_2Knee_anm
|
||||
54 Hu_Rct_Getup_RhtSide_FD_anm
|
||||
55 Hu_Rct_Getup_Rhtside_FU_2Knee_anm
|
||||
56 Hu_Rct_Getup_RhtSide_FU_anm
|
||||
57 Hu_Rct_Getup_Slouch_2Knee_anm
|
||||
58 Hu_Rct_Hit_2Cmbt_Bwd_anm
|
||||
59 Hu_Rct_Hit_Bwd_anm
|
||||
60 Hu_Rct_Hit_Fwd_anm
|
||||
61 Hu_Rct_Hit_Lft_anm
|
||||
62 Hu_Rct_Hit_Rht_anm
|
||||
63 Hu_Rct_Hitch_Bwd_anm
|
||||
64 Hu_Rct_Hitch_Fwd_anm
|
||||
65 Hu_Rct_Hitch_Lft_anm
|
||||
66 Hu_Rct_Hitch_Rht_anm
|
||||
67 Hu_Rct_InAir_Hit_Frnt_anm
|
||||
68 Hu_Rct_KnckBck_Loop_anm
|
||||
69 Hu_Rct_KnckBck_Start_anm
|
||||
70 Hu_Rct_KnckDn_Hvy_01_anm
|
||||
71 Hu_Rct_KnckDn_Hvy_02_anm
|
||||
72 Hu_Rct_KnckDn_Hvy_Fwd_01_anm
|
||||
73 Hu_Rct_KnckDn_Hvy_Fwd_Splat_anm
|
||||
74 Hu_Rct_KnckDn_Hvy_Splat_01_anm
|
||||
75 Hu_Rct_KnckDn_Hvy_Splat_02_anm
|
||||
76 Hu_Rct_Knockdown_Bwd_9m_Start_anm
|
||||
77 Hu_Rct_Knockdown_Bwd_anm
|
||||
78 Hu_Rct_Knockdown_Bwd_Getup_anm
|
||||
79 Hu_Rct_Knockdown_Bwd_Land_anm
|
||||
80 Hu_Rct_Knockdown_Bwd_SplatHold_anm
|
||||
81 Hu_Rct_Knockdown_Bwd_Start_anm
|
||||
82 Hu_Rct_Knockdown_Fwd_9m_Start_anm
|
||||
83 Hu_Rct_Knockdown_Fwd_Getup_anm
|
||||
84 Hu_Rct_Knockdown_Fwd_Land_anm
|
||||
85 Hu_Rct_Knockdown_Fwd_SplatHold_anm
|
||||
86 Hu_Rct_Knockdown_Fwd_Start_anm
|
||||
87 Hu_Rct_Knockdown_Lft_9m_Start_anm
|
||||
88 Hu_Rct_Knockdown_Lft_Getup_anm
|
||||
89 Hu_Rct_Knockdown_Lft_Land_anm
|
||||
90 Hu_Rct_Knockdown_Lft_SplatHold_anm
|
||||
91 Hu_Rct_Knockdown_Lft_Start_anm
|
||||
92 Hu_Rct_Knockdown_Rht_9m_Start_anm
|
||||
93 Hu_Rct_Knockdown_Rht_Getup_anm
|
||||
94 Hu_Rct_Knockdown_Rht_Land_anm
|
||||
95 Hu_Rct_Knockdown_Rht_SplatHold_anm
|
||||
96 Hu_Rct_Knockdown_Rht_Start_anm
|
||||
97 Hu_Rct_Levioso_Loop_anm
|
||||
98 Hu_Rct_Levitate_Land_anm
|
||||
99 Hu_Rct_Levitate_Land_Fail_anm
|
||||
100 Hu_Rct_Levitate_Loop_anm
|
||||
101 Hu_Rct_Levitate_Rht_Arm_Fail_anm
|
||||
102 Hu_Rct_Levitate_Rht_Arm_Success_anm
|
||||
103 Hu_Rct_Levitate_Start_anm
|
||||
104 Hu_Rct_LF_Spell_Trip_Catch_anm
|
||||
105 Hu_Rct_LF_WallStop_anm
|
||||
106 Hu_Rct_Ragdoll_Flail_anm
|
||||
107 Hu_Rct_Ragdoll_Panic_Loop_anm
|
||||
108 Hu_Rct_Ragdoll_Wall_Anticipate_anm
|
||||
109 Hu_Rct_Ragdoll_Writhe_Loop_anm
|
||||
110 Hu_Rct_RF_WallStop_anm
|
||||
111 Hu_Rct_Send_Bwd_Getup_anm
|
||||
112 Hu_Rct_Send_Bwd_Loop_02_anm
|
||||
113 Hu_Rct_Send_Bwd_Loop_anm
|
||||
114 Hu_Rct_Send_Bwd_SplatGround_anm
|
||||
115 Hu_Rct_Send_Bwd_SplatHold_anm
|
||||
116 Hu_Rct_Send_Bwd_Tumble_Loop_02_anm
|
||||
117 Hu_Rct_Send_Bwd_Tumble_Loop_anm
|
||||
118 Hu_Rct_Send_Fwd_Loop_anm
|
||||
119 Hu_Rct_Send_Fwd_Start_anm
|
||||
120 Hu_Rct_Send_Fwd_StartLoop_anm
|
||||
121 Hu_Rct_Slam_Wall_Bck_Bounce_anm
|
||||
122 Hu_Rct_Slam_Wall_Frnt_Bounce_anm
|
||||
123 Hu_Rct_Spell_Dance_anm
|
||||
124 Hu_Rct_Spell_Dance_v01_anm
|
||||
125 Hu_Rct_Spell_Glacius_End_anm
|
||||
126 Hu_Rct_Spell_Glacius_Fail_anm
|
||||
127 Hu_Rct_Spell_Glacius_Fail_End_anm
|
||||
128 Hu_Rct_Spell_Incarcerous_End_anm
|
||||
129 Hu_Rct_Spell_Incarcerous_End_Fail_anm
|
||||
130 Hu_Rct_Spell_Incarcerous_Loop_anm
|
||||
131 Hu_Rct_Spell_Incarcerous_Start_anm
|
||||
132 Hu_Rct_Spell_Petrificus_End_anm
|
||||
133 Hu_Rct_Spell_Petrificus_End_Fail_anm
|
||||
134 Hu_Rct_Spell_Petrificus_GetUp_anm
|
||||
135 Hu_Rct_Spell_Petrificus_Loop_anm
|
||||
136 Hu_Rct_Spell_Petrificus_SplatGround_anm
|
||||
137 Hu_Rct_Spell_Petrificus_SplatGround_Hold_anm
|
||||
138 Hu_Rct_Spell_Petrificus_Start_anm
|
||||
139 Hu_Rct_Spell_Scalp_anm
|
||||
140 Hu_Rct_Spell_Sneeze_anm
|
||||
141 Hu_Rct_Spell_TimeDialation_v01_anm
|
||||
142 Hu_Rct_Spell_Trip_Catch_v01_anm
|
||||
143 Hu_Rct_Spell_Trip_Catch_v02_anm
|
||||
144 Hu_Rct_Spell_Trip_Fall_anm
|
||||
145 Hu_Rct_Spell_Trip_Fall_v01_anm
|
||||
146 Hu_Rct_Spell_Web_End_anm
|
||||
147 Hu_Rct_Spell_Web_End_Fail_anm
|
||||
148 Hu_Rct_Spell_Web_End_Fail_Break_anm
|
||||
149 Hu_Rct_Spell_Web_End_Fail_Loop_anm
|
||||
150 Hu_Rct_Spell_Web_Hit_anm
|
||||
151 Hu_Rct_Spell_Web_Loop_anm
|
||||
152 Hu_Rct_SpellFlinch_Sit_Bck_v01_anm
|
||||
153 Hu_Rct_SpellFlinch_Sit_Bck_v02_anm
|
||||
154 Hu_Rct_SpellFlinch_Sit_Bck_v03_anm
|
||||
155 Hu_Rct_SpellFlinch_Sit_Fwd_v01_anm
|
||||
156 Hu_Rct_SpellFlinch_Sit_Fwd_v02_anm
|
||||
157 Hu_Rct_SpellFlinch_Sit_Fwd_v03_anm
|
||||
158 Hu_Rct_SpellFlinch_Sit_Lft_v01_anm
|
||||
159 Hu_Rct_SpellFlinch_Sit_Lft_v02_anm
|
||||
160 Hu_Rct_SpellFlinch_Sit_Rht_v01_anm
|
||||
161 Hu_Rct_SpellFlinch_Sit_Rht_v02_anm
|
||||
162 Hu_Rct_SpellFlinch_Sit_Rht_v03_anm
|
||||
163 Hu_Rct_SpellFlinch_Stand_Bck_v01_anm
|
||||
164 Hu_Rct_SpellFlinch_Stand_Bck_v02_anm
|
||||
165 Hu_Rct_SpellFlinch_Stand_Bck_v03_anm
|
||||
166 Hu_Rct_SpellFlinch_Stand_Fwd_v01_anm
|
||||
167 Hu_Rct_SpellFlinch_Stand_Fwd_v02_anm
|
||||
168 Hu_Rct_SpellFlinch_Stand_Fwd_v03_anm
|
||||
169 Hu_Rct_SpellFlinch_Stand_Lft_v01_anm
|
||||
170 Hu_Rct_SpellFlinch_Stand_Lft_v02_anm
|
||||
171 Hu_Rct_SpellFlinch_Stand_Rht_v01_anm
|
||||
172 Hu_Rct_SpellFlinch_Stand_Rht_v02_anm
|
||||
173 Hu_Rct_SpellFlinch_Walk_Bck_v01_anm
|
||||
174 Hu_Rct_SpellFlinch_Walk_Fwd_v01_anm
|
||||
175 Hu_Rct_SpellFlinch_Walk_Lft_v01_anm
|
||||
176 Hu_Rct_SpellFlinch_Walk_Lft_v03_anm
|
||||
177 Hu_Rct_SpellFlinch_Walk_Lft_v04_anm
|
||||
178 Hu_Rct_SpellFlinch_Walk_Rht_01_anm
|
||||
179 Hu_Rct_SpellFlinch_Walk_Rht_02_anm
|
||||
180 Hu_Rct_SpellImpact_Walk_Bck_v03_anm
|
||||
181 Hu_Rct_SpellImpact_Walk_Fwd_v01_anm
|
||||
182 Hu_Rct_SpellImpact_Walk_Fwd_v02_anm
|
||||
183 Hu_Rct_SpellImpact_Walk_Lft_v02_anm
|
||||
184 Hu_Rct_SpellImpact_Walk_Rht_v01_anm
|
||||
185 Hu_Rct_SpelLook_Ground_DrunkSleep_Fwd_v01_anm
|
||||
186 Hu_Rct_SpelLook_Ground_Fwd_v01_anm
|
||||
187 Hu_Rct_SpelLook_WallLean_Fwd_v01_anm
|
||||
188 Hu_Rct_SpelLook_WallLean_Fwd_v02_anm
|
||||
189 Hu_Rct_Startled_Bwd_anm
|
||||
190 Hu_Rct_Startled_Fwd_anm
|
||||
191 Hu_Rct_Startled_Lft_anm
|
||||
192 Hu_Rct_Startled_Rht_anm
|
||||
193 Hu_Rct_Stumble2Knee_Bwd_anm
|
||||
194 Hu_Rct_Stumble2Knee_Fwd_anm
|
||||
195 Hu_Rct_Stumble_Bwd_01_Frozen_anm
|
||||
196 Hu_Rct_Stumble_Bwd_anm
|
||||
197 Hu_Rct_Stumble_Bwd_Fire_anm
|
||||
198 Hu_Rct_Stumble_Bwd_Hvy_anm
|
||||
199 Hu_Rct_Stumble_Bwd_Lft_anm
|
||||
200 Hu_Rct_Stumble_Bwd_Rht_anm
|
||||
201 Hu_Rct_Stumble_Fwd_anm
|
||||
202 Hu_Rct_Stumble_Fwd_Frozen_01_anm
|
||||
203 Hu_Rct_Stumble_Fwd_Lft_anm
|
||||
204 Hu_Rct_Stumble_Lft_180_4m_anm
|
||||
205 Hu_Rct_Stumble_Lft_anm
|
||||
206 Hu_Rct_Stumble_Lft_Frozen_01_anm
|
||||
207 Hu_Rct_Stumble_Rht_180_4m_anm
|
||||
208 Hu_Rct_Stumble_Rht_anm
|
||||
209 Hu_Rct_Stumble_Rht_Frozen_01_anm
|
||||
210 Hu_Rct_Wounded_Knee_Death_Fwrd_anm
|
||||
211 Hu_Rct_Wounded_Knee_End_anm
|
||||
212 Hu_Rct_Wounded_Knee_Enter_anm
|
||||
213 Hu_Rct_Wounded_Knee_Loop_anm
|
||||
0 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_135_anm
|
||||
1 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_180_anm
|
||||
2 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_45_anm
|
||||
3 Trl_BM_Alert_LF_Walk_Turn_Start_Lft_90_anm
|
||||
4 Trl_BM_Alert_LF_Walk_Turn_Start_Rht_135_anm
|
||||
5 Trl_BM_Alert_LF_Walk_Turn_Start_Rht_180_anm
|
||||
6 Trl_BM_Alert_LF_Walk_Turn_Start_Rht_90_anm
|
||||
7 Trl_BM_Alert_Look_2Cmbt_180L_anm
|
||||
8 Trl_BM_Alert_Look_2Cmbt_180R_anm
|
||||
9 Trl_BM_Alert_Look_2Cmbt_90L_anm
|
||||
10 Trl_BM_Alert_Look_2Cmbt_90R_anm
|
||||
11 Trl_BM_Alert_Look_2Cmbt_A_anm
|
||||
12 Trl_BM_Alert_Look_2Cmbt_anm
|
||||
13 Trl_BM_Alert_Look_2Cmbt_B_anm
|
||||
14 Trl_BM_Alert_Look_2Cmbt_C_ClubSwing_anm
|
||||
15 Trl_BM_Alert_Look_End_Fwd_anm
|
||||
16 Trl_BM_Alert_Look_Loop_anm
|
||||
17 Trl_BM_Alert_Look_Loop_v01_anm
|
||||
18 Trl_BM_Alert_Look_Loop_v02_anm
|
||||
19 Trl_BM_Alert_Look_Start_Fwd_anm
|
||||
20 Trl_BM_Alert_Look_Turn_InPlace_A_anm
|
||||
21 Trl_BM_Alert_Look_Turn_InPlace_B_anm
|
||||
22 Trl_BM_Alert_Walk_Loop_Fwd_anm
|
||||
23 Trl_BM_Alert_Walk_Loop_Fwd_End_anm
|
||||
24 Trl_BM_Alert_Walk_Loop_Fwd_Start_anm
|
||||
25 Trl_BM_Idle_01_Face_anm
|
||||
26 Trl_BM_Idle_Break_01_anm
|
||||
27 Trl_BM_Idle_Break_01_Face_anm
|
||||
28 Trl_BM_Idle_Break_02_anm
|
||||
29 Trl_BM_Idle_Break_02_Face_anm
|
||||
30 Trl_BM_Idle_Break_03_anm
|
||||
31 Trl_BM_Idle_Break_04_anm
|
||||
32 Trl_BM_Lean_0_anm
|
||||
33 Trl_BM_LF_Idle_anm
|
||||
34 Trl_BM_LF_Walk_Turn_Start_Lft_135_anm
|
||||
35 Trl_BM_LF_Walk_Turn_Start_Lft_180_anm
|
||||
36 Trl_BM_LF_Walk_Turn_Start_Lft_45_anm
|
||||
37 Trl_BM_LF_Walk_Turn_Start_Lft_90_anm
|
||||
38 Trl_BM_LF_Walk_Turn_Start_Rht_135_anm
|
||||
39 Trl_BM_LF_Walk_Turn_Start_Rht_180_anm
|
||||
40 Trl_BM_LF_Walk_Turn_Start_Rht_45_anm
|
||||
41 Trl_BM_LF_Walk_Turn_Start_Rht_90_anm
|
||||
42 Trl_BM_Walk_Loop_Fwd_End_Wander_anm
|
||||
43 Trl_BM_Walk_Loop_Fwd_Lft_45_Wander_anm
|
||||
44 Trl_BM_Walk_Loop_Fwd_Rht_45_Wander_anm
|
||||
45 Trl_BM_Walk_Loop_Fwd_Start_Wander_anm
|
||||
46 Trl_BM_Walk_Loop_Fwd_Wander_anm
|
||||
47 Trl_Cmbt_Atk_01_Face_anm
|
||||
48 Trl_Cmbt_Atk_02_Face_anm
|
||||
49 Trl_Cmbt_Atk_03_Face_anm
|
||||
50 Trl_Cmbt_Atk_Charge_Check_anm
|
||||
51 Trl_Cmbt_Atk_Charge_Knee_End_anm
|
||||
52 Trl_Cmbt_Atk_Charge_Knee_Loop_anm
|
||||
53 Trl_Cmbt_Atk_Charge_Knee_Start_anm
|
||||
54 Trl_Cmbt_Atk_Charge_Loop_anm
|
||||
55 Trl_Cmbt_Atk_Charge_Start_anm
|
||||
56 Trl_Cmbt_Atk_Charge_Stop_RU_anm
|
||||
57 Trl_Cmbt_Atk_Charge_Stop_Turn_Lft_anm
|
||||
58 Trl_Cmbt_Atk_Charge_Stop_Turn_Rht_anm
|
||||
59 Trl_Cmbt_Atk_Charge_Stumble_Fwd_anm
|
||||
60 Trl_Cmbt_Atk_Charge_Stun_anm
|
||||
61 Trl_Cmbt_Atk_Hop_Bckhnd_RU_anm
|
||||
62 Trl_Cmbt_Atk_Hop_Forhnd_LU_anm
|
||||
63 Trl_Cmbt_Atk_LF_Stomp_Bck_anm
|
||||
64 Trl_Cmbt_Atk_LF_Stomp_Fwd_anm
|
||||
65 Trl_Cmbt_Atk_LF_Stomp_Lft_anm
|
||||
66 Trl_Cmbt_Atk_Overhead_Slam_anm
|
||||
67 Trl_Cmbt_Atk_Overhead_Slam_BckHnd_anm
|
||||
68 Trl_Cmbt_Atk_Overhead_Slam_Jog_anm
|
||||
69 Trl_Cmbt_Atk_Overhead_Slam_Lft_180_anm
|
||||
70 Trl_Cmbt_Atk_Overhead_Slam_Lft_90_anm
|
||||
71 Trl_Cmbt_Atk_Overhead_Slam_Rht_180_anm
|
||||
72 Trl_Cmbt_Atk_Overhead_Slam_Rht_90_anm
|
||||
73 Trl_Cmbt_Atk_RF_Stomp_Rht_anm
|
||||
74 Trl_cmbt_Atk_RockThrow_Fwd_anm
|
||||
75 Trl_Cmbt_Atk_RockThrow_Lft_anm
|
||||
76 Trl_Cmbt_Atk_RockThrow_Rht_anm
|
||||
77 Trl_Cmbt_Atk_Rockthrow_Start_anm
|
||||
78 Trl_Cmbt_Atk_StepBack_Swing_Fwd_anm
|
||||
79 Trl_Cmbt_Atk_StepSwing_Fwd_BckHnd_anm
|
||||
80 Trl_Cmbt_Atk_StepSwing_Fwd_BckHnd_Splt_anm
|
||||
81 Trl_Cmbt_Atk_StepSwing_Fwd_ForHnd_anm
|
||||
82 Trl_Cmbt_Atk_StepSwing_Fwd_ForHnd_Splt_anm
|
||||
83 Trl_Cmbt_Atk_StepSwing_Lft_180_BckHnd_anm
|
||||
84 Trl_Cmbt_Atk_StepSwing_Lft_90_BckHnd_anm
|
||||
85 Trl_Cmbt_Atk_StepSwing_Rht_180_ForHnd_Splt_anm
|
||||
86 Trl_Cmbt_Atk_StepSwing_Rht_90_ForHnd_anm
|
||||
87 Trl_Cmbt_Atk_Swing_Fwd_anm
|
||||
88 Trl_Cmbt_Atk_Swing_Fwd_BckHnd_anm
|
||||
89 Trl_Cmbt_Atk_Swing_Fwd_BckHnd_Jog_anm
|
||||
90 Trl_Cmbt_Atk_Swing_Fwd_BckHnd_Splt_anm
|
||||
91 Trl_Cmbt_Atk_Swing_Fwd_Jog_anm
|
||||
92 Trl_Cmbt_Atk_Swing_Fwd_Splt_anm
|
||||
93 Trl_Cmbt_Atk_Swing_Lft_anm
|
||||
94 Trl_Cmbt_Atk_Swing_Rht_anm
|
||||
95 Trl_Cmbt_Atk_Swipe_anm
|
||||
96 Trl_Cmbt_Atk_Swipe_Lft_180_anm
|
||||
97 Trl_Cmbt_Atk_Swipe_Lft_90_anm
|
||||
98 Trl_Cmbt_Atk_Swipe_Rht_90_anm
|
||||
99 Trl_Cmbt_Atk_Tantrum_01_anm
|
||||
100 Trl_Cmbt_Atk_Tantrum_02_anm
|
||||
101 Trl_Cmbt_Idle_01_anm
|
||||
102 Trl_Cmbt_idle_01_Face_anm
|
||||
103 Trl_Cmbt_Jog_Loop_Fwd_anm
|
||||
104 Trl_Cmbt_Jog_Start_Fwd_anm
|
||||
105 Trl_Cmbt_Jog_Turn_Start_Lft_135_anm
|
||||
106 Trl_Cmbt_Jog_Turn_Start_Lft_180_anm
|
||||
107 Trl_Cmbt_Jog_Turn_Start_Lft_45_anm
|
||||
108 Trl_Cmbt_Jog_Turn_Start_Lft_90_anm
|
||||
109 Trl_Cmbt_Jog_Turn_Start_Rht_135_anm
|
||||
110 Trl_Cmbt_Jog_Turn_Start_Rht_180_anm
|
||||
111 Trl_Cmbt_Jog_Turn_Start_Rht_45_anm
|
||||
112 Trl_Cmbt_Jog_Turn_Start_Rht_90_anm
|
||||
113 Trl_Cmbt_LF_Idle_Turn_Lft_135_anm
|
||||
114 Trl_Cmbt_LF_Idle_Turn_Lft_180_anm
|
||||
115 Trl_Cmbt_LF_Idle_Turn_Lft_45_anm
|
||||
116 Trl_Cmbt_LF_Idle_Turn_Lft_90_anm
|
||||
117 Trl_Cmbt_LF_Idle_Turn_Rht_135_anm
|
||||
118 Trl_Cmbt_LF_Idle_Turn_Rht_180_anm
|
||||
119 Trl_Cmbt_LF_Idle_Turn_Rht_45_anm
|
||||
120 Trl_Cmbt_LF_Idle_Turn_Rht_90_anm
|
||||
121 Trl_Cmbt_Look_Lft_anm
|
||||
122 Trl_Cmbt_Look_Rht_anm
|
||||
123 Trl_Cmbt_OverHead_Slam_Taunt_01_anm
|
||||
124 Trl_Cmbt_OverHead_Slam_Taunt_02_anm
|
||||
125 Trl_Cmbt_Rct_Death_01_Face_anm
|
||||
126 Trl_Cmbt_Rct_Death_02_Face_anm
|
||||
127 Trl_Cmbt_Rct_Flinch_Charge_anm
|
||||
128 Trl_Cmbt_Rct_Hit_01_Face_anm
|
||||
129 Trl_Cmbt_Rct_Hit_02_Face_anm
|
||||
130 Trl_Cmbt_Rct_Hit_03_Face_anm
|
||||
131 Trl_Cmbt_Rct_Mandrake_Loop_anm
|
||||
132 Trl_Cmbt_Rct_Mandrake_Start_anm
|
||||
133 Trl_Cmbt_Rct_Mandrake_Stop_anm
|
||||
134 Trl_Cmbt_Roar_01_Face_anm
|
||||
135 Trl_Cmbt_Roar_02_Face_anm
|
||||
136 Trl_Cmbt_Roar_03_Face_anm
|
||||
137 Trl_Cmbt_Spawn_Ink_02_anm
|
||||
138 Trl_Cmbt_Spawn_Ink_anm
|
||||
139 Trl_Cmbt_Spwn_Breakthrough_01_anm
|
||||
140 Trl_Cmbt_Spwn_Breakthrough_02_anm
|
||||
141 Trl_Cmbt_Taunt_Fwd_05_anm
|
||||
142 Trl_Cmbt_Taunt_Fwd_06_anm
|
||||
143 Trl_Cmbt_Taunt_Fwd_07_anm
|
||||
144 Trl_Cmbt_Taunt_Fwd_08_anm
|
||||
145 Trl_Cmbt_Taunt_Fwd_09_anm
|
||||
146 Trl_Cmbt_Taunt_Lft_135_anm
|
||||
147 Trl_Cmbt_Taunt_Lft_180_anm
|
||||
148 Trl_Cmbt_Taunt_Lft_45_07_anm
|
||||
149 Trl_Cmbt_Taunt_Lft_90_07_anm
|
||||
150 Trl_Cmbt_Taunt_Lft_90_anm
|
||||
151 Trl_Cmbt_Taunt_Rht_135_anm
|
||||
152 Trl_Cmbt_Taunt_Rht_180_anm
|
||||
153 Trl_Cmbt_Taunt_Rht_45_07_anm
|
||||
154 Trl_Cmbt_Taunt_Rht_90_07_anm
|
||||
155 Trl_Cmbt_Taunt_Rht_90_anm
|
||||
156 Trl_Rct_Club_Face_anm
|
||||
157 Trl_Rct_Club_Face_End_anm
|
||||
158 Trl_Rct_Dazed_End_anm
|
||||
159 Trl_Rct_Dazed_Loop_anm
|
||||
160 Trl_Rct_Dazed_Start_anm
|
||||
161 Trl_Rct_Hitch_Bwd_Add_anm
|
||||
162 Trl_Rct_Hitch_Fwd_Add_anm
|
||||
163 Trl_Rct_Hitch_Lft_Add_anm
|
||||
164 Trl_Rct_Hitch_Rht_Add_anm
|
||||
165 Trl_Rct_KnckDn_Bck_anm
|
||||
166 Trl_Rct_Spell_Petrificus_Start_anm
|
||||
167 Trl_Rct_Stumble_Bck_02_anm
|
||||
168 Trl_Rct_Stumble_Bck_03_anm
|
||||
169 Trl_Rct_Stumble_Bck_04_anm
|
||||
170 Trl_Rct_Stumble_Fwd_anm
|
||||
171 Trl_Rct_Stumble_Lft_anm
|
||||
172 Trl_Rct_Stumble_Rht_anm
|
||||
173 Trl_STN_Grnd_Sleep_End_v01_anm
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
<StatInfo>
|
||||
<STAT_PLAYER HP="100" MAXHP="100" TARGETHP="0" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
|
||||
<STAT_GOBLIN HP="100" MAXHP="100" TARGETHP="0" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
|
||||
<STAT_TROLL HP="100" MAXHP="100" TARGETHP="0" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
|
||||
<StatInfo>
|
||||
<STAT_PLAYER Name="플레이어" HP="100" MAXHP="100" TARGETHP="100" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
|
||||
<STAT_GOBLIN Name="고블린 전사" HP="100" MAXHP="100" TARGETHP="100" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
|
||||
<STAT_GOBLIN_WIZARD Name="고블린 마법사" HP="100" MAXHP="100" TARGETHP="100" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
|
||||
<STAT_TROLL Name="트롤" HP="100" MAXHP="100" TARGETHP="100" MELEE="10" MAGIC="10" DEFENSE="10" SPEED="10" AGILITY="10" LEVEL="1" EXPERIENCE="10" MAX_EXPERIENCE="100" GOLD="4000"/>
|
||||
</StatInfo>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<Emart>
|
||||
<Floor ID="0" level="1">마트, 푸드코트, 의류매장</Floor>
|
||||
</Emart>
|
||||
@@ -0,0 +1,6 @@
|
||||
<StatInfo>
|
||||
<TOOLTIP Text="UI의 생일은 12월 28일 이랍니다!!"/>
|
||||
<TOOLTIP Text="호그와트 래거시의 맵툴은 세계 최강입니다."/>
|
||||
<TOOLTIP Text="버그는 사실 마법이랍니다." />
|
||||
<TOOLTIP Text="버그는 사실 마법이랍니다." />
|
||||
</StatInfo>
|
||||
Binary file not shown.
@@ -1270,7 +1270,7 @@ PS_OUT PS_Camera_LockOn(PS_IN In)
|
||||
|
||||
Color.a = tex1 * 0.3f;
|
||||
|
||||
if (g_iHover != 0)
|
||||
if (g_iHover == 0)
|
||||
{
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, maskuv);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ float g_fRimStrength;
|
||||
float g_fRimPower;
|
||||
float3 g_vRimColor;
|
||||
float4 g_TestColor;
|
||||
float3 g_vOutLineColor;
|
||||
float4 g_vOutLineColor;
|
||||
float g_fOutLineScale;
|
||||
float g_fOutLineThickness;
|
||||
float g_fOutLinePower;
|
||||
|
||||
@@ -12,10 +12,10 @@ float g_fFar;
|
||||
float g_fTime;
|
||||
float g_fDeltaU;
|
||||
float g_fDeltaV;
|
||||
float3 g_vOutLineColor;
|
||||
float4 g_vOutLineColor;
|
||||
float g_fOutLineScale;
|
||||
float g_fOutLinePower;
|
||||
float g_fOutLineThickness;
|
||||
float g_fOutLinePower;
|
||||
vector g_vCamPosition;
|
||||
uint g_iIndexU;
|
||||
uint g_iIndexV;
|
||||
@@ -178,7 +178,7 @@ VS_OUT_OUTLINE VS_MAIN_OUTLINE(VS_IN In)
|
||||
VS_OUT_OUTLINE Out;
|
||||
|
||||
vector vPosition = vector(In.vPosition, 1.f);
|
||||
vector vNormal = vector(In.vNormal, 1.f);
|
||||
vector vNormal = vector(In.vNormal, 0.f);
|
||||
vPosition.xyz += (vNormal.xyz * g_fOutLineThickness).xyz;
|
||||
|
||||
|
||||
@@ -489,15 +489,13 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
|
||||
float fNdotV = saturate(dot(vNormal, vToView));
|
||||
float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale);
|
||||
|
||||
|
||||
fRim = pow(fRim, g_fOutLinePower);
|
||||
|
||||
|
||||
Out.vOutLine = float4(g_vOutLineColor.rgb, fRim);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
0, // 서페이스 파라미터
|
||||
AI_TEXTURE_TYPE_METALNESS, // 서페이스 파라미터
|
||||
1.f);
|
||||
|
||||
return Out;
|
||||
|
||||
@@ -80,6 +80,15 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Present")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Picking")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_PhysX")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Level")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_FrameCount")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ void CCameraLockOn::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CCameraLockOn::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_MBUTTON))
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON))
|
||||
{
|
||||
m_bHover = true;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ CUnit* CInfoInstance::Get_LockOnUnit()
|
||||
{
|
||||
CUnit* pUnit = { nullptr };
|
||||
pUnit = m_pMonsterInfo->Get_LockOnUnit();
|
||||
// pUnit = m_pInfo->Get_LockOnUnit();
|
||||
// pUnit = m_pInfo->Get_LockOnInfo();
|
||||
return pUnit;
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ _bool CMonster::Get_Damage(_float fDamage)
|
||||
|
||||
_float2 CMonster::Get_Hp()
|
||||
{
|
||||
return { m_pStat->Get_Stat(ENUM_CLASS(STAT::HP)), m_pStat->Get_Stat(ENUM_CLASS(STAT::MAXHP)) };
|
||||
return { m_pStat->Get_Stat().fCurrentHp, m_pStat->Get_Stat().fMaxHp};
|
||||
}
|
||||
|
||||
HRESULT CMonster::Ready_Components(void* pArg)
|
||||
|
||||
@@ -320,6 +320,9 @@ void CGameInstance::Compute_FrameCount()
|
||||
m_fTimer_LateUpdate = Get_TimeDelta(TEXT("Timer_LateUpdate"));
|
||||
m_fTimer_DrawCall = Get_TimeDelta(TEXT("Timer_DrawCall"));
|
||||
m_fTimer_Present = Get_TimeDelta(TEXT("Timer_Present"));
|
||||
m_fTimer_Picking = Get_TimeDelta(TEXT("Timer_Picking"));
|
||||
m_fTimer_PhysX = Get_TimeDelta(TEXT("Timer_PhysX"));
|
||||
m_fTimer_Level = Get_TimeDelta(TEXT("Timer_Level"));
|
||||
m_fTimer_FrameCount = Get_TimeDelta(TEXT("Timer_FrameCount"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
@@ -331,7 +334,10 @@ void CGameInstance::Present_TimeCost() const
|
||||
+ m_fTimer_Update
|
||||
+ m_fTimer_LateUpdate
|
||||
+ m_fTimer_DrawCall
|
||||
+ m_fTimer_Present;
|
||||
+ m_fTimer_Present
|
||||
+ m_fTimer_Picking
|
||||
+ m_fTimer_PhysX
|
||||
+ m_fTimer_Level;
|
||||
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::Begin("Previous_Frame_Timer");
|
||||
@@ -352,6 +358,21 @@ void CGameInstance::Present_TimeCost() const
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Late_Update %d", int(m_fTimer_LateUpdate / fTotal * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Picking / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Picking %d", int(m_fTimer_Picking / fTotal * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_PhysX / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("PhysX %d", int(m_fTimer_PhysX / fTotal * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Level / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Level %d", int(m_fTimer_Level / fTotal * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_DrawCall / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Level_Manager.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
@@ -52,11 +52,18 @@ _uint CLevel_Manager::Get_NextLevelID()
|
||||
|
||||
void CLevel_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Level"));
|
||||
#endif // _DEBUG
|
||||
if (nullptr == m_pCurrentLevel){
|
||||
return;
|
||||
}
|
||||
|
||||
m_pCurrentLevel->Update(fTimeDelta);
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Level"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
HRESULT CLevel_Manager::Render()
|
||||
|
||||
@@ -389,6 +389,9 @@ void CPhysX_Manager::Update_Kinematic()
|
||||
|
||||
void CPhysX_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PhysX"));
|
||||
#endif // _DEBUG
|
||||
if (nullptr == m_pScene) {
|
||||
return;
|
||||
}
|
||||
@@ -403,6 +406,9 @@ void CPhysX_Manager::Update(_float fTimeDelta)
|
||||
Update_Dynamic_ActiveActors();
|
||||
//Update_Dynamic_AllActors();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PhysX"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
void CPhysX_Manager::Update_Dynamic_ActiveActors()
|
||||
{
|
||||
|
||||
@@ -45,7 +45,13 @@ HRESULT CPicking::Initialize(HWND hWnd, _uint iSizeX, _uint iSizeY)
|
||||
|
||||
void CPicking::Update()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Picking"));
|
||||
#endif // _DEBUG
|
||||
m_pGameInstance->Copy_RenderTarget(TEXT("Target_Depth"), m_pTexture2D);
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Picking"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
_bool CPicking::isPicking(_float3* pOut)
|
||||
{
|
||||
|
||||
@@ -3,73 +3,71 @@
|
||||
#include "StatEvent.h"
|
||||
|
||||
CStat::CStat(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CComponent{ pDevice, pContext }
|
||||
: CComponent{ pDevice, pContext }
|
||||
, m_UnitInfo{}
|
||||
{
|
||||
ZeroMemory(m_StatArr, sizeof(m_StatArr));
|
||||
}
|
||||
|
||||
CStat::CStat(const CStat& rhs)
|
||||
: CComponent(rhs)
|
||||
: CComponent(rhs)
|
||||
, m_UnitInfo(rhs.m_UnitInfo)
|
||||
{
|
||||
ZeroMemory(m_StatArr, sizeof(m_StatArr));
|
||||
|
||||
memcpy_s(m_StatArr, sizeof(m_StatArr), rhs.m_StatArr, sizeof(m_StatArr));
|
||||
memcpy_s(m_ConditionArr, sizeof(m_ConditionArr), rhs.m_ConditionArr, sizeof(m_ConditionArr));
|
||||
}
|
||||
|
||||
HRESULT CStat::Initialize_Prototype(tinyxml2::XMLNode* pChild)
|
||||
{
|
||||
auto pElement = pChild->ToElement();
|
||||
pElement->QueryFloatAttribute("HP", &m_StatArr[ENUM_CLASS(STAT::HP)]);
|
||||
pElement->QueryFloatAttribute("MAXHP", &m_StatArr[ENUM_CLASS(STAT::MAXHP)]);
|
||||
pElement->QueryFloatAttribute("MELEE", &m_StatArr[ENUM_CLASS(STAT::MELEE)]);
|
||||
pElement->QueryFloatAttribute("MAGIC", &m_StatArr[ENUM_CLASS(STAT::MAGIC)]);
|
||||
pElement->QueryFloatAttribute("DEFENSE", &m_StatArr[ENUM_CLASS(STAT::DEFENSE)]);
|
||||
pElement->QueryFloatAttribute("SPEED", &m_StatArr[ENUM_CLASS(STAT::SPEED)]);
|
||||
pElement->QueryFloatAttribute("AGILITY", &m_StatArr[ENUM_CLASS(STAT::AGILITY)]);
|
||||
pElement->QueryFloatAttribute("LEVEL", &m_StatArr[ENUM_CLASS(STAT::LEVEL)]);
|
||||
pElement->QueryFloatAttribute("EXPERIENCE", &m_StatArr[ENUM_CLASS(STAT::EXPERIENCE)]);
|
||||
pElement->QueryFloatAttribute("MAX_EXPERIENCE", &m_StatArr[ENUM_CLASS(STAT::MAX_EXPERIENCE)]);
|
||||
pElement->QueryFloatAttribute("GOLD", &m_StatArr[ENUM_CLASS(STAT::GOLD)]);
|
||||
memset(m_ConditionArr, 0, sizeof(m_ConditionArr));
|
||||
auto pElement = pChild->ToElement();
|
||||
m_UnitInfo.pUnit_Name = CMyTools::ToWstring(pElement->Attribute("Name"));
|
||||
pElement->QueryFloatAttribute("HP", &m_UnitInfo.fCurrentHp);
|
||||
pElement->QueryFloatAttribute("MAXHP", &m_UnitInfo.fMaxHp);
|
||||
pElement->QueryFloatAttribute("TARGETHP", &m_UnitInfo.fTargetHp);
|
||||
pElement->QueryFloatAttribute("MELEE", &m_UnitInfo.fMelee);
|
||||
pElement->QueryFloatAttribute("MAGIC", &m_UnitInfo.fMagic);
|
||||
pElement->QueryFloatAttribute("DEFENSE", &m_UnitInfo.fDefense);
|
||||
pElement->QueryFloatAttribute("SPEED", &m_UnitInfo.fSpeed);
|
||||
pElement->QueryFloatAttribute("AGILITY", &m_UnitInfo.fAgility);
|
||||
pElement->QueryIntAttribute("LEVEL", &m_UnitInfo.iLevel);
|
||||
pElement->QueryFloatAttribute("EXPERIENCE", &m_UnitInfo.fExprince);
|
||||
pElement->QueryFloatAttribute("MAX_EXPERIENCE", &m_UnitInfo.fMaxExprience);
|
||||
pElement->QueryIntAttribute("GOLD", &m_UnitInfo.iGold);
|
||||
|
||||
return S_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CStat::Initialize(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CStat* CStat::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, tinyxml2::XMLNode* pChild)
|
||||
{
|
||||
CStat* pInstance = new CStat(pDevice, pContext);
|
||||
CStat* pInstance = new CStat(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype(pChild)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CStat");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
if (FAILED(pInstance->Initialize_Prototype(pChild)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CStat");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CComponent* CStat::Clone(void* pArg, class CGameObject* pOwner)
|
||||
{
|
||||
CStat* pInstance = new CStat(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CStat");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
CStat* pInstance = new CStat(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CStat");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CStat::Free()
|
||||
{
|
||||
__super::Free();
|
||||
__super::Free();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -80,49 +78,124 @@ void CStat::Describe_Entity()
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
_float CStat::Get_Stat(_int _iStatIndex)
|
||||
CStat::UNITINFO CStat::Get_Stat()
|
||||
{
|
||||
return m_StatArr[_iStatIndex];
|
||||
return m_UnitInfo;
|
||||
}
|
||||
|
||||
void CStat::Set_Stat(_int _iStatIndex, _float _iAmount)
|
||||
{
|
||||
m_StatArr[_iStatIndex] = _iAmount;
|
||||
|
||||
switch (_iStatIndex)
|
||||
{
|
||||
case 1:
|
||||
m_UnitInfo.fCurrentHp = _iAmount;
|
||||
break;
|
||||
case 2:
|
||||
m_UnitInfo.fMaxHp = _iAmount;
|
||||
break;
|
||||
case 3:
|
||||
m_UnitInfo.fTargetHp = _iAmount;
|
||||
break;
|
||||
case 4:
|
||||
m_UnitInfo.fMelee = _iAmount;
|
||||
break;
|
||||
case 5:
|
||||
m_UnitInfo.fMagic = _iAmount;
|
||||
break;
|
||||
case 6:
|
||||
m_UnitInfo.fDefense = _iAmount;
|
||||
break;
|
||||
case 7:
|
||||
m_UnitInfo.fSpeed = _iAmount;
|
||||
break;
|
||||
case 8:
|
||||
m_UnitInfo.fAgility = _iAmount;
|
||||
break;
|
||||
case 9:
|
||||
m_UnitInfo.iLevel = static_cast<_int>(_iAmount);
|
||||
break;
|
||||
case 10:
|
||||
m_UnitInfo.fExprince = _iAmount;
|
||||
break;
|
||||
case 11:
|
||||
m_UnitInfo.fMaxExprience = _iAmount;
|
||||
break;
|
||||
case 12:
|
||||
m_UnitInfo.iGold = static_cast<_int>(_iAmount);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CStat::Add_Stat(_int _iStatIndex, _float _iAmount)
|
||||
{
|
||||
m_StatArr[_iStatIndex] += _iAmount;
|
||||
}
|
||||
|
||||
_bool CStat::Get_Condition(_uint _iConditionIndex) const
|
||||
{
|
||||
return m_ConditionArr[_iConditionIndex];
|
||||
}
|
||||
|
||||
void CStat::Set_Condition(_uint _iConditionIndex, _bool _Condition)
|
||||
{
|
||||
m_ConditionArr[_iConditionIndex] = _Condition;
|
||||
switch (_iStatIndex)
|
||||
{
|
||||
case 1:
|
||||
m_UnitInfo.fCurrentHp = _iAmount;
|
||||
break;
|
||||
case 2:
|
||||
m_UnitInfo.fMaxHp = _iAmount;
|
||||
break;
|
||||
case 3:
|
||||
m_UnitInfo.fTargetHp = _iAmount;
|
||||
break;
|
||||
case 4:
|
||||
m_UnitInfo.fMelee = _iAmount;
|
||||
break;
|
||||
case 5:
|
||||
m_UnitInfo.fMagic = _iAmount;
|
||||
break;
|
||||
case 6:
|
||||
m_UnitInfo.fDefense = _iAmount;
|
||||
break;
|
||||
case 7:
|
||||
m_UnitInfo.fSpeed = _iAmount;
|
||||
break;
|
||||
case 8:
|
||||
m_UnitInfo.fAgility = _iAmount;
|
||||
break;
|
||||
case 9:
|
||||
m_UnitInfo.iLevel = static_cast<_int>(_iAmount);
|
||||
break;
|
||||
case 10:
|
||||
m_UnitInfo.fExprince = _iAmount;
|
||||
break;
|
||||
case 11:
|
||||
m_UnitInfo.fMaxExprience = _iAmount;
|
||||
break;
|
||||
case 12:
|
||||
m_UnitInfo.iGold = static_cast<_int>(_iAmount);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CStat::Add_Hp(_float iAmount)
|
||||
{
|
||||
_float fMaxHp = Get_Stat(ENUM_CLASS(STAT::MAXHP));
|
||||
_float fCurHp = Get_Stat(ENUM_CLASS(STAT::HP));
|
||||
if (fCurHp < fMaxHp) {
|
||||
_float iNewHP = fCurHp + iAmount;
|
||||
if (iNewHP > fMaxHp) {
|
||||
iAmount = fMaxHp - fCurHp;
|
||||
}
|
||||
Add_Stat(ENUM_CLASS(STAT::HP), iAmount);
|
||||
}
|
||||
_float fMaxHp = m_UnitInfo.fMaxHp;
|
||||
_float fCurHp = m_UnitInfo.fTargetHp;
|
||||
if (fCurHp < fMaxHp) {
|
||||
_float iNewHP = fCurHp + iAmount;
|
||||
if (iNewHP > fMaxHp) {
|
||||
iAmount = fMaxHp - fCurHp;
|
||||
}
|
||||
Add_Stat(ENUM_CLASS(STAT::CURRENTHP), iAmount);
|
||||
}
|
||||
}
|
||||
|
||||
_bool CStat::Get_Damage(_float fDamage)
|
||||
{
|
||||
_bool bResultDead = { false };
|
||||
_float fCurHp = Get_Stat(ENUM_CLASS(STAT::HP)) - fDamage;
|
||||
if (fCurHp <= 0) { fCurHp = 0; bResultDead = true; }
|
||||
Set_Stat(ENUM_CLASS(STAT::HP), fCurHp);
|
||||
return bResultDead;
|
||||
_bool bResultDead = { false };
|
||||
_float fCurHp = Get_Stat().fCurrentHp - fDamage;
|
||||
Set_Stat(ENUM_CLASS(STAT::TARGETHP), fDamage);
|
||||
if (fCurHp <= 0) { fCurHp = 0; bResultDead = true; }
|
||||
Set_Stat(ENUM_CLASS(STAT::CURRENTHP), fCurHp);
|
||||
return bResultDead;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ void CUIObject::Update(_float fTimeDelta)
|
||||
//m_vScale = _float3(m_fSizeX, m_fSizeY, 1.f);
|
||||
//m_pTransformCom->Set_Scale(m_vScale);
|
||||
|
||||
//m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f, -m_fY + m_fWinSizeY * 0.5f, 0.f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f, -m_fY + m_fWinSizeY * 0.5f, m_fSortZ, 1.f));
|
||||
|
||||
//m_fCurrent_Position = XMVectorSet(m_fX, m_fY, m_fSortZ, 1.f);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ enum class RENDER {PRIORITY, SHADOW, NONBLEND, DECAL, BLUR, NONLIGHT, EFFECT ,BL
|
||||
enum class RAY { LOCAL, WORLD, END };
|
||||
enum class ACTOR { BOX, CAPSULE, SPHERE, PLANE, TRIANGLEMESH, HEIGHTFIELD, END };
|
||||
enum class BLEND_BONE{SPINE,SHOULDER_L,SHOULDER_R,NECK,SHOULDER_NECK_L, SHOULDER_NECK_R,END};
|
||||
enum class STAT { HP, MAXHP, MELEE, MAGIC, DEFENSE, SPEED, AGILITY, LEVEL, EXPERIENCE, MAX_EXPERIENCE, GOLD, END };
|
||||
enum class CONDITION { POISON, HPREGENERATION, PANIC, GRAP, END };
|
||||
enum class STAT { NAME, CURRENTHP, MAXHP, TARGETHP, MELEE, MAGIC, DEFENSE, SPEED, AGILITY, LEVEL, EXPERIENCE, MAX_EXPERIENCE, GOLD, END };
|
||||
//enum class CONDITION { POISON, HPREGENERATION, PANIC, GRAP, END };
|
||||
|
||||
|
||||
enum class TEXTURE_LOAD_TYPE {
|
||||
|
||||
@@ -35,6 +35,7 @@ enum ESTATE : _u64Flag
|
||||
BLINK = 1ULL << 28,
|
||||
SHUFFLE = 1ULL << 29,
|
||||
DEAD = 1ULL << 30,
|
||||
STUN = 1ULL << 31,
|
||||
END
|
||||
};
|
||||
NS_END
|
||||
|
||||
@@ -305,6 +305,9 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
_float m_fTimer_LateUpdate = { 0.f };
|
||||
_float m_fTimer_DrawCall = { 0.f };
|
||||
_float m_fTimer_Present = { 0.f };
|
||||
_float m_fTimer_Picking = { 0.f };
|
||||
_float m_fTimer_PhysX = { 0.f };
|
||||
_float m_fTimer_Level = { 0.f };
|
||||
_float m_fTimer_FrameCount = { 0.f };
|
||||
|
||||
_float2 m_vViewPortSize = {};
|
||||
|
||||
@@ -6,6 +6,22 @@ NS_BEGIN(Engine)
|
||||
|
||||
class ENGINE_DLL CStat final : public CComponent
|
||||
{
|
||||
typedef struct tagUnitInfo
|
||||
{
|
||||
_wstring pUnit_Name;
|
||||
_float fCurrentHp{};
|
||||
_float fMaxHp{};
|
||||
_float fTargetHp{};
|
||||
_float fMelee{};
|
||||
_float fMagic{};
|
||||
_float fDefense{};
|
||||
_float fSpeed{};
|
||||
_float fAgility{};
|
||||
_int iLevel{};
|
||||
_float fExprince{};
|
||||
_float fMaxExprience{};
|
||||
_int iGold{};
|
||||
}UNITINFO;
|
||||
private:
|
||||
CStat(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CStat(const CStat& rhs);
|
||||
@@ -24,18 +40,18 @@ class ENGINE_DLL CStat final : public CComponent
|
||||
#endif // _DEBUG
|
||||
|
||||
public:
|
||||
_float Get_Stat(_int _iStatIndex);
|
||||
UNITINFO Get_Stat();
|
||||
void Set_Stat(_int _iStatIndex, _float _iAmount);
|
||||
void Add_Stat(_int _iStatIndex, _float _iAmount);
|
||||
_bool Get_Condition(_uint _iConditionIndex) const;
|
||||
void Set_Condition(_uint _iConditionIndex, _bool _Condition);
|
||||
|
||||
void Add_Hp(_float iAmount);
|
||||
_bool Get_Damage(_float fDamage);
|
||||
|
||||
private:
|
||||
_float m_StatArr[ENUM_CLASS(STAT::END)];
|
||||
_bool m_ConditionArr[ENUM_CLASS(CONDITION::END)] = { false };
|
||||
UNITINFO m_UnitInfo;
|
||||
//_wstring m_pName;
|
||||
//_float m_StatArr[ENUM_CLASS(STAT::END)];
|
||||
//_bool m_ConditionArr[ENUM_CLASS(CONDITION::END)] = { false };
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
Reference in New Issue
Block a user