Merge pull request #628 from SpicyGangjeong/Develope

[Follow]
This commit is contained in:
qordlsgur
2026-01-03 11:01:35 +09:00
committed by GitHub
193 changed files with 4731 additions and 1627 deletions
+29 -1
View File
@@ -179,7 +179,7 @@ ATOM MyRegisterClass(HINSTANCE hInstance)
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
g_hInstance = hInstance;
#ifdef _DEBUG
RECT rcWindow = { 0, 0, g_iWinSizeX, g_iWinSizeY };
AdjustWindowRect(&rcWindow, WS_OVERLAPPEDWINDOW, FALSE);
@@ -196,7 +196,35 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
UpdateWindow(hWnd);
g_hWnd = hWnd;
#endif // _DEBUG
#ifdef Bin
#ifndef _DEBUG
int screenX = GetSystemMetrics(SM_CXSCREEN);
int screenY = GetSystemMetrics(SM_CYSCREEN);
HWND hWnd = CreateWindowW(
szWindowClass,
szTitle,
WS_POPUP,
0, 0,
screenX, screenY,
nullptr,
nullptr,
hInstance,
nullptr
);
if (!hWnd)
return FALSE;
g_hWnd = hWnd;
ShowWindow(hWnd, SW_SHOW);
UpdateWindow(hWnd);
#endif // !_DEBUG
#endif // Bin
return TRUE;
}
@@ -180,6 +180,7 @@ call Update_Resources.bat
<ClInclude Include="..\Public\Goblin_Sword.h" />
<ClInclude Include="..\public\InstancedProp_Light.h" />
<ClInclude Include="..\Public\Ranrok_Breath.h" />
<ClInclude Include="..\Public\Ranrok_Charge.h" />
<ClInclude Include="..\Public\Ranrok_FireBall.h" />
<ClInclude Include="..\Public\CamPosition_AI.h" />
<ClInclude Include="..\public\Dialogue.h" />
@@ -190,6 +191,7 @@ call Update_Resources.bat
<ClInclude Include="..\Public\Ranrok_Point.h" />
<ClInclude Include="..\Public\PlayerRobe.h" />
<ClInclude Include="..\Public\Player_ENUM.h" />
<ClInclude Include="..\Public\Ranrok_Pulse.h" />
<ClInclude Include="..\Public\ReparoObject.h" />
<ClInclude Include="..\Public\State_Dash.h" />
<ClInclude Include="..\Public\State_Fall.h" />
@@ -441,6 +443,7 @@ call Update_Resources.bat
<ClCompile Include="..\Private\Goblin_Sword.cpp" />
<ClCompile Include="..\private\InstancedProp_Light.cpp" />
<ClCompile Include="..\Private\Ranrok_Breath.cpp" />
<ClCompile Include="..\Private\Ranrok_Charge.cpp" />
<ClCompile Include="..\Private\Ranrok_FireBall.cpp" />
<ClCompile Include="..\Private\CamPosition_AI.cpp" />
<ClCompile Include="..\private\Dialogue.cpp" />
@@ -450,6 +453,7 @@ call Update_Resources.bat
<ClCompile Include="..\private\PointLight.cpp" />
<ClCompile Include="..\Private\Ranrok_Point.cpp" />
<ClCompile Include="..\Private\PlayerRobe.cpp" />
<ClCompile Include="..\Private\Ranrok_Pulse.cpp" />
<ClCompile Include="..\Private\ReparoObject.cpp" />
<ClCompile Include="..\Private\State_Dash.cpp" />
<ClCompile Include="..\Private\State_Fall.cpp" />
@@ -800,6 +800,12 @@
<ClInclude Include="..\public\InstancedProp_Light.h">
<Filter>02.GameObjects\Environment\02.InstancedProp\Light</Filter>
</ClInclude>
<ClInclude Include="..\Public\Ranrok_Pulse.h">
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Pulse</Filter>
</ClInclude>
<ClInclude Include="..\Public\Ranrok_Charge.h">
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Charge</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Client.ico">
@@ -1665,6 +1671,12 @@
<Filter Include="99.Define\00.DEFAULT">
<UniqueIdentifier>{05a0db73-4fbf-456c-9137-bb605c632d68}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Pulse">
<UniqueIdentifier>{0464c6ff-87b8-4a3e-bc06-c912b32a65eb}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Charge">
<UniqueIdentifier>{fd036f05-4c10-4322-b0c2-aac65e7011a1}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Client.cpp">
@@ -2412,6 +2424,12 @@
<ClCompile Include="..\private\InstancedProp_Light.cpp">
<Filter>02.GameObjects\Environment\02.InstancedProp\Light</Filter>
</ClCompile>
<ClCompile Include="..\Private\Ranrok_Pulse.cpp">
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Pulse</Filter>
</ClCompile>
<ClCompile Include="..\Private\Ranrok_Charge.cpp">
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Charge</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Private\Goblin_States.cpp">
+1 -4
View File
@@ -84,9 +84,6 @@ void CBroom::Update(_float fTimeDelta)
if(!m_pParentUnit->IsAI())
PlayerInput();
else {
m_bHoverToggle = m_Input.bHoverToggle;
m_bTurbo = m_Input.bTurbo;
m_fAITime += fTimeDelta;
_float target = 1.f + sinf(m_fAITime * 0.3f + m_fAISeed) * 0.15f;
@@ -130,7 +127,7 @@ void CBroom::Update(_float fTimeDelta)
return;
}
m_pWindEffect->Set_Visible(false);
m_pWindEffect->Set_Visible(true);
m_pWindEffect->Get_Component<CInstance_Model>()->Set_TimeMult(0.5f + m_fSpeed / 20.f);
m_pWindEffect->Get_Effect_Info()->fBlurIntensity = m_fSpeed / 30.f;
@@ -78,8 +78,6 @@ void CBroomRaceManager::Update(_float fTimeDelta)
}
}
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
@@ -88,7 +86,6 @@ void CBroomRaceManager::Update(_float fTimeDelta)
void CBroomRaceManager::Late_Update(_float fTimeDelta)
{
__super::Late_Update(fTimeDelta);
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
}
HRESULT CBroomRaceManager::Render()
@@ -165,6 +162,18 @@ void CBroomRaceManager::Describe_Entity()
m_eRaceState = ENUM_CLASS(RACE_STATE::READY);
const _float SPAWN_DISTANCE = 80.f;
if (FAILED(Load_RaceRing()))
{
MSG_BOX("Failed Load RaceRing");
}
for (_uint i = 0; i < 3; i++)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroomRacerAI>(g_iStaticLevel, NEXT_LEVEL, LAYER_RACERAI, this)))
return;
}
m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_PLAYER)->Get_Object<CPlayer>()->Set_RaceInfo();
for (auto& racer : m_Racers)
{
CTransform* pRingTransform =
@@ -178,20 +187,20 @@ void CBroomRaceManager::Describe_Entity()
if (racer.pAI)
{
CTransform* pBroomTransform =
racer.pAI->Get_Broom()->Get_Component<CTransform>();
CTransform* pTransform =
racer.pAI->Get_Component<CTransform>();
_float fRand = m_pGameInstance->Real_Random_Float(-10.f, 10.f);
spawnPos.m128_f32[2] += fRand;
spawnPos.m128_f32[0] += fRand;
pTransform->Set_State(STATE::POSITION, spawnPos);
pTransform->LookAt(pRingTransform->Get_State(STATE::POSITION));
pBroomTransform->Set_State(STATE::POSITION, spawnPos);
pBroomTransform->LookAt(pRingTransform->Get_State(STATE::POSITION));
racer.pAI->Get_Broom()->Set_Move(false);
}
else if (racer.pRacer)
{
CTransform* pTransform =
racer.pRacer->Get_Component<CTransform>();
spawnPos.m128_f32[1] -= 2.f;
pTransform->Set_State(STATE::POSITION, spawnPos);
pTransform->LookAt(pRingTransform->Get_State(STATE::POSITION));
racer.pRacer->Get_Component<CFSM>()->Change_State(FSMSTATE::BROOM_RIDE);
@@ -328,13 +337,13 @@ void CBroomRaceManager::SetTargetRing(CGameObject* pRacer)
{
if (racer.pAI == pRacer)
{
if (racer.curRing == m_pRaceRings.size() - 1 ) {
racer.pAI->Get_Broom()->Set_Hover(true);
racer.pAI->Get_Broom()->Set_Move(false);
}
if (racer.pAI)
{
if (racer.curRing == m_pRaceRings.size() - 1)
{
racer.pAI->Get_Broom()->Set_Hover(true);
racer.pAI->Get_Broom()->Set_Move(false);
}
racer.pAI->Set_RaceRing(m_pRaceRings[racer.curRing]);
}
}
@@ -343,16 +352,16 @@ void CBroomRaceManager::SetTargetRing(CGameObject* pRacer)
{
if (racer.pRacer == pRacer)
{
if (racer.curRing == m_pRaceRings.size() - 1)
{
if (racer.curRing == m_pRaceRings.size() - 1) {
racer.pRacer->Get_Broom()->Set_Hover(true);
racer.pRacer->Get_Broom()->Set_Move(false);
}
racer.pRacer->Set_RaceRing(m_pRaceRings[racer.curRing]);
m_pInfoInstance->Event_CallBack(TEXT("CurrentRing"));
m_iLastRing++;
}
}
m_iLastRing++;
}
}
@@ -379,3 +388,73 @@ void CBroomRaceManager::Push_RaceRing(CRaceRing* Ring)
SAFE_ADDREF(Ring);
}
HRESULT CBroomRaceManager::Load_RaceRing()
{
tinyxml2::XMLDocument xmlDoc;
string strPath = "../Bin/Resources/Data/Map/RaceRing/RaceRing_Data.xml";
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
return E_FAIL;
tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Ring");
if (nullptr == root)
{
MSG_BOX("Failed to Find root");
return S_OK;
}
//for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
//{
// CRaceRing::RACERING_DESC Desc = {};
// Desc.pBroomRaceManager = this;
// /* Transform */
// auto* Rotation = Object->FirstChildElement("Scale");
// Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
// Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
// Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
// auto* Scale = Object->FirstChildElement("Rotation");
// Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
// Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
// Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
// auto* Position = Object->FirstChildElement("Position");
// Position->QueryFloatAttribute("x", &Desc.vPosition.x);
// Position->QueryFloatAttribute("y", &Desc.vPosition.y);
// Position->QueryFloatAttribute("z", &Desc.vPosition.z);
// if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRaceRing>(g_iStaticLevel, NEXT_LEVEL, LAYER_RING, &Desc)))
// return E_FAIL;
//}
CRaceRing::RACERING_DESC Desc = {};
Desc.pBroomRaceManager = this;
/* Transform */
auto* Rotation = root->FirstChildElement("Object")->FirstChildElement("Scale");
Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
auto* Scale = root->FirstChildElement("Object")->FirstChildElement("Rotation");
Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
auto* Position = root->FirstChildElement("Object")->FirstChildElement("Position");
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRaceRing>(g_iStaticLevel, NEXT_LEVEL, LAYER_RING, &Desc)))
return E_FAIL;
return S_OK;
}
@@ -59,7 +59,7 @@ HRESULT CBroomRacerAI::Initialize(void* pArg)
Add_FSM();
Load_AnimXML("../Bin/Resources/Data/AnimList/RacerAI.xml");
Load_AnimXML("../Bin/Resources/Data/AnimList/BroomRacerAI.xml");
{
CFSM::FSM_DESC FSMDesc{};
@@ -116,8 +116,6 @@ HRESULT CBroomRacerAI::Initialize(void* pArg)
void CBroomRacerAI::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
}
void CBroomRacerAI::Update(_float fTimeDelta)
@@ -737,8 +735,6 @@ void CBroomRacerAI::Add_FSM()
}
void CBroomRacerAI::Set_Input(_float fTimeDelta)
{
_float targetX = ComputeTurnToRing();
@@ -750,12 +746,12 @@ void CBroomRacerAI::Set_Input(_float fTimeDelta)
InputDesc.Y = 0.f;
InputDesc.Z = 0.f;
/*if (m_bMove)
{*/
if (m_pBroom->Get_Move())
{
InputDesc.Z = 1.f;
InputDesc.X = targetX*m_TurnGain;
InputDesc.Y = targetY*m_HeightGain;
//}
}
InputDesc.bHoverToggle = (m_pBroomRaceManager->Get_RaceState() != ENUM_CLASS(CBroomRaceManager::RACE_STATE::RACING));
@@ -205,12 +205,10 @@ HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta)
m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
return S_OK;
}
if (m_bHoverToggle)
{
_float fTargetVertSpeed = 0.f;
@@ -447,20 +445,20 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
{
if (vInput.z <= 0.f)
{
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.4f);
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
}
else {
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.2f);
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.3f);
}
}
else if (vInput.x > 0.f)
{
if (vInput.z <= 0.f)
{
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.4f);
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.5f);
}
else {
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.2f);
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.3f);
}
}
@@ -75,13 +75,27 @@ void CCallBack_Playable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& h
case PXOBJECT::DOOR:
{
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
_float fDot = vDir.dot(PSX::PxVec3(0.f, 1.f, 0.f));
if (fDot > 0) {
pDynamic->addTorque(PSX::PxVec3(0.f, 1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE);
if (pDynamic->getRigidBodyFlags().isSet(PSX::PxRigidBodyFlag::eKINEMATIC)){
pDynamic->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
}
else {
pDynamic->addTorque(PSX::PxVec3(0.f, -1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE);
pDynamic->wakeUp();
PSX::PxVec3 vCompressedDir = hit.dir;
if (vCompressedDir.magnitudeSquared() < FLT_EPSILON5) {
vCompressedDir = -hit.worldNormal;
}
vCompressedDir.normalize();
PSX::PxVec3 hingeAxis = PSX::PxVec3(0.f, 1.f, 0.f);
PSX::PxVec3 vForceDir = vCompressedDir - hingeAxis * vCompressedDir.dot(hingeAxis);
if (vForceDir.magnitudeSquared() < FLT_EPSILON5){
break;
}
vForceDir.normalize();
float forceMagnitude = PSX::PxClamp(fLength * 600.f, 0.f, 2000.f);
PSX::PxRigidBodyExt::addForceAtPos(*pDynamic, vForceDir * forceMagnitude, { (_float)hit.worldPos.x, (_float)hit.worldPos.y, (_float)hit.worldPos.z }, PSX::PxForceMode::eFORCE);
pTargetActorData->pOwner->OnCollision();
} break;
default:
{
@@ -37,14 +37,10 @@ HRESULT CEffectObject::Render()
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
{
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(m_EffectInfo.eShaderPass)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture")))
return E_FAIL;
if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
return E_FAIL;
@@ -100,10 +96,11 @@ HRESULT CEffectObject::Render_Blur()
}
}
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::DEFAULT_NONPOS)
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::DEFAULT_NONPOS
|| m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONWB_NONPOS)
BlurPass = SHADER_PASS_INSTANCE_MODEL::NONPOS_BLUR;
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::WB_CULLING)
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::WB_CULLING || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::BLEND_CULLING)
{
if (m_EffectInfo.isBlurNoEmissive == false)
{
@@ -122,7 +119,6 @@ HRESULT CEffectObject::Render_Blur()
}
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
{
+24 -2
View File
@@ -45,6 +45,8 @@
#include "Ranrok_FireBall.h"
#include "Ranrok_Breath.h"
#include "Ranrok_Point.h"
#include "Ranrok_Pulse.h"
#include "Ranrok_Charge.h"
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -87,8 +89,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
m_isActiveMonsterEffectCreate = true;
#endif //
#ifdef 기무리
m_isActiveEffectCreate = true;
m_isActiveMonsterEffectCreate = true;
m_isActiveEffectCreate = false;
m_isActiveMonsterEffectCreate = false;
#endif //
#ifdef 나
m_isActiveEffectCreate = false;
@@ -592,6 +594,26 @@ HRESULT CEffectPool::Ready_MonsterEffect()
return pEffect; }
))) return E_FAIL;
if (FAILED(Create_Effect(SKILL_TYPE::RANROK_PURSE, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
CRanrok_Pulse* pEffect = nullptr;
pEffect = m_pGameInstance->Clone_Prototype<CRanrok_Pulse>(iPrototypeLevel, nullptr);
return pEffect; }
))) return E_FAIL;
if (FAILED(Create_Effect(SKILL_TYPE::RANROK_CHARGE, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
CRanrok_Charge* pEffect = nullptr;
pEffect = m_pGameInstance->Clone_Prototype<CRanrok_Charge>(iPrototypeLevel, nullptr);
return pEffect; }
))) return E_FAIL;
+1 -1
View File
@@ -580,7 +580,7 @@ void CGoblin::Free()
void CGoblin::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
if (GUI::CollapsingHeader("Goblin")) {
GUI::Checkbox("LookAt", &m_bLookAt);
@@ -64,7 +64,7 @@ HRESULT CGoblin_Assassin::Initialize(void* pArg)
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
SAFE_ADDREF(m_pEffectPool);
m_pModelCom->Set_Temp(true);
m_pModelCom->Set_DisableRootMotionScale(true);
return S_OK;
}
@@ -661,7 +661,7 @@ void CGoblin_Assassin::Free()
void CGoblin_Assassin::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
if (GUI::CollapsingHeader("Goblin")) {
GUI::Checkbox("LookAt", &m_bLookAt);
@@ -356,7 +356,7 @@ void CGoblin_Assassin_Spector::Free()
void CGoblin_Assassin_Spector::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
if (GUI::CollapsingHeader("GoblinSpector")) {
_float3 vScale = m_pTransformCom->Get_Scale();
GUI::DragFloat3("Scale", (_float*)&vScale);
@@ -518,7 +518,7 @@ void CGoblin_Mage::Free()
void CGoblin_Mage::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
if (GUI::CollapsingHeader("Goblin_Mage")) {
GUI::Checkbox("LookAt", &m_bLookAt);
@@ -337,7 +337,7 @@ void CGoblin_Spector::Free()
void CGoblin_Spector::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
if (GUI::CollapsingHeader("GoblinSpector")) {
_float3 vScale = m_pTransformCom->Get_Scale();
GUI::DragFloat3("Scale", (_float*)&vScale);
@@ -94,13 +94,9 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
return E_FAIL;
}
if (FAILED(Ready_Layer_RaceRing(TEXT("Layer_RaceRing")))) {
return E_FAIL;
}
if (FAILED(Ready_Layer_ReparoObject(TEXT("Layer_ReparoObject")))) {
return E_FAIL;
}
//if (FAILED(Ready_Layer_ReparoObject(TEXT("Layer_ReparoObject")))) {
// return E_FAIL;
//}
if (FAILED(Ready_Layer_SkyBox(TEXT("Layer_SkyBox")))) {
return E_FAIL;
@@ -108,9 +104,6 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) {
return E_FAIL;
}
if (FAILED(Ready_Layer_BroomRacerAI(TEXT("Layer_BroomRacerAI")))) {
return E_FAIL;
}
if (FAILED(Ready_Layer_Monster())) {
return E_FAIL;
}
@@ -325,8 +318,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
#ifdef gimch
isReady_Background = true;
isReady_Hogsmeade = true;
isReady_Hogwart = false;
isReady_Hogsmeade = false;
isReady_Hogwart = true;
#endif // gimch
#ifdef Bin
isReady_Background = false;
@@ -340,8 +333,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
#endif //
#ifdef 기무리
isReady_Background = true;
isReady_Hogsmeade = false;
isReady_Hogwart = false;
isReady_Hogsmeade = true;
isReady_Hogwart = true;
#endif //
#ifdef 나
isReady_Background = true;
@@ -689,13 +682,13 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
#endif //
#ifdef 기무리
isLoad_NPC = false;
isLoad_NPC = true;
#endif //
#ifdef 나
#endif //
#ifdef Bin
isLoad_NPC = false;
#endif // Bin
#endif // _DEBUG
@@ -721,37 +714,11 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
return S_OK;
}
HRESULT CLevel_GamePlay::Ready_Layer_BroomRacerAI(const _wstring& strLayerTag)
{
#ifdef Bin
for (_uint i = 0; i < 0; ++i) {
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroomRacerAI>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, m_pBroomRaceManager))) {
return E_FAIL;
}
}
#endif // Bin
return S_OK;
}
HRESULT CLevel_GamePlay::Ready_Layer_Item(const _wstring& strLayerTag)
{
return S_OK;
}
HRESULT CLevel_GamePlay::Ready_Layer_RaceRing(const _wstring& strLayerTag)
{
for (_uint i = 0; i < 1; ++i) {
CRaceRing::RACERING_DESC RaceRingDesc{};
RaceRingDesc.pBroomRaceManager = m_pBroomRaceManager;
RaceRingDesc.iIndex = i;
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRaceRing>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &RaceRingDesc))) {
return E_FAIL;
}
}
return S_OK;
}
HRESULT CLevel_GamePlay::Ready_Layer_ReparoObject(const _wstring& strLayerTag)
{
@@ -781,10 +748,10 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
#endif // gimch
#ifdef 진우
isLoad_Monster = true;
#endif //
#ifdef 기무리
isLoad_Monster = false;
isLoad_Monster = true;
#endif //
#ifdef 나
+115 -20
View File
@@ -1,4 +1,5 @@
#include "pch.h"
#pragma region HEADER
#include "pch.h"
#include "Camera_Debug.h"
#include "Client_Struct.h"
#include "GameInstance.h"
@@ -196,6 +197,8 @@
#include "Ranrok_FireBall.h"
#include "Ranrok_Breath.h"
#include "Ranrok_Point.h"
#include "Ranrok_Charge.h"
#include "Ranrok_Pulse.h"
#include "StunEffect.h"
#include "Box_Splesh.h"
@@ -234,7 +237,7 @@
#pragma endregion
#pragma endregion
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: m_pDevice{ pDevice }
, m_pContext{ pContext }
@@ -374,8 +377,8 @@ HRESULT CLoader::Loading_For_GamePlay()
#ifdef _DEBUG
#ifdef gimch
isLoad_Background = true;
isLoad_Hogwart = false;
isLoad_Background = false;
isLoad_Hogwart = true;
isLoad_UI_SEQUANTIAL = false;
#endif // gimch
#ifdef 진우
@@ -385,10 +388,10 @@ HRESULT CLoader::Loading_For_GamePlay()
#endif //
#ifdef 기무리
isLoad_Background = true;
isLoad_Hogwart = false;
isLoad_UI_SEQUANTIAL = false;
isLoad_NPC = false;
isLoad_Monster = false;
isLoad_Hogwart = true;
isLoad_UI_SEQUANTIAL = true;
isLoad_NPC = true;
isLoad_Monster = true;
#endif //
#ifdef 나
isLoad_Background = true;
@@ -1581,6 +1584,52 @@ HRESULT CLoader::Loading_For_GamePlay()
});
Asset_FileLoad("../Bin/Resources/Textures/Effect/Nomal", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
_string strFilePath = pFilePath;
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
return E_FAIL;
}
return S_OK;
});
Asset_FileLoad("../Bin/Resources/Textures/Effect/Decal", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
_string strFilePath = pFilePath;
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
return E_FAIL;
}
return S_OK;
});
Asset_FileLoad("../Bin/Resources/Textures/Effect/DecalNormal", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
_string strFilePath = pFilePath;
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
return E_FAIL;
}
return S_OK;
});
#pragma endregion
@@ -1751,13 +1800,32 @@ HRESULT CLoader::Loading_For_GamePlay()
Desc.fDensity = 0.01f;
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
Desc.eLockFlag = {};
Desc.vAutoDamping = { 12.f, 12.f };
Desc.vAutoDamping = { 12.f, 120.f };
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
}
{
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
Desc.eType = ACTOR::SPHERE;
Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
Desc.vMatInfo = { 0.5f, 0.5f, 0.001f };
Desc.fContactOffset = { 0.005f };
Desc.vhalfGeometryInfo = { 0.75f, 0.25f, 0.25f };
Desc.fDensity = 0.01f;
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
Desc.eLockFlag = {};
Desc.vAutoDamping = { 1200.f, 1200.f };
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
Desc.vLocalTranslation = { 0.f, 1.0f, 0.f };
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_NPC_HITBOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
}
{
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
Desc.eType = ACTOR::CAPSULE;
@@ -1770,7 +1838,7 @@ HRESULT CLoader::Loading_For_GamePlay()
Desc.fDensity = 0.01f;
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
Desc.eLockFlag = {};
Desc.vAutoDamping = { 12.f, 12.f };
Desc.vAutoDamping = { 12.f, 120.f };
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
@@ -1785,7 +1853,7 @@ HRESULT CLoader::Loading_For_GamePlay()
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
Desc.vMatInfo = { 0.5f, 0.5f, 0.01f };
Desc.fContactOffset = { 0.01f };
Desc.vhalfGeometryInfo = { 0.12f, 0.25f, 0.f };
Desc.vhalfGeometryInfo = { 0.06f, 0.25f, 0.f };
Desc.fDensity = 122.f;
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
Desc.eLockFlag = {};
@@ -1796,6 +1864,25 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
}
{
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
Desc.eType = ACTOR::SPHERE;
Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
Desc.vMatInfo = { 0.01f, 0.01f, 0.01f };
Desc.fContactOffset = { 0.01f };
Desc.vhalfGeometryInfo = { 0.120f, 0.460f, 0.010f };
Desc.fDensity = 100.f;
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
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 };
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
}
{
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DynamicJoint"), CDynamic_D6Joint::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
@@ -1858,25 +1945,25 @@ HRESULT CLoader::Loading_For_GamePlay()
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
{
Desc.eType = ACTOR::BOX;
Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ };
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
Desc.vMatInfo = { 0.5f, 0.5f, 0.6f };
Desc.vMatInfo = { 0.5f, 0.5f, 0.1f };
Desc.fContactOffset = { 0.05f };
Desc.vhalfGeometryInfo = { 0.35f, 0.65f, 0.15f };
Desc.vhalfGeometryInfo = { 0.5f, 1.f, 0.125f };
Desc.fDensity = 1.f;
PSX::PxTransform pxPivotTransform = PSX::PxTransform(PSX::PxVec3(0.f, 1.f, 0.f));
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
Desc.vLocalTranslation = { 0.5f, 0.f, 0.f };
Desc.vLocalTranslation = { 0.5f, 1.375f, 0.f };
Desc.pxMassCenter = pxPivotTransform;
Desc.eLockFlag = {
PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_X |
//PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_X |
//PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Y |
PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Z |
PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Y |
PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_X |
PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Z
//PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Z |
//PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Y |
//PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_X |
//PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Z
};
Desc.vAutoDamping = { 10.f, 10.f };
}
@@ -2179,6 +2266,14 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok_Pulse>(g_iStaticLevel, CRanrok_Pulse::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok_Charge>(g_iStaticLevel, CRanrok_Charge::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Teleport>(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
+5 -5
View File
@@ -69,7 +69,7 @@ void CMainApp::Update(_float fTimeDelta)
#ifdef _DEBUG
m_pGameInstance->Present_TimeCost();
GUI::Begin("SYSTEM", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
GUI::SliderFloat("fTimeMult", &g_fTimeMult, 0.01f, 4.f);
GUI::End();
m_pGameInstance->Update_Engine(fTimeDelta * g_fTimeMult);
@@ -222,13 +222,13 @@ HRESULT CMainApp::Ready_Prototypes()
HRESULT CMainApp::Ready_IMGUI()
{
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
GUI::CreateContext();
ImGuiIO& io = GUI::GetIO(); (void)io;
ImFont* font = nullptr;
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
ImGui::StyleColorsDark();
GUI::StyleColorsDark();
ImGui_ImplWin32_Init(g_hWnd);
ImGui_ImplDX11_Init(m_pDevice, m_pContext);
@@ -255,7 +255,7 @@ HRESULT CMainApp::Release_IMGUI()
{
ImGui_ImplDX11_Shutdown();
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext();
GUI::DestroyContext();
return S_OK;
}
@@ -63,6 +63,10 @@ HRESULT CMapElement_Chest::Initialize(void* pArg)
void CMapElement_Chest::Priority_Update(_float fTimeDelta)
{
m_iEntered -= 1;
if (m_iEntered < 0) {
m_iEntered = 0;
}
m_pLid->Priority_Update(fTimeDelta);
}
@@ -168,6 +172,17 @@ HRESULT CMapElement_Chest::Render()
return S_OK;
}
void CMapElement_Chest::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
{
CPlayer* pPlayer = dynamic_cast<CPlayer*>(pCaster);
if (nullptr == pPlayer) {
return;
}
if (fDistance < m_fEncounterDistance) {
m_iEntered = 4;
}
}
HRESULT CMapElement_Chest::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
+127 -131
View File
@@ -40,91 +40,59 @@ HRESULT CMapElement_Door::Initialize(void* pArg)
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
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));
XMStoreFloat4((_float4*)&m_pxStartQuat, m_pTransformCom->Get_QuarternionVector());
XMStoreFloat4x4(&m_InitialMatrix, m_pTransformCom->Get_XMWorldMatrix());
m_vRadianYAngle.y = pDesc->vRotation.z;
m_vRadianYAngle.x = m_vRadianYAngle.y + XMConvertToRadians(-70.f);
m_vRadianYAngle.z = m_vRadianYAngle.y + XMConvertToRadians(70.f);
{ // RIGID_BODY
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::DOOR);
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_DOOR"), (CComponent**)&m_pRigidBody, &Desc))) {
return E_FAIL;
}
}
m_pActor = (PSX::PxRigidDynamic*)m_pRigidBody->Get_Actor();
return S_OK;
}
void CMapElement_Door::Priority_Update(_float fTimeDelta)
{
if (m_pActor->getRigidBodyFlags() & PSX::PxRigidBodyFlag::eKINEMATIC) {
GUI::Text("m_vKinematicTimer %.3f", m_vKinematicTimer.x);
if (m_vKinematicTimer.x != 0) {
m_vKinematicTimer.x += fTimeDelta;
if (m_vKinematicTimer.x < m_vKinematicTimer.z) {
// 행렬없이 럴프 버전
_float fTime = max(0.f, ((m_vKinematicTimer.x - m_vKinematicTimer.y) / (m_vKinematicTimer.z - m_vKinematicTimer.y)));
Lerp_Matrix(fTime);
//Lerp_NonMatrix(fTime);
if (m_vKinematicTimer.y < m_vKinematicTimer.x) {
m_vKinematicTimer.x = 0.f;
}
else {
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
}
else {
ActingIdle();
}
}
void CMapElement_Door::ActingIdle()
{
_float fCurrentDegree = XMConvertToDegrees(m_pJoint->getAngle());
GUI::Text("%.2f", fCurrentDegree);
GUI::Text("%.2f", m_pJoint->getVelocity());
if (fabsf(fCurrentDegree) >= 2.f) { // 각도가 벌어져 있는데
if (false == m_bDrive) { // 드라이브 중이 아니면 드라이브시킴
m_bDrive = true;
m_pJoint->setRevoluteJointFlag(PSX::PxRevoluteJointFlag::eDRIVE_ENABLED, true);
m_pJoint->setDriveForceLimit(120.f);
}
if (true == m_bDrive) { // 드라이브 중이면
if (fCurrentDegree > 0.f) {
}
else {
m_pJoint->setDriveVelocity(40.f);
}
}
}
else { // 각도가 안벌어져 있음
if (true == m_bDrive && fCurrentDegree < 0.3f) { // 드라이브 중지 트리거
m_pJoint->setRevoluteJointFlag(PSX::PxRevoluteJointFlag::eDRIVE_ENABLED, false);
}
}
}
void CMapElement_Door::Update(_float fTimeDelta)
{
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
}
void CMapElement_Door::Late_Update(_float fTimeDelta)
{
_vector vRPY = m_pTransformCom->Get_RollPitchYawVector();
if (!(m_pActor->getRigidBodyFlags() & PSX::PxRigidBodyFlag::eKINEMATIC)) {
_float fPitch = XMVectorGetX(vRPY);
_float fYaw = XMVectorGetY(vRPY);
_float fRoll = XMVectorGetZ(vRPY);
_float fClampedYaw = ClampRadian(fYaw);
if (fClampedYaw != fYaw) {
_vector vNewQuat = XMQuaternionRotationRollPitchYaw(fPitch, fClampedYaw, fRoll);
PSX::PxTransform actorPose = m_pActor->getGlobalPose();
PSX::PxTransform massLocalPose = m_pActor->getCMassLocalPose();
PSX::PxVec3 vpxMassLocal = massLocalPose.p;
PSX::PxVec3 vpxMassWorld = actorPose.transform(vpxMassLocal);
_vector vMassLocal = XMVectorSet(vpxMassLocal.x, vpxMassLocal.y, vpxMassLocal.z, 0.f);
_vector vMassWorld = XMVectorSet(vpxMassWorld.x, vpxMassWorld.y, vpxMassWorld.z, 1.f);
_float3 vScale = m_pTransformCom->Get_Scale();
_matrix ScaleMatrix = XMMatrixScalingFromVector(XMLoadFloat3(&vScale));
_matrix RotationMatrix = XMMatrixRotationQuaternion(vNewQuat);
_matrix TranslationLocal = XMMatrixTranslationFromVector(-vMassLocal);
_matrix TranslationWorld = XMMatrixTranslationFromVector(vMassWorld);
// 최종 월드 행렬
_matrix world = TranslationLocal // 피벗중심으로 좌표계를 이동시킴
* (ScaleMatrix * RotationMatrix * TranslationWorld); // 그 후 SRT 적용
m_pTransformCom->Set_WorldMatrix(world);
m_pActor->setGlobalPose(XMWorldToPx_NoScaleNoFlip(world));
m_pActor->setAngularVelocity(PSX::PxVec3(0));
m_pActor->setLinearVelocity(PSX::PxVec3(0));
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, true);
m_vKinematicTimer.x = 0.f;
}
}
if (m_pGameInstance->IsIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
}
@@ -161,6 +129,15 @@ HRESULT CMapElement_Door::Render()
return S_OK;
}
void CMapElement_Door::OnCollision(CGameObject* pOther, void* pDesc)
{
if (0.f != m_vKinematicTimer.x) {
return;
}
m_vKinematicTimer.x = FLT_EPSILON3;
}
HRESULT CMapElement_Door::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
@@ -187,12 +164,49 @@ HRESULT CMapElement_Door::Ready_Components(void* pArg)
ELEMENT_DOOR_DESC* pPhysXDummyDesc = static_cast<ELEMENT_DOOR_DESC*>(pArg);
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pPhysXDummyDesc->vPosition), 1.f));
m_pTransformCom->Set_Scale(pPhysXDummyDesc->vScale);
m_pTransformCom->Rotation(XMConvertToRadians(pPhysXDummyDesc->vRotation.x), XMConvertToRadians(pPhysXDummyDesc->vRotation.y), XMConvertToRadians(pPhysXDummyDesc->vRotation.z));
{ // RIGID_BODY
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::DOOR);
Desc.bAutoOwnerTranslation = false;
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_DOOR"), (CComponent**)&m_pRigidBody, &Desc))) {
return E_FAIL;
}
m_pActor = (PSX::PxRigidDynamic*)m_pRigidBody->Get_Actor();
m_pRigidBody->Move_Kinematic(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_QuarternionVector(), true);
}
PSX::PxTransform doorWorldPose = m_pActor->getGlobalPose();
PSX::PxVec3 hingePivotWorld = PSX::PxVec3(39.64f, 5.12f, 71.f);
PSX::PxVec3 hingeAxisWorld = doorWorldPose.q.rotate(PSX::PxVec3(0.f, 1.f, 0.f)).getNormalized();
PSX::PxTransform jointWorldPose;
jointWorldPose.p = hingePivotWorld;
jointWorldPose.q = CMyTools::Calc_RevJointPosFromWorldHingeAxis(hingeAxisWorld);
PSX::PxTransform localFrameDoor = doorWorldPose.transformInv(jointWorldPose);
m_pJoint = (PSX::PxRevoluteJoint*)m_pGameInstance->Create_PxJoint(PHYSX_JOINT::REVOLUTE, nullptr, jointWorldPose, m_pActor, localFrameDoor);
m_pJoint->setLimit(PSX::PxJointAngularLimitPair(-XMConvertToRadians(100.f), XMConvertToRadians(100.f)));
m_pJoint->setRevoluteJointFlag(PSX::PxRevoluteJointFlag::eLIMIT_ENABLED, true);
m_pJoint->setDriveForceLimit(120.f);
m_pJoint->setConstraintFlag(PSX::PxConstraintFlag::eVISUALIZATION, true);
m_pActor->setLinearVelocity(PSX::PxVec3(0.f, 0.f, 0.f));
m_pActor->setAngularVelocity(PSX::PxVec3(0.f, 0.f, 0.f));
m_pActor->putToSleep();
return S_OK;
}
HRESULT CMapElement_Door::Bind_ShaderResources()
{
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
_float3 vScale = m_pTransformCom->Get_Scale();
_float4x4 WorldMatirx = {};
PSX::PxTransform pxPos = m_pRigidBody->Get_GlobalPosition();
XMStoreFloat4x4(&WorldMatirx, XMMatrixAffineTransformation(XMLoadFloat3(&vScale), XMVectorZero(), XMLoadFloat4((_float4*)&pxPos.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxPos.p), 1.f)));
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &WorldMatirx))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
@@ -209,67 +223,6 @@ HRESULT CMapElement_Door::Bind_ShaderResources()
return S_OK;
}
void CMapElement_Door::Lerp_Matrix(_float fTime)
{
{
_float4x4 OutMatrix = {};
_float4x4 CurrentMatrix = {};
XMStoreFloat4x4(&CurrentMatrix, m_pTransformCom->Get_XMWorldMatrix());
CMyTools::MatrixLerp(&CurrentMatrix, &m_InitialMatrix, OutMatrix, fTime);
m_pTransformCom->Set_WorldMatrix(OutMatrix);
}
}
void CMapElement_Door::Lerp_NonMatrix(_float fTime)
{
{
_vector vCurrQ = m_pTransformCom->Get_QuarternionVector();
_vector vInitialQ = XMLoadFloat4((_float4*)&m_pxStartQuat);
_vector vLerpQuat = XMVector4Normalize(XMVectorLerp(vCurrQ, vInitialQ, fTime));
PSX::PxTransform actorPose = m_pActor->getGlobalPose();
PSX::PxTransform massLocalPose = m_pActor->getCMassLocalPose();
PSX::PxVec3 vpxMassLocal = massLocalPose.p;
PSX::PxVec3 vpxMassWorld = actorPose.transform(vpxMassLocal);
_vector vMassLocal = XMVectorSet(vpxMassLocal.x, vpxMassLocal.y, vpxMassLocal.z, 0.f);
_vector vMassWorld = XMVectorSet(vpxMassWorld.x, vpxMassWorld.y, vpxMassWorld.z, 1.f);
_float3 vScale = m_pTransformCom->Get_Scale();
_matrix ScaleMatrix = XMMatrixScalingFromVector(XMLoadFloat3(&vScale));
_matrix RotationMatrix = XMMatrixRotationQuaternion(vLerpQuat);
_matrix TranslationLocal = XMMatrixTranslationFromVector(-vMassLocal);
_matrix TranslationWorld = XMMatrixTranslationFromVector(vMassWorld);
// 최종 월드 행렬
_matrix world = TranslationLocal // 피벗중심으로 좌표계를 이동시킴
* (ScaleMatrix * RotationMatrix * TranslationWorld); // 그 후 SRT 적용
m_pTransformCom->Set_WorldMatrix(world);
}
}
_float CMapElement_Door::ClampRadian(_float fNewRadian)
{
// [x, z] 사이로 잘라주는 단순한 클램프
_float minYaw = m_vRadianYAngle.x;
_float maxYaw = m_vRadianYAngle.z;
// 라디안 노멀라이즈 ([-pi, pi] 같은 범위로)
fNewRadian = CMyTools::NormalizeRadian(fNewRadian);
if (fNewRadian < minYaw) {
fNewRadian = minYaw;
}
else if (fNewRadian > maxYaw) {
fNewRadian = maxYaw;
}
return fNewRadian;
}
CMapElement_Door* CMapElement_Door::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CMapElement_Door* pInstance = new CMapElement_Door(pDevice, pContext);
@@ -313,7 +266,50 @@ void CMapElement_Door::Free()
#ifdef _DEBUG
void CMapElement_Door::Describe_Entity()
{
GUI::Begin("PhysX");
if (GUI::CollapsingHeader("Door")) {
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
if (GUI::CollapsingHeader("DOOR")) {
{
GUI::Text("Velo : %.2f", m_pJoint->getVelocity());
PSX::PxTransform pxActorLocalPos = m_pJoint->getLocalPose(PSX::PxJointActorIndex::eACTOR1);
if (true == CMyTools::DescribePxTransform(pxActorLocalPos, (size_t)this)) {
m_pJoint->setLocalPose(PSX::PxJointActorIndex::eACTOR1, pxActorLocalPos);
}
}
{
PSX::PxTransform pxRelativeLocalPos = m_pJoint->getRelativeTransform();
PSX::PxVec3 vAxis = {};
_float fAngle = {};
pxRelativeLocalPos.q.toRadiansAndUnitAxis(fAngle, vAxis);
GUI::Text("RelPos : %.2f %.2f %.2f", pxRelativeLocalPos.p.x, pxRelativeLocalPos.p.y, pxRelativeLocalPos.p.z);
GUI::Text("fAngle vAxis : %.2f %.2f %.2f %.2f", fAngle, vAxis.x, vAxis.y, vAxis.z);
}
_float fDrive = m_pJoint->getDriveVelocity();
_float fDriveDegree = XMConvertToDegrees(fDrive);
if (GUI::DragFloat("Drive", &fDriveDegree, 1.f, -180.f, 180.f, "%.2f")) {
fDrive = XMConvertToRadians(fDriveDegree);
m_pJoint->setDriveVelocity(fDrive);
}
_float2 vDriveLimit = {};
_float2 vSpring = {};
{
auto pxDriveLimit = m_pJoint->getLimit();
vDriveLimit = { pxDriveLimit.lower, pxDriveLimit.upper };
vSpring.x = pxDriveLimit.stiffness;
vSpring.y = pxDriveLimit.damping;
//pxDriveLimit.;
}
if (GUI::DragFloat2("Limit ", (_float*)&vDriveLimit, XMConvertToRadians(1.f), -XMConvertToRadians(180.f), XMConvertToRadians(180.f), "%.2f")) {
m_pJoint->setLimit(PSX::PxJointAngularLimitPair(vDriveLimit.x, vDriveLimit.y, PSX::PxSpring(vSpring.x, vSpring.y)));
}
if (GUI::DragFloat2("Spring Damping", (_float*)&vSpring, 1.f, 0.f, 100.f, "%.2f")) {
m_pJoint->setLimit(PSX::PxJointAngularLimitPair(vDriveLimit.x, vDriveLimit.y, PSX::PxSpring(vSpring.x, vSpring.y)));
}
m_pRigidBody->Describe_Entity();
}
}
GUI::End();
}
#endif // _DEBUG
@@ -272,18 +272,6 @@ HRESULT CMapElement_Interactable::Render_OutLine()
return E_FAIL;
}
#ifdef _DEBUG
GUI::Begin("Unit", 0, IMGUI_GLOBAL_BEGIN_FLAG);
if (GUI::CollapsingHeader("OutLine")) {
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");
}
GUI::End();
#endif // _DEBUG
Compute_Depth();
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
+18 -4
View File
@@ -180,7 +180,6 @@ _float2 CMonster::Get_Hp()
{
return { m_pStat->Get_Stat().fCurrentHp, m_pStat->Get_Stat().fMaxHp };
}
CStat* CMonster::Get_Stat()
{
return m_pStat;
@@ -191,6 +190,11 @@ const _float4x4* CMonster::Get_HeadMatrix()
return m_pModelCom->Get_BoneMatrixPtr("Head");
}
_float CMonster::Get_HpRatio()
{
return Get_Hp().x / Get_Hp().y;
}
void CMonster::CameraShake(_float ClampValue, _float Min, _float Max, _float Time)
{
CPlayer* pPlayer = static_cast<CPlayer*>(m_pInfoInstance->Get_NearestPlayerAlly(Get_WorldPostion()).first);
@@ -201,6 +205,16 @@ void CMonster::CameraShake(_float ClampValue, _float Min, _float Max, _float Tim
pPlayer->Start_CameraShake(Time, fShakeValue);
}
_bool CMonster::IsHitStateDisabled()
{
return _bool();
}
_bool CMonster::IsHitSpellDisabled()
{
return _bool();
}
HRESULT CMonster::Ready_Components(void*pArg)
{
__super::Ready_Components(pArg);
@@ -286,11 +300,11 @@ void CMonster::Free()
void CMonster::Describe_Entity()
{
if (ImGui::TreeNode("ANIM STATE")) {
if (GUI::TreeNode("ANIM STATE")) {
for (auto& pState : m_States)
{
if (ImGui::Button(to_string(pState.first).c_str()))
if (GUI::Button(to_string(pState.first).c_str()))
{
m_pFSM->Change_State(pState.first);
}
@@ -299,7 +313,7 @@ void CMonster::Describe_Entity()
GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str());
ImGui::TreePop();
GUI::TreePop();
}
}
@@ -21,6 +21,10 @@ CNPC_EleazarFig::CNPC_EleazarFig(const CNPC_EleazarFig& Prototype)
void CNPC_EleazarFig::Priority_Update(_float fTimeDelta)
{
m_pTransformCom->RewindMomentum();
m_iEntered -= 1;
if (m_iEntered < 0) {
m_iEntered = 0;
}
__super::Priority_Update(fTimeDelta);
}
@@ -38,6 +42,8 @@ void CNPC_EleazarFig::Update(_float fTimeDelta)
m_pCharacter_Controller->Move(fTimeDelta);
m_pCallBack_HitReport->Set_CurrentSlop();
}
//m_pNPCInteraction->Set_Visible(0 < m_iEntered);
}
void CNPC_EleazarFig::Late_Update(_float fTimeDelta)
@@ -152,19 +158,16 @@ HRESULT CNPC_EleazarFig::Bind_ShaderResources()
return S_OK;
}
_bool CNPC_EleazarFig::CastToPlayer()
void CNPC_EleazarFig::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
{
_vector vCurrentPos = m_pTransformCom->Get_State(STATE::POSITION);
_vector vTargetPos = {};
pair<CUnit*, CTransform*> pairAllyInfo = m_pInfoInstance->Get_NearestPlayerAlly(m_pTransformCom->Get_State(STATE::POSITION));
vTargetPos = pairAllyInfo.second->Get_State(STATE::POSITION);
_float fLength = XMVectorGetX(XMVector4Length(vTargetPos - vCurrentPos));
if (fLength < m_fEncounterDistance) {
return true;
CPlayer* pPlayer = dynamic_cast<CPlayer*>(pCaster);
if (nullptr == pPlayer) {
return;
}
if (fDistance < m_fEncounterDistance) {
m_iEntered = 4;
}
return false;
}
HRESULT CNPC_EleazarFig::Initialize_Prototype()
{
return S_OK;
@@ -216,7 +219,7 @@ HRESULT CNPC_EleazarFig::Ready_Components(void* pArg)
{ // CCT
CCharacter_Controller::Character_Controller_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
Desc.iSubKind = ENUM_CLASS(PXOBJECT::ELEAZARFIG);
Desc.pTransform = m_pTransformCom;
Desc.eBodyType = ACTOR::CAPSULE;
Desc.fContactOffset = 0.0001f;
@@ -234,6 +237,14 @@ HRESULT CNPC_EleazarFig::Ready_Components(void* pArg)
}
m_pCharacter_Controller->SetGravity(true);
}
{ // DO
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::ELEAZARFIG);
Desc.bAutoOwnerTranslation = false;
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_NPC_HITBOX"), (CComponent**)&m_pRigidBody, &Desc))) {
return E_FAIL;
}
}
return S_OK;
}
@@ -266,6 +277,7 @@ void CNPC_EleazarFig::Free()
{
__super::Free();
SAFE_RELEASE(m_pRigidBody);
SAFE_RELEASE(m_pCharacter_Controller);
if (nullptr != m_pInfoInstance) {
CInfoInstance* pInfo = m_pInfoInstance;
@@ -22,6 +22,10 @@ CNPC_Ollivander::CNPC_Ollivander(const CNPC_Ollivander& Prototype)
void CNPC_Ollivander::Priority_Update(_float fTimeDelta)
{
m_pTransformCom->RewindMomentum();
m_iEntered -= 1;
if (m_iEntered < 0) {
m_iEntered = 0;
}
__super::Priority_Update(fTimeDelta);
}
@@ -33,82 +37,14 @@ void CNPC_Ollivander::Update(_float fTimeDelta)
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
if (false == m_bEntered)
{
if (true == CastToPlayer()) {
m_vEnteringTimer.x += fTimeDelta;
if (m_vEnteringTimer.x > m_vEnteringTimer.y) {
m_vEnteringTimer.x -= m_vEnteringTimer.y;
m_bEntered = true;
// Active();
}
#ifdef _DEBUG
GUI::Begin("UNIT");
if (GUI::CollapsingHeader("Ollivander")) {
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
GUI::Text("Hello");
}
GUI::End();
#endif // _DEBUG
}
}
else {
if (false == CastToPlayer()) {
m_vEnteringTimer.x += fTimeDelta;
if (m_vEnteringTimer.x > m_vEnteringTimer.y) {
m_vEnteringTimer.x -= m_vEnteringTimer.y;
m_bEntered = false;
// DeActive(), Ready To Enter;
}
#ifdef _DEBUG
GUI::Begin("UNIT");
if (GUI::CollapsingHeader("Ollivander")) {
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
GUI::Text("CoolTime");
}
GUI::End();
#endif // _DEBUG
}
else {
#ifdef _DEBUG
GUI::Begin("UNIT");
if (GUI::CollapsingHeader("Ollivander")) {
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
GUI::Text("You must go Out");
}
GUI::End();
#endif // _DEBUG
}
}
if (false == CastToPlayer() && false == m_bEntered) {
#ifdef _DEBUG
GUI::Begin("UNIT");
if (GUI::CollapsingHeader("Ollivander")) {
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
GUI::Text("Waiting For ReEnter");
}
GUI::End();
#endif // _DEBUG
}
{ // 세트
m_pCallBack_HitReport->BeginFrame();
m_pCharacter_Controller->Move(fTimeDelta);
m_pCallBack_HitReport->Set_CurrentSlop();
}
m_pNPCInteraction->Set_Visible(m_bEntered);
if (m_bEntered == true)
{
if (m_pGameInstance->Key_Down(DIK_F))
{
}
}
m_pNPCInteraction->Set_Visible(0 < m_iEntered);
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
}
void CNPC_Ollivander::Late_Update(_float fTimeDelta)
@@ -197,6 +133,17 @@ HRESULT CNPC_Ollivander::Render_Shadow(SHADOW eType)
return S_OK;
}
void CNPC_Ollivander::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
{
CPlayer* pPlayer = dynamic_cast<CPlayer*>(pCaster);
if (nullptr == pPlayer) {
return;
}
if (fDistance < m_fEncounterDistance) {
m_iEntered = 4;
}
}
HRESULT CNPC_Ollivander::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
@@ -223,19 +170,6 @@ HRESULT CNPC_Ollivander::Bind_ShaderResources()
return S_OK;
}
_bool CNPC_Ollivander::CastToPlayer()
{
_vector vCurrentPos = m_pTransformCom->Get_State(STATE::POSITION);
_vector vTargetPos = {};
pair<CUnit*, CTransform*> pairAllyInfo = m_pInfoInstance->Get_NearestPlayerAlly(m_pTransformCom->Get_State(STATE::POSITION));
vTargetPos = pairAllyInfo.second->Get_State(STATE::POSITION);
_float fLength = XMVectorGetX(XMVector4Length(vTargetPos - vCurrentPos));
if (fLength < m_fEncounterDistance) {
return true;
}
return false;
}
HRESULT CNPC_Ollivander::Initialize_Prototype()
{
return S_OK;
@@ -295,8 +229,8 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
Desc.bAutoStepping = { false };
Desc.fStepOffset = { 0.02f };
Desc.fRadius = 0.5f;
Desc.fHeight = 0.6f;
Desc.fRadius = 0.2f;
Desc.fHeight = 0.3f;
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create();
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create();
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
@@ -306,6 +240,15 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
}
m_pCharacter_Controller->SetGravity(true);
}
{ // DO
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
Desc.bAutoOwnerTranslation = false;
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_NPC_HITBOX"), (CComponent**)&m_pRigidBody, &Desc))) {
return E_FAIL;
}
}
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("OLLIVENDER"), (CComponent**)&m_pNpcStat))) {
return E_FAIL;
@@ -350,6 +293,7 @@ void CNPC_Ollivander::Free()
SAFE_RELEASE(m_pCharacter_Controller);
SAFE_RELEASE(m_pNpcStat);
SAFE_RELEASE(m_pRigidBody);
if (nullptr != m_pInfoInstance) {
CInfoInstance* pInfo = m_pInfoInstance;
m_pInfoInstance = nullptr;
+68 -56
View File
@@ -93,17 +93,6 @@ HRESULT CPlayer::Initialize(void* pArg)
m_pTransformCom->Rotation(vRotQ);
m_pBroomRaceManager = pDesc->pBroomRaceManager;
if (m_pBroomRaceManager)
{
CBroomRaceManager::RacerInfo Info;
Info.pRacer = this;
Info.curRing = 0;
Info.prevPos = Get_WorldPostion();
m_pBroomRaceManager->Push_BroomRacer(Info);
}
}
#ifdef _DEBUG
@@ -121,12 +110,9 @@ HRESULT CPlayer::Initialize(void* pArg)
m_bAI = false;
//XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
m_pModelCom->Set_Temp(true);
XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
m_fRayDistance = 10.f;
m_pModelCom->Set_DisableRootMotionScale(true);
return S_OK;
}
@@ -145,6 +131,7 @@ void CPlayer::Update(_float fTimeDelta)
{
Update_CameraCoordinateSystem(fTimeDelta);
UpdateGrapInteractive(fTimeDelta);
Update_RaycastElements();
m_pFSM->Update_State(fTimeDelta);
@@ -219,20 +206,6 @@ void CPlayer::Late_Update(_float fTimeDelta)
m_pTransformCom->Set_State(STATE::UP, up);
m_pTransformCom->Set_State(STATE::LOOK, look);
////////////////////////////////////////////////////////////////////////////
if (nullptr == m_pRobePart) {
{
CPlayerRobe::PlayerRobe_DESC Desc{};
Desc.pModel = m_pModelCom;
Desc.pParentTransform = m_pTransformCom;
Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
if (FAILED(Add_PartObject<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
assert(false);
}
}
}
}
@@ -277,7 +250,6 @@ HRESULT CPlayer::Render()
return E_FAIL;
}
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
@@ -329,6 +301,39 @@ void CPlayer::Update_CameraShake(_float fTimeDelta)
}
}
}
HRESULT CPlayer::Update_RaycastElements()
{
if (E_FAIL == m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER)) {
m_iRayHitCount = 0;
return E_FAIL;
}
_vector vCameraPos = m_pGameInstance->Get_CamXMPosition();
_vector vCameraDir = m_pGameInstance->Get_CameraLook();
vector<PSX::PxRaycastHit> m_vRayHits = {};
m_vRayHits.resize(12);
_bool bHit = m_pGameInstance->RayCast(vCameraPos, vCameraDir, m_fRayDistance, m_vRayHits.data(), (_uint)m_vRayHits.size(), m_iRayHitCount);
if (true == bHit) {
CMyTools::SortHitsByDistance(m_vRayHits);
for (_uint i = 0; i < m_iRayHitCount; ++i) {
if (nullptr != m_vRayHits[i].actor->userData) {
PHYSX_USERDATA* pData = (PHYSX_USERDATA*)m_vRayHits[i].actor->userData;
switch (pData->eKind)
{
case PHYSX_KIND::BODY_STATIC:
break;
case PHYSX_KIND::BODY_DYNAMIC:
pData->pBody->OnRayCollision(this, i, m_vRayHits[i].distance, _float3(m_vRayHits[i].position.x, m_vRayHits[i].position.y, m_vRayHits[i].position.z));
break;
case PHYSX_KIND::CCTActor:
break;
default:
break;
}
}
}
}
return S_OK;
}
HRESULT CPlayer::Render_Shadow(SHADOW eType)
{
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
@@ -419,6 +424,20 @@ void CPlayer::Set_RaceRing(CRaceRing* pRaceRing)
SAFE_ADDREF(m_pRaceRing);
}
void CPlayer::Set_RaceInfo()
{
if (m_pBroomRaceManager)
{
CBroomRaceManager::RacerInfo Info;
Info.pRacer = this;
Info.curRing = 0;
Info.prevPos = Get_WorldPostion();
m_pBroomRaceManager->Push_BroomRacer(Info);
}
}
HRESULT CPlayer::Ready_Components()
{
CTransform::TRANSFORM_DESC Desc = {};
@@ -497,7 +516,6 @@ HRESULT CPlayer::Ready_Components()
HRESULT CPlayer::Ready_Parts()
{
CWand::WAND_DESC WandDesc{};
WandDesc.pParentTransform = m_pTransformCom;
WandDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
@@ -530,6 +548,19 @@ HRESULT CPlayer::Ready_Parts()
return E_FAIL;
}
//m_pModelCom->Play_Animation()
//XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("broomSocket"));
{
CPlayerRobe::PlayerRobe_DESC Desc{};
Desc.pModel = m_pModelCom;
Desc.pParentTransform = m_pTransformCom;
Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
if (FAILED(Add_PartObject<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
assert(false);
}
}
return S_OK;
}
@@ -621,19 +652,6 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
}
}
//array<_int, 256> paletteMask{};
//paletteMask.fill(0);
//for (_uint i = 0; i < paletteCount; ++i)
//{
// if (i == 29)
// continue;
// _uint global = boneIndices[i];
// paletteMask[i] = globalMask[global];
//}
//m_pShaderCom->Bind_IntArray("g_RobeBoneMask", paletteMask.data(), 256);
GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f);
if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {
@@ -649,13 +667,6 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
{
return E_FAIL;
}
if (nullptr != m_pRobePart) {
if (FAILED(m_pRobePart->Bind_PrevBoneMatrices(m_pShaderCom, "g_PrevBoneMatrices"))) {
return E_FAIL;
}
}
}
break;
#endif // _DEBUG
@@ -702,7 +713,7 @@ void CPlayer::SetGravity()
eCollisionFlags;
if (false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_DOWN)
&& false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_SIDES)) {
if (false == m_pFSM->IsEnable(FSMSTATE::JUMP)) { // 벽에 닿지 않았는데 점프 중이 아닐 땐 중력 on
if (false == m_pFSM->IsEnable(FSMSTATE::JUMP) && m_eHitType != ENUM_CLASS(HIT_TYPE::HIT_HEAVY)) { // 벽에 닿지 않았는데 점프 중이 아닐 땐 중력 on
m_pCharacter_Controller->SetGravity(true);
}
else { // 점프 중일 땐 off
@@ -764,6 +775,7 @@ void CPlayer::Free()
SAFE_RELEASE(m_pRobePart);
SAFE_RELEASE(m_pGrapInteractive);
if (nullptr != m_pInfoInstance) {
CInfoInstance* pInfo = m_pInfoInstance;
m_pInfoInstance = nullptr;
@@ -801,7 +813,7 @@ void CPlayer::Render_CameraCoordinateSystem()
GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
if (GUI::CollapsingHeader("Player_CAM_COOORD")) {
GUI::Text("%d", m_LockOnInfo.pUnit);
@@ -844,7 +856,7 @@ void CPlayer::Render_CameraCoordinateSystem()
void CPlayer::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
if (GUI::CollapsingHeader("PLAYER_DESC")) {
if (true == GUI::Button("ShaderRefresh")) {
m_pShaderCom->Shader_Refresh();
+186 -50
View File
@@ -14,8 +14,13 @@ CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype)
void CPlayerRobe::Priority_Update(_float fTimeDelta)
{
#ifdef _DEBUG
#ifdef 기무리
Update_RobeJoints();
#endif // 기무리
Describe_Entity();
#endif // _DEBUG
}
void CPlayerRobe::Update(_float fTimeDelta)
@@ -32,22 +37,15 @@ void CPlayerRobe::Update(_float fTimeDelta)
void CPlayerRobe::Late_Update(_float fTimeDelta)
{
#ifdef _DEBUG
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
PSX::PxConstraintFlags pxConstraintFlags = m_pDynamicJoints[i]->getConstraintFlags();
const bool bBroken = (pxConstraintFlags.isSet(PSX::PxConstraintFlag::eBROKEN));
if (true == bBroken) {
assert(false);
}
}
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
#endif // _DEBUG
}
HRESULT CPlayerRobe::Render()
{
#ifdef _DEBUG
Render_BonePhysX();
#ifdef 기무리
//Render_BonePhysX();
#endif // 기무리
#endif // _DEBUG
return S_OK;
}
@@ -58,12 +56,12 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition()
PSX::PxTransform pxTransform = {};
_matrix WorldMatrix = {};
_matrix OwnerInvWorldMatrix = m_pParentTransformCom->Get_WorldMatrixInv();
{
pxTransform = m_pRobeMainAnchor->Get_GlobalPosition();
WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
_fmatrix LocalMatrix = WorldMatrix * OwnerInvWorldMatrix;
m_pModelCom->Set_BoneCombinedTransformation("Hips_Cloth", LocalMatrix);
}
//{
// pxTransform = m_pRobeMainAnchor->Get_GlobalPosition();
// WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
// _fmatrix LocalMatrix = WorldMatrix * OwnerInvWorldMatrix;
// m_pModelCom->Set_BoneCombinedTransformation("Hips_Cloth", LocalMatrix);
//}
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition();
WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
@@ -75,14 +73,6 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition()
return S_OK;
}
HRESULT CPlayerRobe::Bind_PrevBoneMatrices(CShader* pShader, const _char* pConstant)
{
HRESULT hr = E_FAIL;
hr = pShader->Bind_Matrices(pConstant, m_PrevRobeBoneMatrices.data(), m_iBoneNum);
m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_PrevRobeBoneMatrices);
return hr;
}
HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld)
{
@@ -96,12 +86,12 @@ HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DY
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
return S_OK;
}
@@ -147,6 +137,8 @@ HRESULT CPlayerRobe::Update_LegsPosition()
}
#endif // _DEBUG
}
m_pLower0Bound->Move_Kinematic(m_pParentTransformCom->Get_XMWorldMatrix(), false);
m_pLower1Bound->Move_Kinematic(m_pParentTransformCom->Get_XMWorldMatrix(), false);
return S_OK;
}
@@ -192,9 +184,121 @@ HRESULT CPlayerRobe::Render_Legs()
[this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
m_pLower0Bound->Render([this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
m_pLower1Bound->Render([this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
return S_OK;
}
HRESULT CPlayerRobe::Update_RobeJoints()
{
for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
m_JointDescriptions[i].InitFromJoint(*m_pDynamicJoints[i]);
switch (PLAYER_JOINT_ORDER(i))
{
/* From Origin */
case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START:
case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START:
case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START:
m_JointDescriptions[i].iMotionTwist = 0;
m_JointDescriptions[i].iMotionSwing1 = 0;
m_JointDescriptions[i].iMotionSwing2 = 0;
m_JointDescriptions[i].fLinearLimit = 0.f;
m_JointDescriptions[i].fTwistAbsDeg = 0.f;
m_JointDescriptions[i].fSwingDeg = 5.f;
break;
case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_END:
case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_END:
case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_END:
m_JointDescriptions[i].iMotionTwist = 0;
m_JointDescriptions[i].iMotionSwing1 = 0;
m_JointDescriptions[i].iMotionSwing2 = 0;
m_JointDescriptions[i].fLinearLimit = 0.f;
m_JointDescriptions[i].fTwistAbsDeg = 0.f;
m_JointDescriptions[i].fSwingDeg = 5.f;
break;
/* From_Middle */
case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START:
case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START:
case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START:
m_JointDescriptions[i].iMotionTwist = 0;
m_JointDescriptions[i].iMotionSwing1 = 0;
m_JointDescriptions[i].iMotionSwing2 = 0;
m_JointDescriptions[i].fLinearLimit = 0.f;
m_JointDescriptions[i].fTwistAbsDeg = 0.f;
m_JointDescriptions[i].fSwingDeg = 10.f;
break;
case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_END:
case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_END:
case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_END:
m_JointDescriptions[i].iMotionTwist = 1;
m_JointDescriptions[i].iMotionSwing1 = 1;
m_JointDescriptions[i].iMotionSwing2 = 1;
m_JointDescriptions[i].fLinearLimit = 0.f;
m_JointDescriptions[i].fSwingDeg = 0.f;
m_JointDescriptions[i].fTwistAbsDeg = 0.f;
m_JointDescriptions[i].bEnableSlerpDrive = true;
m_JointDescriptions[i].fLinearStiffness = 10.f;
m_JointDescriptions[i].fSlerpDamping = 3.f;
m_JointDescriptions[i].fSlerpForceLimit = 40.f;
m_JointDescriptions[i].bSlerpAccel = true;
break;
/* From_Lower */
case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START:
case PLAYER_JOINT_ORDER::RMIDDLE_TO_R_START:
m_JointDescriptions[i].iMotionTwist = 1;
m_JointDescriptions[i].iMotionSwing1 = 1;
m_JointDescriptions[i].iMotionSwing2 = 1;
m_JointDescriptions[i].fLinearLimit = 0.f;
m_JointDescriptions[i].fTwistAbsDeg = 15.f;
m_JointDescriptions[i].fSwingDeg = 15.f;
break;
case PLAYER_JOINT_ORDER::RMIDDLE_TO_R_END:
case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_END:
break;
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START:
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START:
m_JointDescriptions[i].iMotionTwist = 1;
m_JointDescriptions[i].iMotionSwing1 = 1;
m_JointDescriptions[i].iMotionSwing2 = 1;
m_JointDescriptions[i].fLinearLimit = 0.f;
m_JointDescriptions[i].fTwistAbsDeg = 15.f;
m_JointDescriptions[i].fSwingDeg = 15.f;
break;
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_END:
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_END:
break;
case PLAYER_JOINT_ORDER::LMIDDLE_TO_L_START:
case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START:
m_JointDescriptions[i].iMotionTwist = 1;
m_JointDescriptions[i].iMotionSwing1 = 1;
m_JointDescriptions[i].iMotionSwing2 = 1;
m_JointDescriptions[i].fLinearLimit = 0.f;
m_JointDescriptions[i].fTwistAbsDeg = 15.f;
m_JointDescriptions[i].fSwingDeg = 15.f;
break;
case PLAYER_JOINT_ORDER::LMIDDLE_TO_L_END:
case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_END:
break;
default:
break;
}
m_JointDescriptions[i].ApplyToJoint(*m_pDynamicJoints[i]);
}
return S_OK;
}
HRESULT CPlayerRobe::Render_BonePhysX()
{
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f);
@@ -224,13 +328,6 @@ HRESULT CPlayerRobe::Render_BonePhysX()
});
Render_Legs();
_vector vRouteColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f);
//for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
// if (nullptr != m_pRobeJointRoute[i]) {
// m_pRobeJointRoute[i]->Render([this]() {
// m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
// });
// }
//}
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
m_pRobeJointAnchor[i]->Render([this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
@@ -270,6 +367,22 @@ HRESULT CPlayerRobe::Ready_Components()
return E_FAIL;
}
}
{ //
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
Desc.bAutoOwnerTranslation = false;
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower0Bound, &Desc))) {
return E_FAIL;
}
}
{ //
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
Desc.bAutoOwnerTranslation = false;
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower1Bound, &Desc))) {
return E_FAIL;
}
}
{ // RobeSocket
{ // Fixed_MainAnchor
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
@@ -324,11 +437,11 @@ HRESULT CPlayerRobe::Ready_Components()
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
}
}
{
@@ -349,11 +462,11 @@ HRESULT CPlayerRobe::Ready_Components()
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
}
}
{
@@ -374,11 +487,11 @@ HRESULT CPlayerRobe::Ready_Components()
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
}
}
}
@@ -553,6 +666,14 @@ HRESULT CPlayerRobe::Initialize(void* pArg)
if (FAILED(Ready_Components())) {
return E_FAIL;
}
D6JOINTDESC JointDesc = D6JOINTDESC();
for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
JointDesc.ApplyToJoint(*m_pDynamicJoints[i]);
m_JointDescriptions[i] = JointDesc;
}
Update_RobeJoints();
#ifdef _DEBUG
m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 22, false, false));
m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, 0.3f, 0.075f, 22, false));
@@ -603,6 +724,8 @@ void CPlayerRobe::Free()
SAFE_RELEASE(m_pDepthStencilStateNone);
#endif // _DEBUG
SAFE_RELEASE(m_pRightLeg);
SAFE_RELEASE(m_pLower0Bound);
SAFE_RELEASE(m_pLower1Bound);
SAFE_RELEASE(m_pLeftLeg);
SAFE_RELEASE(m_pRobeMainAnchor);
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
@@ -619,11 +742,24 @@ void CPlayerRobe::Describe_Entity()
GUI::Begin("PhysX");
if (GUI::CollapsingHeader("Robe")) {
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
if (GUI::BeginChild(("Child ID: " + to_string((size_t)(this))).c_str())) {
_uint iActor0 = i;
if (GUI::TreeNode(("Child ID: " + to_string(iActor0)).c_str())) {
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
PSX::PxTransform pxDrivePos0 = m_pDynamicJoints[iActor0]->getDrivePosition();
if (true == CMyTools::DescribePxTransform(pxDrivePos0, iActor0)) {
m_pDynamicJoints[iActor0]->setDrivePosition(pxDrivePos0);
}
{
_bool bModified = false;
if (CMyTools::Modify_D6Joint(*m_pDynamicJoints[iActor0], iActor0)) {
bModified = true;
}
GUI::TreePop();
}
}
GUI::EndChild();
}
m_pLower0Bound->Describe_Entity();
m_pLower1Bound->Describe_Entity();
}
GUI::End();
}
+151 -122
View File
@@ -185,9 +185,13 @@ HRESULT CPlayer::InputBroom()
}
void CPlayer::Behavior_IdleEnter() {
pair<_uint, _bool> pairAnimInfo;
m_pFSM->Enable_State(FSMSTATE::IDLE);
m_bSprintToggle = false;
m_bWalkToggle = false;
pairAnimInfo = m_Animation[STATEANIM::IDLE];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
@@ -344,6 +348,7 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
void CPlayer::Behavior_IdleExit()
{
m_pFSM->Disable_State(FSMSTATE::IDLE | FSMSTATE::IDLE_TURN);
Reset_Event();
}
void CPlayer::Behavior_MoveEnter()
@@ -781,6 +786,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
void CPlayer::Behavior_MoveExit()
{
m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::STOP);
Reset_Event();
}
void CPlayer::Behavior_JumpEnter()
@@ -831,6 +837,7 @@ HRESULT CPlayer::Behavior_JumpExitCheck()
void CPlayer::Behavior_JumpExit()
{
m_pFSM->Disable_State(FSMSTATE::JUMP);
Reset_Event();
}
void CPlayer::Behavior_LandEnter()
@@ -884,6 +891,7 @@ void CPlayer::Behavior_LandExit()
m_pFSM->Disable_State(FSMSTATE::LAND);
m_pCharacter_Controller->Set_GravityAmount(m_fOriginGravityAmount);
m_fGravityAmount = 0.f;
Reset_Event();
}
void CPlayer::Behavior_FallEnter()
@@ -906,6 +914,7 @@ HRESULT CPlayer::Behavior_FallExitCheck(_float fTimeDelta)
void CPlayer::Behavior_FallExit()
{
m_pFSM->Disable_State(FSMSTATE::FALL);
Reset_Event();
}
void CPlayer::Behavior_DodgeEnter()
@@ -943,12 +952,14 @@ HRESULT CPlayer::Behavior_DodgeExitCheck(_float fTimeDelta)
void CPlayer::Behavior_DodgeExit()
{
m_pFSM->Disable_State(FSMSTATE::DODGE);
Reset_Event();
}
void CPlayer::Behavior_BlinkEnter()
{
m_pFSM->Enable_State(FSMSTATE::BLINK);
m_bVisible = false;
Get_PartObject<CWand>()->Set_Visible(false);
Add_Event(m_Animation[STATEANIM::DODGE].first,
[&]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::BLINK, this);
@@ -967,6 +978,7 @@ HRESULT CPlayer::Behavior_BlinkExitCheck(_float fTimeDelta)
if (m_fBlinkTime >= 0.8f && iCurrAnimIndex != m_Animation[STATEANIM::DODGE_BLINK].first)
{
m_bVisible = true;
Get_PartObject<CWand>()->Set_Visible(true);
pairAnimInfo = m_Animation[STATEANIM::DODGE_BLINK];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.8f,false,1.5f);
}
@@ -1001,6 +1013,7 @@ void CPlayer::Behavior_BlinkExit()
{
m_pFSM->Disable_State(FSMSTATE::BLINK);
m_fBlinkTime = 0.f;
Reset_Event();
}
void CPlayer::Behavior_SlideEnter()
@@ -1053,6 +1066,7 @@ void CPlayer::Behavior_SlideExit()
{
m_pFSM->Disable_State(FSMSTATE::SLIDE);
m_fSlideSpeed = 0.f;
Reset_Event();
}
void CPlayer::Behavior_CombatEnter()
@@ -1062,64 +1076,71 @@ void CPlayer::Behavior_CombatEnter()
if (m_pModelCom->Get_SecondAnimIndex() == m_Animation[STATEANIM::LUMOS].first)
{
m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R) ,-1) ;
m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_R), -1);
m_eSpell = ENUM_CLASS(SKILL_TYPE::END);
}
if (m_pGameInstance->Key_Down(DIK_R)) {
m_pFSM->Enable_State(FSMSTATE::SKILL);
pairAnimInfo = m_Animation[STATEANIM::SKILL];
m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this);
}
else if (m_pGameInstance->Key_Down(DIK_Q)) {
m_pFSM->Change_State(FSMSTATE::SHIELD);
return;
}
else if (m_pGameInstance->Mouse_Down(DIM_LBUTTON)) {
m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK);
return;
}
else if (SUCCEEDED(InputSpell())) {
m_pFSM->Change_State(FSMSTATE::SPELL);
return;
}
else if (m_pGameInstance->Key_Down(DIK_V)) {
m_pFSM->Enable_State(FSMSTATE::MAPHELP);
pairAnimInfo = m_Animation[STATEANIM::MAPHELP];
}
else if (m_pGameInstance->Key_Down(DIK_X)) {
m_pFSM->Change_State(FSMSTATE::ANCIENT_SPELL);
return;
}
else if (m_pGameInstance->Key_Down(DIK_Z)) {
if (nullptr != m_LockOnInfo.pInteractive) {
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
m_pGrapInteractive = m_LockOnInfo.pInteractive;
SAFE_ADDREF(m_pGrapInteractive);
m_pGrapInteractive->Set_KinematicFlag(true);
m_vGrapInteratableLerp.x = 0.f;
if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell()))
{
if (m_pGameInstance->Key_Down(DIK_R)) {
m_pFSM->Enable_State(FSMSTATE::SKILL);
pairAnimInfo = m_Animation[STATEANIM::SKILL];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this);
}
else {
else if (m_pGameInstance->Key_Down(DIK_Q)) {
m_pFSM->Change_State(FSMSTATE::SHIELD);
return;
}
else if (m_pGameInstance->Mouse_Down(DIM_LBUTTON)) {
m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK);
return;
}
else if (SUCCEEDED(InputSpell())) {
m_pFSM->Change_State(FSMSTATE::SPELL);
return;
}
else if (m_pGameInstance->Key_Down(DIK_V)) {
m_pFSM->Enable_State(FSMSTATE::MAPHELP);
pairAnimInfo = m_Animation[STATEANIM::MAPHELP];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
else if (m_pGameInstance->Key_Down(DIK_X)) {
m_pFSM->Change_State(FSMSTATE::ANCIENT_SPELL);
return;
}
else if (m_pGameInstance->Key_Down(DIK_Z)) {
Add_Event(pairAnimInfo.first,
[this]() { m_bLookAt = true; },
0.12f);
if (nullptr != m_LockOnInfo.pInteractive) {
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_pGrapInteractive = m_LockOnInfo.pInteractive;
SAFE_ADDREF(m_pGrapInteractive);
m_pGrapInteractive->Set_KinematicFlag(true);
m_vGrapInteratableLerp.x = 0.f;
}
else {
return;
}
Add_Event(pairAnimInfo.first,
[this]() { Throwing_Interactive(); },
0.2f);
Add_Event(pairAnimInfo.first,
[this]() { m_bLookAt = true; },
0.12f);
Add_Event(pairAnimInfo.first,
[this]() {
m_pGameInstance->SlowMotion(0.1f, 0.35f);
},
0.1f);
Add_Event(pairAnimInfo.first,
[this]() { Throwing_Interactive(); },
0.2f);
Add_Event(pairAnimInfo.first,
[this]() {
m_pGameInstance->SlowMotion(0.1f, 0.35f);
},
0.1f);
}
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
HRESULT CPlayer::Behavior_CombatExitCheck()
@@ -1209,6 +1230,7 @@ void CPlayer::Behavior_CombatExit()
{
m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SKILL |
FSMSTATE::MAPHELP | FSMSTATE::ANCIENT_THROW);
Reset_Event();
}
void CPlayer::Behavior_LightAttackEnter()
@@ -1251,10 +1273,12 @@ void CPlayer::Behavior_LightAttackEnter()
if (Cross < 0.f)
{
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK_90_L];
fRatio = 0.15f;
}
else
{
pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK_90_R2];
fRatio = 0.15f;
}
Add_Event(pairAnimInfo.first,
[this]() {m_bLookAt = true;
@@ -1391,6 +1415,7 @@ void CPlayer::Behavior_LightAttackExit()
{
m_pFSM->Disable_State(FSMSTATE::LIGHT_ATTACK);
m_pModelCom->Set_BlendDuration(0.3f);
Reset_Event();
m_bLookAt = false;
}
@@ -1422,12 +1447,21 @@ void CPlayer::Behavior_SpellEnter()
_vector vCross = XMVector3Cross(vLook, vCameraLook);
_float Cross = XMVectorGetY(vCross);
if (Degree <= 45.f)
if (Degree <= 30.f)
{
pairAnimInfo = m_Animation[STATEANIM::SPELL];
fRatio = 0.2f;
}
else if (Degree <= 85.f)
else if (Degree <= 60.f)
{
pairAnimInfo = m_Animation[STATEANIM::SPELL];
fRatio = 0.2f;
Add_Event(m_Animation[STATEANIM::SPELL].first,
[this]() {m_bLookAt = true;
},
0.01f);
}
else if (Degree <= 120.f)
{
if (Cross < 0.f)
{
@@ -1441,7 +1475,10 @@ void CPlayer::Behavior_SpellEnter()
pairAnimInfo = m_Animation[STATEANIM::SPELL_90_L2];
break;
}
Add_Event(pairAnimInfo.first,
[this]() {m_bLookAt = true;
},
0.95f);
fRatio = 0.17f;
}
else {
@@ -1458,8 +1495,14 @@ void CPlayer::Behavior_SpellEnter()
break;
case 1:
pairAnimInfo = m_Animation[STATEANIM::SPELL_90_R];
fRatio = 0.17f;
fAnimSpeed = 1.3f;
fRatio = 0.14f;
if (Degree >= 120.f)
{
Add_Event(pairAnimInfo.first,
[this]() {m_bLookAt = true;
},
0.01f);
}
break;
}
}
@@ -1467,6 +1510,10 @@ void CPlayer::Behavior_SpellEnter()
else {
pairAnimInfo = m_Animation[STATEANIM::SPELL_180_R];
fRatio = 0.23f;
Add_Event(pairAnimInfo.first,
[this]() {m_bLookAt = true;
},
0.01f);
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, fAnimSpeed);
@@ -1546,15 +1593,19 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
}
else if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell()))
{
if (fRatio >= 0.5f)
{
m_pFSM->Change_State(FSMSTATE::COMBAT);
return E_FAIL;
if (iIndex != m_Animation[STATEANIM::AVADA_KEDAVRA].first) {
if (fRatio >= 0.5f)
{
m_pFSM->Change_State(FSMSTATE::COMBAT);
return E_FAIL;
}
return S_OK;
}
return S_OK;
}
}
else if (m_pGameInstance->Key_Down(DIK_Q)) {
else if (iIndex != m_Animation[STATEANIM::AVADA_KEDAVRA].first)
{
if (m_pGameInstance->Key_Down(DIK_Q)) {
m_pFSM->Change_State(FSMSTATE::SHIELD);
return E_FAIL;
}
@@ -1575,6 +1626,8 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
}
return S_OK;
}
}
Play_SpellHitAnim();
@@ -1604,10 +1657,11 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
void CPlayer::Behavior_SpellExit()
{
m_pFSM->Disable_State(FSMSTATE::SPELL);
m_pModelCom->Set_BlendDuration(0.3f);
Reset_Event();
m_bLookAt = false;
m_bSpellHit = false;
}
void CPlayer::Behavior_AncientSpellEnter()
@@ -1663,6 +1717,7 @@ HRESULT CPlayer::Behavior_AncientSpellExitCheck()
void CPlayer::Behavior_AncientSpellExit()
{
m_pFSM->Disable_State(FSMSTATE::ANCIENT_SPELL);
Reset_Event();
m_bLookAt = false;
}
@@ -1798,6 +1853,7 @@ void CPlayer::Behavior_ShieldExit()
{
m_pFSM->Disable_State(FSMSTATE::SHIELD);
m_pFSM->Disable_State(FSMSTATE::PARRY);
Reset_Event();
m_bShield = false;
m_bLookAt = false;
}
@@ -1859,8 +1915,9 @@ void CPlayer::Behavior_HitEnter()
Add_Event(m_Animation[STATEANIM::KNOCKDOWN_BWD].first,
[&]() {pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_BWD_SPLT];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_pCharacter_Controller->SetGravity(true); },
0.7f);
m_pCharacter_Controller->SetGravity(true);
m_eHitType = ENUM_CLASS(HIT_TYPE::END); },
0.9f);
Add_Event(m_Animation[STATEANIM::KNOCKDOWN_BWD_SPLT].first,
[&]() {pairAnimInfo = m_Animation[STATEANIM::GETUP_BWD];
@@ -1873,8 +1930,9 @@ void CPlayer::Behavior_HitEnter()
Add_Event(m_Animation[STATEANIM::KNOCKDOWN_FWD].first,
[&]() {pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_pCharacter_Controller->SetGravity(true); },
0.7f);
m_pCharacter_Controller->SetGravity(true);
m_eHitType = ENUM_CLASS(HIT_TYPE::END); },
0.9f);
Add_Event(m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT].first,
[&]() {pairAnimInfo = m_Animation[STATEANIM::GETUP_FWD];
@@ -1930,6 +1988,8 @@ HRESULT CPlayer::Behavior_HitExitCheck()
void CPlayer::Behavior_HitExit()
{
m_pFSM->Disable_State(FSMSTATE::HIT);
Reset_Event();
m_eHitType = ENUM_CLASS(HIT_TYPE::END);
m_bLookAt = false;
}
@@ -1978,6 +2038,7 @@ HRESULT CPlayer::Behavior_Broom_RideExitCheck(_float fTimeDelta)
void CPlayer::Behavior_Broom_RideExit()
{
m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE);
Reset_Event();
}
void CPlayer::Behavior_Broom_Ride_MoveEnter()
@@ -2007,6 +2068,7 @@ HRESULT CPlayer::Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta)
void CPlayer::Behavior_Broom_Ride_MoveExit()
{
m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE_MOVE);
Reset_Event();
}
void CPlayer::Behavior_Broom_HoverEnter()
@@ -2153,8 +2215,7 @@ void CPlayer::Behavior_Broom_HoverExit()
void CPlayer::Behavior_Broom_FlyEnter()
{
m_pFSM->Enable_State(FSMSTATE::FLY);
m_fNeutralTime = 0.f;
m_fNoInputTime = 0.f;
Reset_Event();
}
HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
@@ -2172,7 +2233,6 @@ HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
{
if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
{
m_fNoInputTime = 0.f;
_float3 vInput = { 0.f, 0.f, 0.f };
if (bFwd) vInput.z += 1.f;
@@ -2255,44 +2315,26 @@ HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
}
}
_bool bNeutralAnim =
(pairAnimInfo.first == m_Animation[STATEANIM::BROOM_FWD].first ||
pairAnimInfo.first == m_Animation[STATEANIM::BROOM_IDLE].first);
if (!bNeutralAnim)
if (iCurrAnimIndex != pairAnimInfo.first)
{
m_fNeutralTime = 0.f;
if (iCurrAnimIndex != pairAnimInfo.first)
{
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
}
else
{
m_fNeutralTime += fTimeDelta;
if (m_fNeutralTime > 0.25f)
{
if (iCurrAnimIndex != pairAnimInfo.first)
{
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
}
m_pModelCom->Set_AnimationIndex(
pairAnimInfo.first,
pairAnimInfo.second,
1.f, false, 1.f, true, true
);
}
}
else {
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_IDLE);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_fNoInputTime += fTimeDelta;
if (m_fNoInputTime > 0.25f)
if (iCurrAnimIndex != pairAnimInfo.first)
{
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_IDLE);
if (iCurrAnimIndex != pairAnimInfo.first)
{
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
m_pModelCom->Set_AnimationIndex(
pairAnimInfo.first,
pairAnimInfo.second,
1.f, false, 1.f, true, true
);
}
}
@@ -2344,13 +2386,12 @@ HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
void CPlayer::Behavior_Broom_FlyExit()
{
m_pFSM->Disable_State(FSMSTATE::FLY);
Reset_Event();
}
void CPlayer::Behavior_Broom_TurboFlyEnter()
{
m_pFSM->Enable_State(FSMSTATE::TURBOFLY);
m_fNeutralTime = 0.f;
m_fNoInputTime = 0.f;
}
HRESULT CPlayer::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
@@ -2368,7 +2409,6 @@ HRESULT CPlayer::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
{
if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
{
m_fNoInputTime = 0.f;
_float3 vInput = { 0.f, 0.f, 0.f };
if (bFwd) vInput.z += 1.f;
@@ -2411,6 +2451,9 @@ HRESULT CPlayer::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_UP];
else if(vInput.y<0.f)
pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_DOWN];
else {
pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_FWD];
}
}
else {
if (vInput.x < 0.f)
@@ -2433,34 +2476,18 @@ HRESULT CPlayer::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
}
}
_bool bNeutralAnim =
(pairAnimInfo.first == m_Animation[STATEANIM::BROOM_TURBO_FWD].first);
if (!bNeutralAnim)
if (iCurrAnimIndex != pairAnimInfo.first)
{
m_fNeutralTime = 0.f;
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true,1.f,false);
}
else
{
m_fNeutralTime += fTimeDelta;
if (m_fNeutralTime > 0.25f)
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first,pairAnimInfo.second,1.f, false, 1.f, false,true);
}
}
else {
m_fNoInputTime += fTimeDelta;
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_TURBO_FWD);
if (m_fNoInputTime > 0.25f)
if (iCurrAnimIndex != pairAnimInfo.first)
{
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_TURBO_FWD);
if (iCurrAnimIndex != pairAnimInfo.first)
{
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first,pairAnimInfo.second,1.f, false, 1.f, false, true);
}
}
}
@@ -2493,6 +2520,7 @@ HRESULT CPlayer::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
void CPlayer::Behavior_Broom_TurboFlyExit()
{
m_pFSM->Disable_State(FSMSTATE::TURBOFLY);
Reset_Event();
}
void CPlayer::Behavior_Broom_DismountEnter()
@@ -2552,6 +2580,7 @@ HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta)
void CPlayer::Behavior_Broom_DismountExit()
{
m_pFSM->Disable_State(FSMSTATE::BROOM_DISMOUNT);
Reset_Event();
}
void CPlayer::Player_InterpTurn(_float fTimeDelta)
+11 -7
View File
@@ -30,14 +30,19 @@ HRESULT CRaceRing::Initialize(void* pArg)
return E_FAIL;
}
m_pBroomRaceManager = static_cast<RACERING_DESC*>(pArg)->pBroomRaceManager;
m_iIndex = static_cast<RACERING_DESC*>(pArg)->iIndex;
_float X = m_pGameInstance->Real_Random_Float(-200.f, 200.f);
_float Y = m_pGameInstance->Real_Random_Float(15.f, 60.f);
_float Z = m_pGameInstance->Real_Random_Float(-50.f, 50.f);
//m_iIndex = static_cast<RACERING_DESC*>(pArg)->iIndex;
//_float X = m_pGameInstance->Real_Random_Float(-200.f, 200.f);
//_float Y = m_pGameInstance->Real_Random_Float(15.f, 60.f);
//_float Z = m_pGameInstance->Real_Random_Float(-50.f, 50.f);
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet((_float)m_iIndex *100.f, Y, Z, 1.f));
RACERING_DESC* pDesc = static_cast<RACERING_DESC*>(pArg);
m_pBroomRaceManager = pDesc->pBroomRaceManager;
_float3 vRotation = pDesc->vRotation;
m_pTransformCom->Rotation(XMConvertToRadians(vRotation.x), XMConvertToRadians(vRotation.y), XMConvertToRadians(vRotation.z));
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(pDesc->vPosition.x, pDesc->vPosition.y, pDesc->vPosition.z, 1.f));
m_pTransformCom->Set_Scale(pDesc->vScale);
m_pBroomRaceManager->Push_RaceRing(this);
return S_OK;
@@ -54,7 +59,6 @@ void CRaceRing::Priority_Update(_float fTimeDelta)
void CRaceRing::Update(_float fTimeDelta)
{
m_pModelCom->Combined_BoneMatrix();
}
void CRaceRing::Late_Update(_float fTimeDelta)
+134 -67
View File
@@ -67,8 +67,8 @@ HRESULT CRanrok::Initialize(void* pArg)
if (NEXT_LEVEL == ENUM_CLASS(LEVEL::FIELD))
{
m_pCharacter_Controller->Set_Position(XMVectorSet(58.990f, 71.321f, 241.628f, 1.f));
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(58.990f, 71.321f, 241.628f, 1.f));
m_pCharacter_Controller->Set_Position(XMVectorSet(75.550f, 33.734f, 164.013f, 1.f));
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(75.550f, 33.734f, 164.013f, 1.f));
}
else {
@@ -146,6 +146,9 @@ void CRanrok::Update(_float fTimeDelta)
if (m_vEtherealTimer.x > m_vEtherealTimer.y) {
m_vEtherealTimer.x -= m_vEtherealTimer.y;
}
Update_Disolve(fTimeDelta);
}
void CRanrok::Late_Update(_float fTimeDelta)
@@ -161,10 +164,14 @@ void CRanrok::Late_Update(_float fTimeDelta)
if (!m_pFSM->IsEnable(FSMSTATE::TUCKED))
{
if (true == m_bLookAt) {
m_pTransformCom->LookAt_Horizontal_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f);
m_pTransformCom->LookAt_Horizontal_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 2.5f);
}
m_pModelCom->Set_TargetPos((XMLoadFloat4(&m_vTargetPos)));
_vector vPos = m_pTransformCom->Get_State(STATE::POSITION);
_vector vRight = m_pTransformCom->Get_State(STATE::RIGHT);
m_pModelCom->Set_TargetPos(vPos + (vRight* (_float)m_iBreathRand));
}
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
@@ -250,7 +257,7 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition();
//m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition();
CEffect_Container* pEffect_Container = dynamic_cast<CEffect_Container*>(pOther);
@@ -302,18 +309,39 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
}
m_DamageInfo.fDamage = damagePair.first;
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
/*m_DamageInfo.fDamage = damagePair.first;
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);*/
if (0 == damagePair.second) {
m_pFSM->Change_State(FSMSTATE::DEAD);
return;
}
if (damagePair.second <= Get_Hp().y / 2.f && m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
_float curr = Get_HpRatio();
if (m_fPrevHpRatio > 0.85f && curr <= 0.85f)
{
m_pFSM->Change_State(FSMSTATE::LAND);
m_pFSM->Change_State(FSMSTATE::TUCKED);
m_fPrevHpRatio = curr;
return;
}
m_pFSM->Change_State(FSMSTATE::HIT);
else if (m_fPrevHpRatio > 0.7f && curr <= 0.7f)
{
m_pFSM->Change_State(FSMSTATE::TUCKED);
m_fPrevHpRatio = curr;
return;
}
else if (m_fPrevHpRatio > 0.5f && curr <= 0.5f)
{
m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_GROUND);
m_pFSM->Change_State(FSMSTATE::TUCKED);
m_fPrevHpRatio = curr;
return;
}
m_fPrevHpRatio = curr;
if (IsHitStateDisabled() && IsHitSpellDisabled()) {
m_pFSM->Change_State(FSMSTATE::HIT);
}
}
void CRanrok::OnHit(CGameObject* pOther, CGameObject* pCaller)
@@ -433,6 +461,13 @@ HRESULT CRanrok::Render_Nonblend()
return E_FAIL;
}
//#ifdef _DEBUG
//#ifdef 기무리
// if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
// return E_FAIL;
// }
//#endif // 기무리
//#endif // _DEBUG
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
return E_FAIL;
}
@@ -628,7 +663,7 @@ void CRanrok::MoveTo(_float fTimeDelta)
_vector toTarget = Target - CurPos;
_float fDist = XMVectorGetX(XMVector3Length(toTarget));
if (m_iCurrentPoint + 1 < m_Points[m_iCurrentFlow].size() && fDist < 30.f)
if (m_iCurrentPoint + 1 < m_Points[m_iCurrentFlow].size() && fDist < 15.f)
{
NextTarget = m_Points[m_iCurrentFlow][m_iCurrentPoint + 1];
}
@@ -638,7 +673,7 @@ void CRanrok::MoveTo(_float fTimeDelta)
if (m_iCurrentPoint == m_Points[m_iCurrentFlow].size() - 1)
{
if (fDist < 10.f)
if (fDist < 5.f)
{
if (m_iCurrentPoint == m_Points[m_iCurrentFlow].size() - 1)
{
@@ -650,21 +685,15 @@ void CRanrok::MoveTo(_float fTimeDelta)
return;
}
}
else if (fDist < 20.f)
else if (fDist < 10.f)
{
if (m_iCurrentPoint == m_Points[m_iCurrentFlow].size() - 1)
{
m_bTucked = true;
m_pFSM->Disable_State(FSMSTATE::TUCKED);
}
m_iCurrentPoint = (m_iCurrentPoint + 1) % m_Points[m_iCurrentFlow].size();
return;
}
_vector LerpTarget = XMVectorLerp(Target, NextTarget, 0.5f);
m_pTransformCom->LookAt_Lerp(LerpTarget, fTimeDelta,2.5f);
m_pTransformCom->LookAt_Lerp(LerpTarget, fTimeDelta,5.f);
m_pCharacter_Controller->Set_Position(CurPos + vLook * m_fTuckedSpeed * fTimeDelta);
}
@@ -710,6 +739,34 @@ HRESULT CRanrok::Load_RanrokPos(const _char* pFilePath)
return S_OK;
}
void CRanrok::Update_Disolve(_float fTimeDelta)
{
if (!m_bDisolve)
return;
if (!m_bDisolveReverse)
{
m_fDisolveTime += fTimeDelta * 0.8f;
if (m_fDisolveTime >= 1.f)
{
m_fDisolveTime = 1.f;
}
}
else
{
m_fDisolveTime -= fTimeDelta * 0.8f;
if (m_fDisolveTime <= 0.f)
{
m_fDisolveTime = 0.f;
m_bDisolve = false;
m_bDisolveReverse = false;
}
}
}
CRanrok* CRanrok::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CRanrok* pInstance = new CRanrok(pDevice, pContext);
@@ -778,55 +835,65 @@ void CRanrok::Describe_Entity()
m_pCharacter_Controller->Set_Position(XMVectorSetW(XMLoadFloat3(&Pos), 1.f));
}
GUI::SameLine();
if (GUI::SmallButton("Copy"))
{
char buf[128];
sprintf_s(buf, "<Pos x=\"%.3f\" y=\"%.3f\" z=\"%.3f\"/>", Pos.x, Pos.y, Pos.z);
GUI::SetClipboardText(buf);
m_Points[0].push_back(XMVectorSet(Pos.x, Pos.y, Pos.z, 1.f));
}
GUI::SameLine();
if (GUI::SmallButton("Clear"))
{
m_Points[0].clear();
}
GUI::Separator();
GUI::Text("Points[0] Count : %d", (_int)m_Points[0].size());
for (_uint i = 0; i < m_Points[0].size();)
{
_vector v = m_Points[0][i];
XMFLOAT3 p;
XMStoreFloat3(&p, v);
GUI::PushID(i);
GUI::Text("[%d] (%.2f, %.2f, %.2f)", i, p.x, p.y, p.z);
GUI::SameLine();
if (GUI::SmallButton("X"))
{
m_Points[0].erase(m_Points[0].begin() + i);
GUI::PopID();
continue;
}
GUI::PopID();
i++;
}
if (GUI::Button("MovePos"))
{
m_pCharacter_Controller->Set_Position(XMVectorSet(m_pGameInstance->Get_CamPosition()->x, m_pGameInstance->Get_CamPosition()->y, m_pGameInstance->Get_CamPosition()->z,1.f));
m_pCharacter_Controller->Set_Position(XMVectorSet(m_pGameInstance->Get_CamPosition()->x, m_pGameInstance->Get_CamPosition()->y, m_pGameInstance->Get_CamPosition()->z, 1.f));
}
for (_uint i = 0; i < m_Points.size(); ++i)
{
GUI::Separator();
if (GUI::TreeNode(("Points " + to_string(i)).c_str()))
{
if (GUI::SmallButton("Copy"))
{
char buf[128];
sprintf_s(buf, "<Pos x=\"%.3f\" y=\"%.3f\" z=\"%.3f\"/>", Pos.x, Pos.y, Pos.z);
GUI::SetClipboardText(buf);
m_Points[i].push_back(XMVectorSet(Pos.x, Pos.y, Pos.z, 1.f));
}
GUI::Text("Points[%d] Count : %d", i, (_int)m_Points[i].size());
for (_uint j = 0; j < m_Points[i].size(); )
{
_float3 p;
XMStoreFloat3(&p, m_Points[i][j]);
GUI::PushID((int)(i * 10000 + j));
GUI::Text("[%d] (%.2f, %.2f, %.2f)", j, p.x, p.y, p.z);
GUI::SameLine();
if (GUI::SmallButton("Move"))
{
m_pCharacter_Controller->Set_Position(
XMVectorSet(p.x, p.y, p.z, 1.f));
}
GUI::SameLine();
if (GUI::SmallButton("X"))
{
m_Points[i].erase(m_Points[i].begin() + j);
GUI::PopID();
continue;
}
GUI::PopID();
++j;
}
if (GUI::SmallButton(("Clear##" + to_string(i)).c_str()))
{
m_Points[i].clear();
}
GUI::TreePop();
}
}
m_pTransformCom->Describe_Entity();
@@ -22,9 +22,10 @@ CRanrok_Breath::CRanrok_Breath(const CRanrok_Breath& rhs)
HRESULT CRanrok_Breath::Initialize_Prototype()
{
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath")))
return E_FAIL;
return S_OK;
}
@@ -56,35 +57,6 @@ HRESULT CRanrok_Breath::Initialize(void* pArg)
m_fDuration = 5.f;
m_Events.emplace(0.5f, [&]() {
m_isStartRayCast = true;
});
m_Events.emplace(3.f, [&]() {
// 파티클 제어
m_isParticleEnd = true;
CEffectParts* pRock_PT = Get_PartObject<CEffectParts>("Rock_PT");
CEffectParts* pBottomFire = Get_PartObject<CEffectParts>("BottomFire");
CEffectParts* pSplatterBottom0 = Get_PartObject<CEffectParts>("SplatterBottom0");
m_pMouthFire->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
pRock_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
pBottomFire->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
pSplatterBottom0->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
m_pBreath->Get_Component<CInstance_Model>()->Set_Loop(false);
m_pBreath->Get_Effect_Info()->isDissolve = true;
m_pBreath_Black->Get_Component<CInstance_Model>()->Set_Loop(false);
m_pBreath_Black->Get_Effect_Info()->isDissolve = true;
m_pBreathSlog->Set_Visible(false);
});
return S_OK;
}
@@ -104,13 +76,13 @@ void CRanrok_Breath::Update(_float fTimeDelta)
Update_Event(fTimeDelta);
_matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component<CModel>()->Get_BoneMatrixPtr("tongue_01"));
_matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component<CModel>()->Get_BoneMatrixPtr("jaw"));
for (int i = 0; i < 3; ++i) {
BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
}
_matrix WorldMat = m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix() ;
_matrix WorldMat = m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix();
_matrix CombinedMat = BoneMat * WorldMat;
@@ -120,7 +92,7 @@ void CRanrok_Breath::Update(_float fTimeDelta)
m_pBreath_Black->Get_Component<CTransform>()->Set_WorldMatrix(CombinedMat);
m_pBreathSlog->Get_Component<CTransform>()->Set_WorldMatrix(CombinedMat);
if(m_isParticleEnd == false)
if (m_isParticleEnd == false)
m_pMouthFire->Get_Component<CTransform>()->Set_State(STATE::POSITION, CombinedMat.r[3]);
@@ -128,7 +100,7 @@ void CRanrok_Breath::Update(_float fTimeDelta)
XMStoreFloat4(&m_vStartPos, vStartPos);
if(m_isStartRayCast == true)
if (m_isStartRayCast == true)
{
ON_COLLISION_INFO CollisionInfo = MonsterRayCast(XMLoadFloat4(&m_vStartPos), CombinedMat.r[2] * -1.f, 50.f, 50);
if (m_bHit = true)
@@ -137,7 +109,7 @@ void CRanrok_Breath::Update(_float fTimeDelta)
}
}
void CRanrok_Breath::Late_Update(_float fTimeDelta)
@@ -156,52 +128,58 @@ HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg)
return E_FAIL;
/* 브레스 시간 제어 */
_float fBreathTime = *static_cast<_float*>(pArg);
Set_BreathTime(fBreathTime);
/* 초기 객체 비지블*/
CEffectParts* pBlurMesh = Get_PartObject<CEffectParts>("BlurMesh");
m_pBreath->Set_Visible(true);
m_pBreath_Black->Set_Visible(true);
m_pBreathSlog->Set_Visible(true);
m_pMouthFire->Set_Visible(true);
pBlurMesh->Set_Visible(true);
m_pBreath->Set_Visible(true);
m_pBreath_Black->Set_Visible(true);
m_pBreathSlog->Set_Visible(true);
m_pMouthFire->Set_Visible(true);
pBlurMesh->Set_Visible(true);
/* 초기 객체 위치 초기화*/
_matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component<CModel>()->Get_BoneMatrixPtr("tongue_01"));
_matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component<CModel>()->Get_BoneMatrixPtr("jaw"));
for (int i = 0; i < 3; ++i) {
BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
}
_matrix WorldMat = m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix() ;
_matrix WorldMat = m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix();
_matrix CombinedMat = BoneMat * WorldMat;
m_pBreath->Get_Component<CTransform>()->Set_WorldMatrix(CombinedMat);
m_pBreath_Black->Get_Component<CTransform>()->Set_WorldMatrix(CombinedMat);
m_pBreathSlog->Get_Component<CTransform>()->Set_WorldMatrix(CombinedMat);
m_pBreath->Get_Component<CTransform>()->Set_WorldMatrix(CombinedMat);
m_pBreath_Black->Get_Component<CTransform>()->Set_WorldMatrix(CombinedMat);
m_pBreathSlog->Get_Component<CTransform>()->Set_WorldMatrix(CombinedMat);
_vector vStartPos = CombinedMat.r[3];
_vector vStartPos = CombinedMat.r[3];
XMStoreFloat4(&m_vStartPos, vStartPos);
XMStoreFloat4(&m_vStartPos, vStartPos);
m_pMouthFire->Get_Component<CTransform>()->Set_State(STATE::POSITION, CombinedMat.r[3]);
pBlurMesh->Get_Component<CTransform>()->Set_State(STATE::POSITION, CombinedMat.r[3]);
m_pMouthFire->Get_Component<CTransform>()->Set_State(STATE::POSITION, CombinedMat.r[3]);
pBlurMesh->Get_Component<CTransform>()->Set_State(STATE::POSITION, CombinedMat.r[3]);
/* 브레스 디졸브를 위해 초기값 설정*/
m_pBreath->Get_Component<CInstance_Model>()->Set_Loop(true);
m_pBreath->Get_Effect_Info()->isDissolve = false;
/* 브레스 디졸브를 위해 초기값 설정*/
m_pBreath->Get_Component<CInstance_Model>()->Set_Loop(true);
m_pBreath->Get_Effect_Info()->isDissolve = false;
m_pBreath_Black->Get_Component<CInstance_Model>()->Set_Loop(true);
m_pBreath_Black->Get_Effect_Info()->isDissolve = false;
m_pBreath_Black->Get_Component<CInstance_Model>()->Set_Loop(true);
m_pBreath_Black->Get_Effect_Info()->isDissolve = false;
m_isParticleEnd = false;
m_isStartRayCast = false;
m_isParticleEnd = false;
m_isStartRayCast = false;
return S_OK;
}
@@ -280,6 +258,42 @@ void CRanrok_Breath::OnCollision(CGameObject* pOther, void* pDesc)
XMStoreFloat4(&m_vPreCollisionPos, vPos);
}
void CRanrok_Breath::Set_BreathTime(_float fTime)
{
m_Events.clear();
m_Events.emplace(fTime, [&]() {
m_pBreath->Get_Component<CInstance_Model>()->Set_Loop(false);
m_pBreath->Get_Effect_Info()->isDissolve = true;
m_pBreath_Black->Get_Component<CInstance_Model>()->Set_Loop(false);
m_pBreath_Black->Get_Effect_Info()->isDissolve = true;
m_pBreathSlog->Set_Visible(false);
});
m_Events.emplace(fTime + 0.5f, [&]() {
// 파티클 제어
m_isParticleEnd = true;
CEffectParts* pRock_PT = Get_PartObject<CEffectParts>("Rock_PT");
CEffectParts* pBottomFire = Get_PartObject<CEffectParts>("BottomFire");
CEffectParts* pSplatterBottom0 = Get_PartObject<CEffectParts>("SplatterBottom0");
m_pMouthFire->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
pRock_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
pBottomFire->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
pSplatterBottom0->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
});
m_Events.emplace(0.25f, [&]() {
m_isStartRayCast = true;
});
}
void CRanrok_Breath::Free()
{
__super::Free();
@@ -290,7 +304,7 @@ void CRanrok_Breath::Free()
SAFE_RELEASE(m_pBreath_Black);
SAFE_RELEASE(m_pBreathSlog);
SAFE_RELEASE(m_pMouthFire);
//SAFE_RELEASE(m_pFireBall_Tail);
}
#ifdef _DEBUG
@@ -0,0 +1,187 @@
#include "pch.h"
#include "Ranrok_Charge.h"
#include "GameInstance.h"
#include "EffectParts.h"
#include "Wand.h"
#include "Player.h"
#include "InfoInstance.h"
CRanrok_Charge::CRanrok_Charge(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CEffect_Container{ pDevice, pContext }
{
}
CRanrok_Charge::CRanrok_Charge(const CRanrok_Charge& rhs)
: CEffect_Container(rhs),
m_pInfoInstance(CInfoInstance::GetInstance())
{
SAFE_ADDREF(m_pInfoInstance);
}
HRESULT CRanrok_Charge::Initialize_Prototype()
{
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokCharge")))
return E_FAIL;
return S_OK;
}
HRESULT CRanrok_Charge::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
if (FAILED(Create_Effect()))
return E_FAIL;
m_wstrEffectName = L"RanrokCharge";
m_fDuration = 4.f;
return S_OK;
}
void CRanrok_Charge::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
}
void CRanrok_Charge::Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Update(fTimeDelta);
Update_Event(fTimeDelta);
}
void CRanrok_Charge::Late_Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Late_Update(fTimeDelta);
}
HRESULT CRanrok_Charge::Pre_Setting(CGameObject* pObject, void* pArg)
{
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
return E_FAIL;
/* 초기 객체 비지블*/
CEffectParts* pCharge_Goo = Get_PartObject<CEffectParts>("Charge_Goo");
CEffectParts* pCombinedPT = Get_PartObject<CEffectParts>("CombinedPT");
pCharge_Goo->Set_Visible(true);
pCombinedPT->Set_Visible(true);
/* 초기 객체 위치 초기화*/
_vector vOwnerPos = m_pOwner->Get_Component<CCharacter_Controller>()->Get_Position();
pCharge_Goo->Get_Component<CTransform>()->Set_State(STATE::POSITION, vOwnerPos);
pCombinedPT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vOwnerPos);
return S_OK;
}
HRESULT CRanrok_Charge::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CRanrok_Charge::Ready_Child()
{
return S_OK;
}
CRanrok_Charge* CRanrok_Charge::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CRanrok_Charge* pInstance = new CRanrok_Charge(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CRanrok_Charge");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CRanrok_Charge::Clone(void* pArg, CGameObject* pOwner)
{
CRanrok_Charge* pInstance = new CRanrok_Charge(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CRanrok_Charge");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CRanrok_Charge::OnCollision(CGameObject* pOther, void* pDesc)
{
if (m_bHit == false)
return;
ON_COLLISION_INFO CollisionDesc = *static_cast<ON_COLLISION_INFO*>(pDesc);
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
}
void CRanrok_Charge::Free()
{
__super::Free();
SAFE_RELEASE(m_pInfoInstance);
}
#ifdef _DEBUG
void CRanrok_Charge::Describe_Entity()
{
}
#endif
HRESULT CRanrok_Charge::Bind_ShaderResources()
{
return S_OK;
}
@@ -0,0 +1,209 @@
#include "pch.h"
#include "Ranrok_Pulse.h"
#include "GameInstance.h"
#include "EffectParts.h"
#include "Wand.h"
#include "Player.h"
#include "InfoInstance.h"
CRanrok_Pulse::CRanrok_Pulse(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CEffect_Container{ pDevice, pContext }
{
}
CRanrok_Pulse::CRanrok_Pulse(const CRanrok_Pulse& rhs)
: CEffect_Container(rhs),
m_pInfoInstance(CInfoInstance::GetInstance())
{
SAFE_ADDREF(m_pInfoInstance);
}
HRESULT CRanrok_Pulse::Initialize_Prototype()
{
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokPulse")))
return E_FAIL;
return S_OK;
}
HRESULT CRanrok_Pulse::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
if (FAILED(Create_Effect()))
return E_FAIL;
m_wstrEffectName = L"RanrokPulse";
m_fDuration = 15.f;
return S_OK;
}
void CRanrok_Pulse::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
}
void CRanrok_Pulse::Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Update(fTimeDelta);
Update_Event(fTimeDelta);
}
void CRanrok_Pulse::Late_Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Late_Update(fTimeDelta);
}
HRESULT CRanrok_Pulse::Pre_Setting(CGameObject* pObject, void* pArg)
{
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
return E_FAIL;
/* 초기 객체 비지블*/
CEffectParts* pBottomDecal = Get_PartObject<CEffectParts>("Bottom_Decal");
CEffectParts* pBottomSplatter = Get_PartObject<CEffectParts>("BottomSplatter");
CEffectParts* pBottomSplatter2 = Get_PartObject<CEffectParts>("BottomSplatter2");
CEffectParts* pRed_Sphere = Get_PartObject<CEffectParts>("Red_Sphere");
CEffectParts* pRock_PT = Get_PartObject<CEffectParts>("Rock_PT");
CEffectParts* pSmoke = Get_PartObject<CEffectParts>("Smoke");
pBottomDecal->Set_Visible(true);
pBottomSplatter->Set_Visible(true);
pBottomSplatter2->Set_Visible(true);
pRock_PT->Set_Visible(true);
pSmoke->Set_Visible(true);
pRed_Sphere->Set_Visible(true);
/* 초기 객체 위치 초기화*/
_vector vOwnerPos = m_pOwner->Get_Component<CCharacter_Controller>()->Get_Position();
pRed_Sphere->Get_Component<CTransform>()->Set_WorldMatrix(m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix());
pRed_Sphere->Get_Component<CTransform>()->Set_State(STATE::POSITION, vOwnerPos);
CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
if (pPlayer == nullptr)
return E_FAIL;
_vector vPlayer_FootPos = pPlayer->Get_Component<CCharacter_Controller>()->Get_FootPosition();
XMStoreFloat4(&m_vTargetPos, vPlayer_FootPos);
_vector vCompute_Pos = XMVectorSetY(vOwnerPos, XMVectorGetY(vPlayer_FootPos));
pBottomDecal->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
pBottomSplatter->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
pBottomSplatter2->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
pRock_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
pSmoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, vCompute_Pos);
return S_OK;
}
HRESULT CRanrok_Pulse::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CRanrok_Pulse::Ready_Child()
{
return S_OK;
}
CRanrok_Pulse* CRanrok_Pulse::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CRanrok_Pulse* pInstance = new CRanrok_Pulse(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CRanrok_Pulse");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CRanrok_Pulse::Clone(void* pArg, CGameObject* pOwner)
{
CRanrok_Pulse* pInstance = new CRanrok_Pulse(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CRanrok_Pulse");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CRanrok_Pulse::OnCollision(CGameObject* pOther, void* pDesc)
{
if (m_bHit == false)
return;
ON_COLLISION_INFO CollisionDesc = *static_cast<ON_COLLISION_INFO*>(pDesc);
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
}
void CRanrok_Pulse::Free()
{
__super::Free();
SAFE_RELEASE(m_pInfoInstance);
}
#ifdef _DEBUG
void CRanrok_Pulse::Describe_Entity()
{
}
#endif
HRESULT CRanrok_Pulse::Bind_ShaderResources()
{
return S_OK;
}
+206 -88
View File
@@ -56,12 +56,59 @@ void CRanrok::Behavior_IdleBreakEnter()
{
m_pFSM->Enable_State(FSMSTATE::IDLEBREAK);
pair<_uint, _bool> pairAnimInfo;
m_bLookAt = true;
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK2];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
{
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK2];
}
else if(m_ePhase== ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) {
if (m_fDegree < 30.f)
{
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
if (iRand == 0)
{
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK3];
}
else {
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK4];
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
else if (m_fDegree < 80.f)
{
if (m_fCross < 0.f)
{
pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_45_L];
}
else {
pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_45_R];
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.5f);
}
else if (m_fDegree < 150.f)
{
if (m_fCross < 0.f)
{
pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_90_L];
}
else {
pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_90_R];
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false, 1.5f);
}
else {
if (m_fCross < 0.f)
{
pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_180_L];
}
else {
pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_180_R];
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,1.5f);
}
}
}
HRESULT CRanrok::Behavior_IdleBreakExitCheck()
HRESULT CRanrok::Behavior_IdleBreakExitCheck(_float fTimeDelta)
{
if (m_pModelCom->IsFinishedAnim()) {
m_pFSM->Change_State(FSMSTATE::COMBAT);
@@ -118,7 +165,6 @@ HRESULT CRanrok::Behavior_CombatExitCheck(_float fTimeDelta)
return E_FAIL;
}
if (m_fTargetDistance <= 100.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] <= 0.f)
{
m_pFSM->Change_State(FSMSTATE::FIREBREATH);
@@ -152,17 +198,11 @@ HRESULT CRanrok::Behavior_CombatExitCheck(_float fTimeDelta)
}
else {
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) {
m_pFSM->Change_State(FSMSTATE::HOVER);
m_pFSM->Change_State(FSMSTATE::IDLE);
return E_FAIL;
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) {
if (m_pFSM->IsEnable_Previous(FSMSTATE::TUCKED | FSMSTATE::PULSE))
{
m_pFSM->Change_State(FSMSTATE::LAND);
}
else {
m_pFSM->Change_State(FSMSTATE::GROUND);
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) {
m_pFSM->Change_State(FSMSTATE::GROUND);
return E_FAIL;
}
}
@@ -286,34 +326,57 @@ void CRanrok::Behavior_FlyExit()
void CRanrok::Behavior_FireBreathEnter()
{
pair<_uint, _bool> pairAnimInfo = {};
m_bLookAt = true;
m_pFSM->Enable_State(FSMSTATE::FIREBREATH);
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
{
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_WINDUP_A];
Add_Event(pairAnimInfo.first,
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)];
m_pModelCom->Play_HeadBone(true);
m_bLookAt = false; },
0.95f);
[&]() {
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)];
m_bLookAt = false;
}, 0.95f);
Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); },
0.95f);
[&]() {
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_bLookAt = true;
}, 0.95f);
Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
[this]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
_float fBreathTime = 1.f;
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime);
}, 0.1f);
/*Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
[this]() {
m_pModelCom->Play_HeadBone(true);
}, 0.2f);*/
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_G];
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)];
Add_Event(pairAnimInfo.first,
[this]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
m_bLookAt = false;
}, 0.1f);
Add_Event(pairAnimInfo.first,
[this]() {
m_pModelCom->Play_HeadBone(true);
}, 0.2f);
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
@@ -322,34 +385,38 @@ HRESULT CRanrok::Behavior_FireBreathExitCheck(_float fTimeDelta)
{
pair<_uint, _bool> pairAnimInfo = {};
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
if (m_pModelCom->Get_PlayHeadBone())
{
m_fHeadAimWeight += fTimeDelta;
if (m_fHeadAimWeight >= 1.f)
m_fHeadAimWeight += fTimeDelta *0.3f;
if (m_fHeadAimWeight >= 0.7f)
{
m_fHeadAimWeight = 1.f;
m_fHeadAimWeight = 0.7f;
}
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
}
if (iCurrAnimIndex == m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A].first)
if (iCurrAnimIndex == m_Animation[STATEANIM::FIREBREATH_G].first && fRatio >= 0.8f)
{
m_fHeadAimWeight -= fTimeDelta * 2.f;
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
m_fHeadAimWeight -= fTimeDelta*1.5f;
if (m_fHeadAimWeight >= 0.f) {
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
}
else {
m_pModelCom->Set_HeadAimWeight(0.f);
}
}
if (m_pModelCom->IsFinishedAnim())
{
m_pModelCom->Play_HeadBone(false);
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
{
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) {
m_pFSM->Change_State(FSMSTATE::HOVER);
}
else {
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
return E_FAIL;
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) {
m_pFSM->Change_State(FSMSTATE::GROUND);
return E_FAIL;
}
return E_FAIL;
}
return S_OK;
@@ -358,6 +425,8 @@ HRESULT CRanrok::Behavior_FireBreathExitCheck(_float fTimeDelta)
void CRanrok::Behavior_FireBreathExit()
{
m_pFSM->Disable_State(FSMSTATE::FIREBREATH);
//m_pModelCom->Set_HeadAimWeight(0.f);
//m_pModelCom->Play_HeadBone(false);
m_fHeadAimWeight = 0.f;
}
@@ -374,7 +443,6 @@ void CRanrok::Behavior_FireSweepEnter()
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_A];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)];
m_pModelCom->Play_HeadBone(true);
m_bLookAt = false; },
0.95f);
@@ -384,11 +452,20 @@ void CRanrok::Behavior_FireSweepEnter()
},
0.95f);
Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first,
[this]() {
_float fBreathTime = 3.f;
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this, &fBreathTime);
}, 0.08f);
Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first,
[this]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
}, 0.08f);
m_pModelCom->Play_HeadBone(true);
},
0.2f);
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
@@ -398,8 +475,17 @@ void CRanrok::Behavior_FireSweepEnter()
Add_Event(m_Animation[STATEANIM::FIRESWEEP_G].first,
[this]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
m_bLookAt = false;
}, 0.2f);
Add_Event(m_Animation[STATEANIM::FIRESWEEP_G].first,
[this]() {
m_pModelCom->Play_HeadBone(true);
}, 0.3f);
}
m_iBreathRand = (m_pGameInstance->Real_Random_Int(0, 1) == 0) ? -1 : 1;
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
@@ -407,35 +493,34 @@ HRESULT CRanrok::Behavior_FireSweepExitCheck(_float fTimeDelta)
{
pair<_uint, _bool> pairAnimInfo = {};
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
if (m_pModelCom->Get_PlayHeadBone())
{
m_fHeadAimWeight += fTimeDelta;
if (m_fHeadAimWeight >= 1.f)
m_fHeadAimWeight += fTimeDelta * 0.3f;
if (m_fHeadAimWeight >= 0.7f)
{
m_fHeadAimWeight = 1.f;
m_fHeadAimWeight = 0.7f;
}
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
}
if (iCurrAnimIndex == m_Animation[STATEANIM::FIRESWEEP_COOLDOWN_A].first)
if (iCurrAnimIndex == m_Animation[STATEANIM::FIRESWEEP_COOLDOWN_A].first ||
iCurrAnimIndex == m_Animation[STATEANIM::FIRESWEEP_G].first && fRatio >= 0.8f)
{
m_fHeadAimWeight -= fTimeDelta * 2.f;
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
m_fHeadAimWeight -= fTimeDelta * 1.5f;
if (m_fHeadAimWeight >= 0.f) {
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
}
else {
m_pModelCom->Set_HeadAimWeight(0.f);
}
}
if (m_pModelCom->IsFinishedAnim())
{
m_pModelCom->Play_HeadBone(false);
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
{
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
return E_FAIL;
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) {
m_pFSM->Change_State(FSMSTATE::GROUND);
return E_FAIL;
}
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
return E_FAIL;
}
return S_OK;
@@ -444,6 +529,8 @@ HRESULT CRanrok::Behavior_FireSweepExitCheck(_float fTimeDelta)
void CRanrok::Behavior_FireSweepExit()
{
m_pFSM->Disable_State(FSMSTATE::FIRESWEEP);
m_pModelCom->Set_HeadAimWeight(0.f);
m_pModelCom->Play_HeadBone(false);
m_fHeadAimWeight = 0.f;
}
@@ -521,11 +608,10 @@ HRESULT CRanrok::Behavior_FireBallExitCheck(_float fTimeDelta)
return E_FAIL;
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) {
m_pFSM->Change_State(FSMSTATE::GROUND);
m_pFSM->Change_State(FSMSTATE::COMBAT);
return E_FAIL;
}
}
return S_OK;
}
@@ -540,17 +626,16 @@ void CRanrok::Behavior_SwipeEnter()
m_pFSM->Enable_State(FSMSTATE::SWIPE);
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
/*if (m_fCross > 0)
{*/
pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_L];
/*}
if (m_fCross > 0.f)
{
pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_L];
}
else {
pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_R];
}*/
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::SWIPE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::SWIPE)];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
@@ -624,7 +709,7 @@ HRESULT CRanrok::Behavior_RushExitCheck(_float fTimeDelta)
vLook = XMVectorSetY(vLook, 0.f);
vLook = XMVector3Normalize(vLook);
_vector vPos = m_pCharacter_Controller->Get_Position();
_vector vNextPos = vPos + vLook * 5.f * fTimeDelta;
_vector vNextPos = vPos + vLook * 8.f * fTimeDelta;
m_pCharacter_Controller->Set_Position(vNextPos);
return S_OK;
}
@@ -655,8 +740,16 @@ void CRanrok::Behavior_PulseEnter()
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
Add_Event(pairAnimInfo.first,
[this]() { CameraShake(10.f, 2.f, 5.f, 1.2f); },
[this]() { CameraShake(10.f, 2.f, 5.f, 1.2f);
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_PURSE, this);
},
0.39f);
Add_Event(pairAnimInfo.first,
[this]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_CHARGE, this);
}, 0.f);
}
HRESULT CRanrok::Behavior_PulseExitCheck(_float fTimeDelta)
@@ -667,7 +760,12 @@ HRESULT CRanrok::Behavior_PulseExitCheck(_float fTimeDelta)
if (fRatio >= 0.95f)
{
m_pFSM->Change_State(FSMSTATE::COMBAT);
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR)) {
m_pFSM->Change_State(FSMSTATE::COMBAT);
}
else {
m_pFSM->Change_State(FSMSTATE::LAND);
}
return E_FAIL;
}
return S_OK;
@@ -683,36 +781,37 @@ void CRanrok::Behavior_TuckedEnter()
{
pair<_uint, _bool> pairAnimInfo = {};
m_pFSM->Enable_State(FSMSTATE::TUCKED);
//if (m_iCurrentFlow == 0)
//{
// pairAnimInfo = m_Animation[STATEANIM::FLY];
//}
//else {
// pairAnimInfo = m_Animation[STATEANIM::TUCKED];
//}
pairAnimInfo = m_Animation[STATEANIM::FLY];
m_bDisolve = true;
pairAnimInfo = m_Animation[STATEANIM::TUCKED];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
Add_Event(pairAnimInfo.first,
[this]() {
m_bVisible = false;
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_POINT, this, nullptr, &m_pRanrok_Point);
}, 0.1f);
}, 0.05f);
}
HRESULT CRanrok::Behavior_TuckedExitCheck(_float fTimeDelta)
{
pair<_uint, _bool> pairAnimInfo = {};
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
MoveTo(fTimeDelta);
if (m_fDisolveTime >= 0.3f) {
MoveTo(fTimeDelta);
}
if (m_bTucked && iCurrAnimIndex != m_Animation[STATEANIM::FLY_TO_HOVER].first)
{
m_bDisolveReverse = true;
m_iCurrentFlow++;
pairAnimInfo = m_Animation[STATEANIM::FLY_TO_HOVER];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) {
m_pFSM->Change_State(FSMSTATE::LAND);
return E_FAIL;
}
else {
pairAnimInfo = m_Animation[STATEANIM::FLY_TO_HOVER];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
}
if (m_pModelCom->IsFinishedAnim() && iCurrAnimIndex == m_Animation[STATEANIM::FLY_TO_HOVER].first)
@@ -729,20 +828,23 @@ void CRanrok::Behavior_TuckedExit()
m_pRanrok_Point->Setting_Pos(XMVectorSet(0.f, -500.f, 0.f, 1.f));
SAFE_RELEASE(m_pRanrok_Point);
m_pFSM->Disable_State(FSMSTATE::TUCKED);
m_bTucked = false;
}
void CRanrok::Behavior_LandEnter()
{
pair<_uint, _bool> pairAnimInfo = {};
m_pFSM->Enable_State(FSMSTATE::LAND);
_float fAnimSpeed = 1.f;
m_pCharacter_Controller->SetGravity(true);
m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_GROUND);
if (m_pFSM->IsEnable_Previous(FSMSTATE::TUCKED)) {
fAnimSpeed = 2.f;
}
pairAnimInfo = m_Animation[STATEANIM::LAND];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,false,fAnimSpeed);
Add_Event(pairAnimInfo.first,
[this]() { CameraShake(30.f, 5.f, 10.f, 1.2f); },
@@ -829,6 +931,22 @@ void CRanrok::Behavior_DeadExit()
m_bDead = true;
}
_bool CRanrok::IsHitStateDisabled()
{
return m_pFSM->IsEnable(FSMSTATE::FIREBREATH | FSMSTATE::FIRESWEEP | FSMSTATE::FIREBALL | FSMSTATE::PULSE | FSMSTATE::SWIPE | FSMSTATE::RUSH |FSMSTATE::SKILL);
}
_bool CRanrok::IsHitSpellDisabled()
{
if (m_eHitSpell == ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC) ||
m_eHitSpell == ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW) ||
m_eHitSpell == ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA))
{
return true;
}
return false;
}
void CRanrok::Add_FSM()
{
@@ -848,7 +966,7 @@ void CRanrok::Add_FSM()
CState_IdleBreak::STATE_IDLEBREAK_DESC Desc{};
Desc.pOwner = this;
Desc.funcEnterEvent = [this]() { Behavior_IdleBreakEnter(); };
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleBreakExitCheck(); };
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleBreakExitCheck(fTimedelta); };
Desc.funcExitEvent = [this]() { Behavior_IdleBreakExit(); };
Desc.funcPriorityUpdate = nullptr;
Desc.funcLateUpdate = nullptr;
+1 -1
View File
@@ -252,7 +252,7 @@ void CTerrain::Free()
void CTerrain::Describe_Entity()
{
GUI::Begin("Renderer", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
size_t iIndex = (size_t)this;
+3 -1
View File
@@ -428,8 +428,10 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc)
return;
}
if(m_eHitSpell != ENUM_CLASS(SKILL_TYPE::JAP))
if (m_pFSM->IsEnable(FSMSTATE::SLAM) || IsHitSpellDisabled()) {
m_pFSM->Change_State(FSMSTATE::HIT);
}
}
void CTroll::OnHit(CGameObject* pOther, CGameObject* pCaller)
@@ -278,7 +278,7 @@ void CTroll_Rock::Free()
void CTroll_Rock::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
if (GUI::CollapsingHeader("TrollRock")) {
GUI::Checkbox("Visible", &m_bVisible);
}
@@ -463,7 +463,7 @@ void CTroll::Behavior_SwingEnter()
0.6f);
Set_Easing(pairAnimInfo.first, 0.1f, 0.47f, 1.5f);
Set_Easing(pairAnimInfo.first, 0.1f, 0.47f, 1.8f);
Set_Easing(pairAnimInfo.first, 0.47f, 0.5f, 0.5f);
}
@@ -520,7 +520,7 @@ void CTroll::Behavior_SlamEnter()
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_ATTACK, this);
}, 0.3f);
Set_Easing(pairAnimInfo.first, 0.1f, 0.42f, 1.5f);
Set_Easing(pairAnimInfo.first, 0.1f, 0.42f, 1.8f);
Set_Easing(pairAnimInfo.first, 0.42f, 0.45f, 0.5f);
@@ -573,7 +573,7 @@ void CTroll::Behavior_BackHandSwingEnter()
},
0.9f);
Set_Easing(pairAnimInfo.first, 0.1f, 0.45f, 1.5f);
Set_Easing(pairAnimInfo.first, 0.1f, 0.45f, 1.8f);
Set_Easing(pairAnimInfo.first, 0.65f, 0.7f, 0.5f);
}
@@ -727,6 +727,17 @@ void CTroll::Behavior_DeadExit()
m_bDead = true;
}
_bool CTroll::IsHitSpellDisabled()
{
if (m_eHitSpell == ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC) ||
m_eHitSpell == ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW) ||
m_eHitSpell == ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA))
{
return true;
}
return false;
}
void CTroll::Add_FSM()
{
+1 -1
View File
@@ -73,7 +73,7 @@ void CWand::Late_Update(_float fTimeDelta)
HRESULT CWand::Render()
{
if (!m_pModelCom)
if (!m_bVisible)
return S_OK;
if (FAILED(Bind_ShaderResources())) {
+2 -1
View File
@@ -38,6 +38,7 @@ class CBroom final : public CUnit
void Set_Input(BroomInput broomInput) { m_Input = broomInput; }
void Set_AISpeed(_float speedMul, _float accelMul);
void Set_Move(_bool bMove) { m_bMove = bMove; }
_bool Get_Move() { return m_bMove; }
HRESULT Ready_Child();
private:
CInfoInstance* m_pInfoInstance = { nullptr };
@@ -52,7 +53,7 @@ class CBroom final : public CUnit
_float m_fSpeed = 0.f;
_float m_fTurnSpeed = 0.f;
_float m_fTargetSpeed = 0.f;
_float m_fTurnMaxSpeed = 8.f;
_float m_fTurnMaxSpeed = 12.f;
_float m_fFlyTurnMaxSpeed = 9.f;
_float m_fTurboTurnMaxSpeed = 12.f;
_float m_fHoverMaxSpeed = 5.f;
@@ -41,6 +41,8 @@ class CBroomRaceManager final : public CGameObject
void Push_BroomRacer(RacerInfo Info);
void Push_RaceRing(class CRaceRing* Ring);
_int Get_RaceState() const { return m_eRaceState; }
HRESULT Load_RaceRing();
private:
CInfoInstance* m_pInfoInstance = { nullptr };
@@ -73,7 +75,6 @@ class CBroomRaceManager final : public CGameObject
virtual void Free() override;
#ifdef _DEBUG
virtual void Describe_Entity() override;
#endif
};
@@ -41,7 +41,6 @@ class CBroomRacerAI final : public CUnit
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
void Set_RaceRing(class CRaceRing* pRaceRing) {m_pRaceRing = pRaceRing;}
class CBroom* Get_Broom() { return m_pBroom; }
void Set_Move(_bool bMove) { m_bMove = bMove; }
private:
CLight* m_pLightCom = { nullptr };
LIGHT_DESC LightDesc = {};
@@ -99,7 +98,6 @@ class CBroomRacerAI final : public CUnit
_float m_fScaleSmoothSpeed = 2.5f;
_float m_fAnimTime = {};
_bool m_bTurbo = {};
_bool m_bMove = {};
_float m_LaneOffsetX = 0.f;
_float m_LaneOffsetY = 0.f;
_float m_TurnGain = 1.f;
+2 -2
View File
@@ -11,7 +11,7 @@ namespace Client
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END };
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION, NONPOS, NONPOS_BLUR , BLUR_MESH, BLUR_CULLING, BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING, DEFAULT_NONPOS, NONWB_NONPOS ,DECAL, DECAL_WB ,DECAL_BLUR , END};
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION, NONPOS, NONPOS_BLUR , BLUR_MESH, BLUR_CULLING, BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING, DEFAULT_NONPOS, NONWB_NONPOS ,DECAL, DECAL_WB ,DECAL_BLUR , BLEND_CULLING,END};
enum class SHADER_PASS_UIEDITOR {
DEFAULT, COLOR, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR,
LODING, HOLD_ROTATION, MISSION, QUESTTYPE, UVMULT, NINECLICE,
@@ -72,7 +72,7 @@ namespace Client
/*란록*/
RANROK_FIREBALL, RANROK_BREATH, RANROK_POINT,
RANROK_FIREBALL, RANROK_BREATH, RANROK_POINT, RANROK_PURSE, RANROK_CHARGE,
END
};
@@ -67,6 +67,8 @@ namespace Client {
#define LAYER_UNIFIED TEXT("Layer_Unified")
#define LAYER_DOOR TEXT("Layer_Door")
#define LAYER_HIDDEN TEXT("Layer_HIDDEN")
#define LAYER_RING TEXT("Layer_Ring")
#define LAYER_RACERAI TEXT("Layer_RacerAI")
#define LAYER_MAPOBJECTMANAGER TEXT("Layer_MapObjectManager")
@@ -35,9 +35,7 @@ class CLevel_GamePlay final : public CLevel
HRESULT Ready_Layer_Camera();
HRESULT Ready_Layer_Sound();
HRESULT Ready_Layer_Player(const _wstring& strLayerTag);
HRESULT Ready_Layer_BroomRacerAI(const _wstring& strLayerTag);
HRESULT Ready_Layer_Item(const _wstring& strLayerTag);
HRESULT Ready_Layer_RaceRing(const _wstring& strLayerTag);
HRESULT Ready_Layer_ReparoObject(const _wstring& strLayerTag);
HRESULT Ready_Layer_SkyBox(const _wstring& strLayerTag);
HRESULT Ready_Layer_Monster();
@@ -38,6 +38,7 @@ class CMapElement_Chest final : public CMapElement
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
private:
ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END };
@@ -46,6 +47,9 @@ class CMapElement_Chest final : public CMapElement
_uint m_iShaderPass_Index = {};
_int m_iEntered = { 0 };
_float2 m_vEnteringTimer = { 0.f, 1.f };
_float m_fEncounterDistance = { 3.f };
_float m_fTimeAcc = {};
_float m_fRimLightPower = { 0.7f };
_float m_fRimLightStrength = { 3.7f };
@@ -53,7 +57,7 @@ class CMapElement_Chest final : public CMapElement
_float4 m_vRimLightColor = { 0.71f, 0.39f, 0.02f, 1.f };
CTexture* m_pNoiseTextureCom = { nullptr };
CRigidBody* m_pRigidBody = { nullptr };
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
PSX::PxRigidDynamic* m_pActor = { nullptr };
class CMapElement_Chest_Lid* m_pLid = { nullptr };
@@ -22,20 +22,20 @@ class CMapElement_Door final : public CMapElement
public:
virtual void Priority_Update(_float fTimeDelta) override;
void ActingIdle();
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
virtual void OnCollision(CGameObject* pOther, void* pDesc)override;
private:
CRigidBody* m_pRigidBody = { nullptr };
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
PSX::PxRigidDynamic* m_pActor = { nullptr };
PSX::PxRevoluteJoint* m_pJoint = { nullptr };
_float3 m_vRadianYAngle = {};
_float3 m_vKinematicTimer = { 0.f, 2.f, 2.3f };
PSX::PxQuat m_pxStartQuat = {};
_float4x4 m_InitialMatrix = {};
_bool m_bDrive = { false };
#ifdef _DEBUG
_bool m_bUseSelectColor = { true };
@@ -50,9 +50,6 @@ class CMapElement_Door final : public CMapElement
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
virtual HRESULT Bind_ShaderResources() override;
void Lerp_Matrix(_float fTime);
void Lerp_NonMatrix(_float fTime);
_float ClampRadian(_float fNewRadian);
public:
static CMapElement_Door* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+5 -1
View File
@@ -33,8 +33,10 @@ class CMonster abstract : public CUnit
virtual _float2 Get_Hp();
virtual CStat* Get_Stat();
const _float4x4* Get_HeadMatrix();
_float Get_HpRatio();
void CameraShake(_float ClampValue, _float Min, _float Max, _float Time);
virtual _bool IsHitStateDisabled();
virtual _bool IsHitSpellDisabled();
protected:
CInfoInstance* m_pInfoInstance = { nullptr };
CUnit* m_pTarget = { nullptr };
@@ -71,6 +73,8 @@ class CMonster abstract : public CUnit
#endif // _DEBUG
};
NS_END
@@ -23,23 +23,24 @@ class CNPC_EleazarFig final : public CUnit
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
virtual HRESULT Render_Shadow(SHADOW eType) override;
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
protected:
CInfoInstance* m_pInfoInstance = { nullptr };
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
CUnit* m_pPlayerAllyUnit = { nullptr };
_bool m_bEntered = { false };
_float2 m_vEnteringTimer = { 0.f, 1.f };
_float m_fEncounterDistance = { 10.f };
_int m_iEntered = { 0 };
_float2 m_vEnteringTimer = { 0.f, 1.f };
_float m_fEncounterDistance = { 3.f };
protected:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
HRESULT Ready_Components(void* pArg);
HRESULT Bind_ShaderResources() override;
_bool CastToPlayer();
public:
static CNPC_EleazarFig* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -24,9 +24,11 @@ class CNPC_Ollivander final : public CUnit
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
virtual HRESULT Render_Shadow(SHADOW eType) override;
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
protected:
CInfoInstance* m_pInfoInstance = { nullptr };
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
CUnit* m_pPlayerAllyUnit = { nullptr };
@@ -35,7 +37,7 @@ class CNPC_Ollivander final : public CUnit
class CNPCInteraction* m_pNPCInteraction = { nullptr };
CNPCStat* m_pNpcStat = { nullptr };
_bool m_bEntered = { false };
_int m_iEntered = { 0 };
_float2 m_vEnteringTimer = { 0.f, 1.f };
_float m_fEncounterDistance = { 3.f };
protected:
@@ -43,7 +45,6 @@ class CNPC_Ollivander final : public CUnit
virtual HRESULT Initialize(void* pArg) override;
HRESULT Ready_Components(void* pArg);
HRESULT Bind_ShaderResources() override;
_bool CastToPlayer();
public:
static CNPC_Ollivander* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+9 -12
View File
@@ -34,13 +34,15 @@ class CPlayer final : public CUnit
_int Get_UIState() { return m_eUIState; }
void Set_RaceRing(class CRaceRing* pRaceRing);
class CBroom* Get_Broom() { return m_pBroom; }
#ifdef _DEBUG
void Render_CameraCoordinateSystem();
#endif // _DEBUG
void Set_RaceInfo();
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
_matrix Get_WandPos();
void UpdateGrapInteractive(_float fTimeDelta);
void Update_CameraShake(_float fTimeDelta);
HRESULT Update_RaycastElements();
#ifdef _DEBUG
void Render_CameraCoordinateSystem();
#endif // _DEBUG
private:
CInfoInstance* m_pInfoInstance = { nullptr };
LOCKON_INFO m_LockOnInfo = {};
@@ -60,8 +62,12 @@ class CPlayer final : public CUnit
_float m_fOriginGravityAmount = {};
_float m_fGravityAmount = {};
_float m_fTempWeight = {};
class CCamPosition_Shoulder* m_pCamPosition_ShoulderPart = { nullptr };
class CCamPosition_Head* m_pCamPosition_HeadPart = { nullptr };
_float m_fRayDistance = { 10.f };
_uint m_iRayHitCount = { 0 };
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
@@ -80,13 +86,6 @@ class CPlayer final : public CUnit
class CBroomRaceManager* m_pBroomRaceManager = { nullptr };
class CRaceRing* m_pRaceRing = { nullptr };
_float m_fTempWeight = {};
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
@@ -160,8 +159,6 @@ class CPlayer final : public CUnit
_float m_fMoveTime = {};
_float m_fCross = 0.f;
_float m_fabsDir = 0.f;
_float m_fNoInputTime = 0.f;
_float m_fNeutralTime = 0.f;
array<_float4x4, 256> SkinMatrices;
/* 무적 불 변수*/
+4 -1
View File
@@ -33,7 +33,6 @@ class CPlayerRobe final : public CPartObject
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
HRESULT Update_RobeSocketPosition();
HRESULT Bind_PrevBoneMatrices(CShader* pShader, const _char* pConstant);
vector<_float4x4> Get_RobeJointAnchorMatrix() const { return m_ReconstructedJointAnchorMatirces; }
_float4x4 Get_RobeJointAnchorMatrix(_uint iIndex) const { return m_ReconstructedJointAnchorMatirces[iIndex]; }
private:
@@ -51,10 +50,13 @@ class CPlayerRobe final : public CPartObject
_int m_iBoneNum = -1;
CRigidBody_Dynamic* m_pRightLeg = { nullptr };
CRigidBody_Dynamic* m_pLeftLeg = { nullptr };
CRigidBody_Dynamic* m_pLower0Bound = { nullptr };
CRigidBody_Dynamic* m_pLower1Bound = { nullptr };
CRigidBody_Dynamic* m_pRobeMainAnchor = { nullptr };
CRigidBody_Dynamic* m_pRobeJointRoute[ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END)] = { nullptr };
CRigidBody_Dynamic* m_pRobeJointAnchor[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
PSX::PxD6Joint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr };
D6JOINTDESC m_JointDescriptions[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { };
vector<_float4x4> m_PrevRobeBoneMatrices = { };
#ifdef _DEBUG
@@ -75,6 +77,7 @@ class CPlayerRobe final : public CPartObject
#ifdef _DEBUG
HRESULT Render_BonePhysX();
HRESULT Render_Legs();
HRESULT Update_RobeJoints();
#endif // _DEBUG
public:
static CPlayerRobe* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+3 -1
View File
@@ -11,7 +11,9 @@ class CRaceRing final : public CGameObject
typedef struct RaceRingDesc
{
class CBroomRaceManager* pBroomRaceManager = { nullptr };
_int iIndex = { 0 };
_float3 vPosition{};
_float3 vRotation{};
_float3 vScale{};
}RACERING_DESC;
private:
CRaceRing(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+11 -2
View File
@@ -77,6 +77,7 @@ class CRanrok final : public CMonster
HRESULT Render_Nonblend();
HRESULT Render_Blend();
void MoveTo(_float fTimeDelta);
void Update_Disolve(_float fTimeDelta);
HRESULT Load_RanrokPos(const _char* pFilePath);
public:
static CRanrok* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -101,6 +102,8 @@ class CRanrok final : public CMonster
_bool m_bHoverDash = { false };
_vector m_vMoveDir = XMVectorZero();
_bool m_bDisolveReverse = { false };
_float m_fDisolveDelay = 0.f;
vector<vector<_vector>> m_Points;
@@ -113,16 +116,18 @@ class CRanrok final : public CMonster
_float m_fAroundTime = {};
_float m_fRushTime = {};
_float m_fHeadAimWeight = {};
_float m_fPrevHpRatio = {};
_int m_iBreathRand = {};
class CEffect_Container* m_pRanrok_Point = { nullptr };
_float m_fTuckedSpeed = { 75.f };
_float m_fTuckedSpeed = { 50.f };
void Behavior_IdleEnter();
HRESULT Behavior_IdleExitCheck();
void Behavior_IdleExit();
void Behavior_IdleBreakEnter();
HRESULT Behavior_IdleBreakExitCheck();
HRESULT Behavior_IdleBreakExitCheck(_float fTimeDelta);
void Behavior_IdleBreakExit();
void Behavior_MoveEnter();
@@ -188,6 +193,10 @@ class CRanrok final : public CMonster
void Behavior_DeadEnter();
HRESULT Behavior_DeadExitCheck(_float fTimeDelta);
void Behavior_DeadExit();
virtual _bool IsHitStateDisabled() override;
virtual _bool IsHitSpellDisabled() override;
};
NS_END
@@ -30,6 +30,7 @@ class CRanrok_Breath final : public CEffect_Container
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
void Set_BreathTime(_float fTime);
private:
_wstring m_wstrEffectName = {};
@@ -0,0 +1,56 @@
#pragma once
#include "Client_Define.h"
#include "Effect_Container.h"
NS_BEGIN(Engine)
NS_END
NS_BEGIN(Client)
class CRanrok_Charge final : public CEffect_Container
{
private:
CRanrok_Charge(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CRanrok_Charge(const CRanrok_Charge& rhs);
virtual ~CRanrok_Charge() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
public:
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
private:
_wstring m_wstrEffectName = {};
_bool m_isParticleEnd = {};
_float3 m_vLook = {};
_float m_fLinearSpeed = 0.8f;
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
private:
class CInfoInstance* m_pInfoInstance = { nullptr };
public:
static CRanrok_Charge* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
#ifdef _DEBUG
void Describe_Entity() override;
#endif // DEBUG
};
NS_END
@@ -0,0 +1,55 @@
#pragma once
#include "Client_Define.h"
#include "Effect_Container.h"
NS_BEGIN(Engine)
NS_END
NS_BEGIN(Client)
class CRanrok_Pulse final : public CEffect_Container
{
private:
CRanrok_Pulse(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CRanrok_Pulse(const CRanrok_Pulse& rhs);
virtual ~CRanrok_Pulse() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
public:
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
private:
_wstring m_wstrEffectName = {};
_float3 m_vLook = {};
_float m_fLinearSpeed = 0.8f;
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
private:
class CInfoInstance* m_pInfoInstance = { nullptr };
public:
static CRanrok_Pulse* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
#ifdef _DEBUG
void Describe_Entity() override;
#endif // DEBUG
};
NS_END
+2
View File
@@ -146,6 +146,8 @@ class CTroll final : public CMonster
void Behavior_DeadEnter();
HRESULT Behavior_DeadExitCheck(_float fTimeDelta);
void Behavior_DeadExit();
virtual _bool IsHitSpellDisabled() override;
};
NS_END
@@ -4,8 +4,14 @@
<!-- IDLE -->
<Anim state="IDLE_G" index="100" loop="true"/>
<Anim state="IDLE_BREAK2" index="28" loop="false"/>
<Anim state="IDLE_TURN_L" index="124" loop="false"/>
<Anim state="IDLE_TURN_R" index="125" loop="false"/>
<Anim state="IDLE_BREAK3" index="104" loop="false"/>
<Anim state="IDLE_BREAK4" index="105" loop="false"/>
<Anim state="IDLE_TURN_180_L" index="120" loop="false"/>
<Anim state="IDLE_TURN_180_R" index="121" loop="false"/>
<Anim state="IDLE_TURN_45_L" index="122" loop="false"/>
<Anim state="IDLE_TURN_45_R" index="123" loop="false"/>
<Anim state="IDLE_TURN_90_L" index="124" loop="false"/>
<Anim state="IDLE_TURN_90_R" index="125" loop="false"/>
<!-- HOVER / MOVE -->
<Anim state="HOVER_LOOP" index="29" loop="true"/>
@@ -6,7 +6,7 @@
<Rotation x="-0" y="-60" z="-0"/>
<MapContainerType type="0"/>
<BoundingBox_Min x="-7.0020647" y="-0.45976496" z="-1.5148951"/>
<BoundingBox_Max x="6.3698497" y="12.858675" z="14.645905"/>
<BoundingBox_Max x="20.3698497" y="12.858675" z="30.645905"/>
<PartObject Lod_Level="1" Key_Index="4">
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_Railing_Post_A</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_HM_Ollivanders_Railing_Post_A_Lod1</PrototypeTag>
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<Ring>
<Object Type="0">
<Position x="-624.6828" y="-5.8805885" z="-346.03726"/>
<Scale x="0.99942404" y="1" z="0.99942404"/>
<Rotation x="0" y="90" z="0"/>
</Object>
<Object Type="0">
<Position x="-538.65613" y="-9.7019424" z="-220.7928"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</Object>
<Object Type="0">
<Position x="-337.73676" y="22.321819" z="-370.07764"/>
<Scale x="1.000001" y="1" z="1.000001"/>
<Rotation x="0" y="99" z="0"/>
</Object>
<Object Type="0">
<Position x="-406.02249" y="84.212677" z="-460.5611"/>
<Scale x="0.99931335" y="1" z="0.99931335"/>
<Rotation x="0" y="105" z="0"/>
</Object>
<Object Type="0">
<Position x="-310.34567" y="69.336639" z="-551.00226"/>
<Scale x="0.9941389" y="0.99323529" z="0.99999595"/>
<Rotation x="0" y="7" z="0"/>
</Object>
<Object Type="0">
<Position x="-261.31503" y="41.564301" z="-528.52368"/>
<Scale x="0.99999613" y="0.99954367" z="0.9994064"/>
<Rotation x="-90" y="-45" z="-8"/>
</Object>
<Object Type="0">
<Position x="-238.78645" y="-10.563053" z="-466.24268"/>
<Scale x="0.99976027" y="0.99999475" z="0.99999315"/>
<Rotation x="30" y="-63" z="-14"/>
</Object>
<Object Type="0">
<Position x="-96.618591" y="-16.054264" z="-351.12924"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</Object>
<Object Type="0">
<Position x="-128.33682" y="38.68256" z="-522.79828"/>
<Scale x="0.99999386" y="1" z="0.99999386"/>
<Rotation x="0" y="105" z="0"/>
</Object>
<Object Type="0">
<Position x="-128.85426" y="20.893711" z="-592.85968"/>
<Scale x="0.9999308" y="0.99835175" z="0.99809289"/>
<Rotation x="-90" y="-15" z="-20"/>
</Object>
<Object Type="0">
<Position x="-213.46817" y="135.46735" z="-562.4892"/>
<Scale x="0.99988467" y="0.99907112" z="0.99889481"/>
<Rotation x="-90" y="48" z="0"/>
</Object>
<Object Type="0">
<Position x="-276.20966" y="50.973507" z="-426.81964"/>
<Scale x="0.99997073" y="1" z="0.99997073"/>
<Rotation x="0" y="75" z="0"/>
</Object>
<Object Type="0">
<Position x="-263.67758" y="20.335052" z="-315.45111"/>
<Scale x="0.99999481" y="1" z="0.99999481"/>
<Rotation x="0" y="60" z="0"/>
</Object>
<Object Type="0">
<Position x="-567.87341" y="6.0618649" z="-402.6113"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="0" z="0"/>
</Object>
</Ring>
@@ -1,115 +1,156 @@
<RanrokPosInfo>
<RanrokPosData>
<Name Flow ="3">
<!--<Position>
<Pos x="29.016" y="-36.927" z="278.618"/>
</Position>-->
<Position>
<Pos x="-5.609" y="-36.633" z="276.578"/>
<Pos x="-10.619" y="3.829" z="222.073"/>
</Position>
<Position>
<Pos x="-34.520" y="-42.285" z="255.976"/>
<Pos x="-25.924" y="11.595" z="213.374"/>
</Position>
<Position>
<Pos x="-34.520" y="-42.285" z="255.976"/>
<Pos x="-33.721" y="-1.115" z="190.815"/>
</Position>
<Position>
<Pos x="-21.337" y="-64.176" z="177.173"/>
<Pos x="-26.962" y="-5.371" z="162.183"/>
</Position>
<Position>
<Pos x="19.772" y="-71.264" z="166.086"/>
<Pos x="-5.953" y="-5.958" z="152.081"/>
</Position>
<Position>
<Pos x="59.578" y="-61.212" z="166.694"/>
<Pos x="17.473" y="-4.045" z="160.776"/>
</Position>
<Position>
<Pos x="97.511" y="-52.889" z="163.356"/>
<Pos x="29.420" y="-4.414" z="165.479"/>
</Position>
<Position>
<Pos x="121.751" y="-47.490" z="180.649"/>
<Pos x="39.591" y="-10.167" z="181.184"/>
</Position>
<Position>
<Pos x="115.634" y="-43.836" z="212.510"/>
<Pos x="24.508" y="-9.579" z="200.380"/>
</Position>
<Position>
<Pos x="93.052" y="-48.890" z="232.340"/>
<Pos x="15.554" y="-5.833" z="201.019"/>
</Position>
<Position>
<Pos x="32.569" y="-61.375" z="227.195"/>
<Pos x="8.232" y="-14.972" z="202.142"/>
</Position>
</Name>
<Name Flow="2">
<Position>
<Pos x="16.141" y="-50.299" z="221.423"/>
<Pos x="-14.318" y="6.094" z="138.133"/>
</Position>
<Position>
<Pos x="41.967" y="-53.684" z="246.943"/>
<Pos x="-6.853" y="17.268" z="118.995"/>
</Position>
<Position>
<Pos x="11.950" y="-51.993" z="263.268"/>
<Pos x="22.444" y="26.718" z="89.211"/>
</Position>
<Position>
<Pos x="-17.090" y="-51.099" z="236.738"/>
<Pos x="71.620" y="40.022" z="95.501"/>
</Position>
<Position>
<Pos x="-13.968" y="-53.362" z="201.439"/>
<Pos x="89.480" y="52.386" z="131.227"/>
</Position>
<Position>
<Pos x="-13.968" y="-53.362" z="201.439"/>
<Pos x="116.321" y="45.927" z="173.314"/>
</Position>
<Position>
<Pos x="35.842" y="-48.150" z="189.827"/>
<Pos x="126.576" y="31.942" z="212.061"/>
</Position>
<Position>
<Pos x="51.975" y="-47.209" z="207.986"/>
<Pos x="97.259" y="27.504" z="246.896"/>
</Position>
<Position>
<Pos x="40.875" y="-48.956" z="256.929"/>
<Pos x="36.582" y="18.214" z="267.056"/>
</Position>
<Position>
<Pos x="-6.689" y="16.055" z="256.872"/>
</Position>
<Position>
<Pos x="-32.793" y="9.117" z="227.905"/>
</Position>
<Position>
<Pos x="-41.259" y="-9.095" z="197.628"/>
</Position>
<Position>
<Pos x="-30.269" y="-6.395" z="168.142"/>
</Position>
<Position>
<Pos x="-1.485" y="-8.459" z="153.276"/>
</Position>
<Position>
<Pos x="25.978" y="-7.944" z="163.286"/>
</Position>
<Position>
<Pos x="40.503" y="-9.522" z="192.299"/>
</Position>
<Position>
<Pos x="35.584" y="-10.649" z="218.376"/>
</Position>
<Position>
<Pos x="10.786" y="-11.037" z="236.955"/>
</Position>
</Name>
<Name Flow="1">
<Position>
<Pos x="-23.129" y="5.847" z="120.080"/>
<Pos x="-23.674" y="2.889" z="88.944"/>
</Position>
<Position>
<Pos x="-35.026" y="2.671" z="144.041"/>
<Pos x="-52.506" y="3.156" z="104.534"/>
</Position>
<Position>
<Pos x="-0.334" y="-18.565" z="186.488"/>
<Pos x="-64.457" y="0.623" z="134.250"/>
</Position>
<Position>
<Pos x="-51.603" y="-2.990" z="167.553"/>
</Position>
<Position>
<Pos x="-17.432" y="-2.766" z="167.063"/>
</Position>
</Name>
<Name Flow="0">
<Position>
<Pos x="58.990" y="68.320" z="241.628"/>
<Pos x="75.550" y="33.734" z="164.013"/>
</Position>
<Position>
<Pos x="-108.540" y="-20.997" z="129.920"/>
<Pos x="5.451" y="22.609" z="178.547"/>
</Position>
<Position>
<Pos x="-78.388" y="-7.777" z="23.252"/>
<Pos x="-51.900" y="7.879" z="161.170"/>
</Position>
<Position>
<Pos x="-17.085" y="18.315" z="34.801"/>
<Pos x="-123.376" y="-12.861" z="101.634"/>
</Position>
<Position>
<Pos x="38.669" y="17.004" z="4.037"/>
<Pos x="-109.508" y="-4.704" z="63.085"/>
</Position>
<Position>
<Pos x="86.242" y="23.649" z="4.595"/>
<Pos x="-33.545" y="3.208" z="35.854"/>
</Position>
<Position>
<Pos x="128.830" y="7.499" z="79.664"/>
<Pos x="21.568" y="16.357" z="17.125"/>
</Position>
<Position>
<Pos x="147.229" y="7.463" z="171.466"/>
<Pos x="65.475" y="7.915" z="15.032"/>
</Position>
<Position>
<Pos x="123.945" y="4.664" z="189.885"/>
<Pos x="94.002" y="11.938" z="45.093"/>
</Position>
<Position>
<Pos x="32.682" y=" 7.561" z="131.725"/>
<Pos x="113.964" y="8.984" z="97.496"/>
</Position>
<Position>
<Pos x="124.186" y="4.729" z="142.306"/>
</Position>
<Position>
<Pos x="103.940" y="3.978" z="152.634"/>
</Position>
<Position>
<Pos x="80.791" y="2.533" z="153.991"/>
</Position>
<Position>
<Pos x="8.371" y="2.245" z="101.730"/>
</Position>
</Name>
</RanrokPosData>
</RanrokPosInfo>
@@ -88,6 +88,7 @@ float g_fMBSampleBias;
vector g_vLightDiffuse;
vector g_vLightAmbient;
vector g_vLightSpecular;
float g_fLightSpecularMaximum;
float g_fFogDensity;
float g_fFogPow;
@@ -483,7 +484,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
float3 vAmbient = g_vLightAmbient.rgb * fTotalOcclusion * fAttenuation;
float3 vFinalDiffuse = PBR_Out.vShade + vAmbient;
float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb;
float3 vFinalSpecular = clamp(PBR_Out.vSpecular, 0.f, g_fLightSpecularMaximum) * g_vLightSpecular.rgb;
Out.vShade = float4(vFinalDiffuse, 1.f);
Out.vSpecular = float4(vFinalSpecular, 0.f);
@@ -569,7 +570,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
float3 vAmbient = g_vLightAmbient.rgb * fTotalOcclusion * fAttenuation;
float3 vFinalDiffuse = PBR_Out.vShade + vAmbient;
float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb;
float3 vFinalSpecular = clamp(PBR_Out.vSpecular, 0.f, g_fLightSpecularMaximum) * g_vLightSpecular.rgb;
Out.vShade = float4(vFinalDiffuse, 1.f);
Out.vSpecular = float4(vFinalSpecular, 0.f);
@@ -670,7 +671,7 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
float3 vAmbient = g_vLightAmbient.rgb * fTotalOcclusion * fAttenuation;
float3 vFinalDiffuse = PBR_Out.vShade + vAmbient;
float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb;
float3 vFinalSpecular = clamp(PBR_Out.vSpecular, 0.f, g_fLightSpecularMaximum) * g_vLightSpecular.rgb;
Out.vShade = float4(vFinalDiffuse, 1.f);
Out.vSpecular = float4(vFinalSpecular, 0.f);
@@ -54,7 +54,7 @@ void CS_MAIN(uint3 DTid : SV_DispatchThreadID)
int p = g_ParentBuffer[global];
while (p != -1)
{
combined = mul(combined,g_LocalMatIn[p]);
combined = mul(combined, g_LocalMatIn[p]);
p = g_ParentBuffer[p];
}
@@ -541,7 +541,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale);
fRim = pow(fRim, g_fOutLinePower);
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
Out.vAlbedo = float4(g_vOutLineColor.rgb * 5.f, fRim);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
(In.vProjPos.w / g_fFar),
@@ -59,6 +59,11 @@ struct ParticleValue
float3 vWolrdOffset;
float fLoopCount; /* 현재 몇번째 루프중인지 */
float fRoundRangeLength;
float fAzimuthAngle;
float fPolarAngle;
float fRoundLengthLerpSpeed;
row_major matrix PreWorldMatrix;
row_major matrix LocalMatrixInv;
};
@@ -99,7 +104,7 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
bool isNoResetTime;
bool isLocal_Located_Not_TakeDelay;
bool isCompute_LocalInverse;
bool isPadding2;
bool isRoundLengthLerp;
float fTimeDelta;
float fSizeLerpOption; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다.
@@ -160,6 +165,7 @@ void CS_MAIN(
if (isNoPos)
{
particle.vTranslation.xyz += WorldMatrix[3].xyz;
/* 월드 오프셋 */
@@ -170,6 +176,21 @@ void CS_MAIN(
}
}
if (isRoundLengthLerp == true)
{
if (particleValue.vDelay.x < particleValue.vDelay.y)
{
float3 vRoundRange = float3(
particleValue.fRoundRangeLength * cos(particleValue.fAzimuthAngle) * sin(particleValue.fPolarAngle),
particleValue.fRoundRangeLength * sin(particleValue.fAzimuthAngle) * sin(particleValue.fPolarAngle),
particleValue.fRoundRangeLength * cos(particleValue.fPolarAngle));
particleValue.vOriginTranslation.xyz += particleValue.fRoundLengthLerpSpeed * vRoundRange * fTimeDelta;
particle.vTranslation.xyz += particleValue.fRoundLengthLerpSpeed * vRoundRange * fTimeDelta;
}
}
particleValue.vDelay.x += fTimeDelta;
if (particleValue.vDelay.x < particleValue.vDelay.y)
@@ -271,6 +292,7 @@ void CS_MAIN(
return ;
}
if (isDrop == true)
{
@@ -473,7 +473,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale);
fRim = pow(fRim, g_fOutLinePower);
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
Out.vAlbedo = float4(g_vOutLineColor.rgb * 5.f, 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
@@ -694,8 +694,8 @@ 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.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
Out.vAlbedo = float4(g_vOutLineColor.rgb * 5.f, 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
@@ -49,6 +49,12 @@ struct ParticleValue
float3 vWolrdOffset;
float fLoopCount; /* 현재 몇번째 루프중인지 */
float fRoundRangeLength;
float fAzimuthAngle;
float fPolarAngle;
float fRoundLengthLerpSpeed;
row_major matrix PreWorldMatrix;
row_major matrix LocalMatrixInv;
};
@@ -284,6 +290,8 @@ VS_BULR_MESH_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
{
VS_BULR_MESH_OUT Out = (VS_BULR_MESH_OUT) 0;
matrix matW, matWV, matWVP;
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
@@ -525,6 +533,10 @@ float4 DrawEffect(PS_IN In)
discard;
}
if (In.vLifeTime.x > In.vLifeTime.y)
discard;
if (g_isDiffuse == true)
{
float2 UV; // 이미지의 UV값
@@ -732,56 +744,63 @@ float4 DrawEffect(PS_IN In)
float2 vDissolveUV = In.vTexcoord + SelectLerpUV(g_vDissolveUVGainAmount, (vDissolveUVMoveTime.x / vDissolveUVMoveTime.y), 0);
if (g_isDissolveMove)
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, vDissolveUV);
else
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
/* */
float fDissolveValue = vMtrlDissolve.r;
if (g_fDissolveCutRatio > FLT_EPSILON5)
{
if (g_isDissolveMove)
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, vDissolveUV);
else
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
float fDissolveValue = vMtrlDissolve.r;
if (g_isDissolve_G == true)
fDissolveValue = vMtrlDissolve.g;
if (g_isDissolve_G == true)
fDissolveValue = vMtrlDissolve.g;
if (g_isDissolve_B == true)
fDissolveValue = vMtrlDissolve.b;
if (g_isDissolve_B == true)
fDissolveValue = vMtrlDissolve.b;
float fSoftDissolve;
float fSoftDissolve;
if (g_fDissolveSoftMask > FLT_EPSILON5)
fSoftDissolve = saturate((fDissolveValue - g_fDissolveMaskEdge) * g_fDissolveSoftMask);
else
fSoftDissolve = fDissolveValue;
if (g_fDissolveSoftMask > FLT_EPSILON5)
fSoftDissolve = saturate((fDissolveValue - g_fDissolveMaskEdge) * g_fDissolveSoftMask);
else
fSoftDissolve = fDissolveValue;
vMtrlDissolve.r = fSoftDissolve;
vMtrlDissolve.r = fSoftDissolve;
if (g_isReverseDissolve == true)
{
if (vMtrlDissolve.r >= (In.vLifeTime.x / In.vLifeTime.y))
discard;
}
else
{
if (g_isReverseDissolve == true)
{
if (vMtrlDissolve.r >= (In.vLifeTime.x / In.vLifeTime.y))
discard;
}
else
{
if (g_fDissolveCutRatio <= fTimeRatio) // 일정 수준 이상 넘어가지 못하도록 막기
{
fTimeRatio = g_fDissolveCutRatio;
if (g_fDissolveCutRatio <= fTimeRatio) // 일정 수준 이상 넘어가지 못하도록 막기
{
fTimeRatio = g_fDissolveCutRatio;
}
float fFade = smoothstep(fTimeRatio - 0.1f, fTimeRatio + 0.1f, vMtrlDissolve.r);
if (g_isNoDissolveSmoothStep == true)
{
fFade = smoothstep(fTimeRatio, fTimeRatio, vMtrlDissolve.r);
}
vMtrlDiffuse.a *= fFade;
}
float fFade = smoothstep(fTimeRatio - 0.1f, fTimeRatio + 0.1f, vMtrlDissolve.r);
if (g_isNoDissolveSmoothStep == true)
{
fFade = smoothstep(fTimeRatio, fTimeRatio, vMtrlDissolve.r);
}
vMtrlDiffuse.a *= fFade;
}
/* */
clip(vMtrlDiffuse.a - FLT_EPSILON5);
}
@@ -920,6 +939,9 @@ float4 SoftEffect(PS_IN In, float4 vMtrlDiffuse)
vDiffuse.a = vDiffuse.a * saturate(fDistance);
if(vDiffuse.a < FLT_EPSILON5)
discard;
return vDiffuse;
}
@@ -1037,21 +1059,22 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
{
PS_OUT Out = (PS_OUT)0;
//int2 iTexel = int2(In.vPosition.xy);
//float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r;
//float fbias = 0.000005f;
//if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias)
// discard;
float4 vMtrlDiffuse;
vMtrlDiffuse = DrawEffect(In);
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
int2 iTexel = int2(In.vPosition.xy);
float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r;
float fbias = 0.000005f;
if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias)
discard;
vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
vMtrlDiffuse += RimLight(In);
@@ -1770,7 +1793,7 @@ technique11 DefaultTechnique
pass Default_NonPos
{
SetRasterizerState(RS_Nocull);
SetDepthStencilState(DSS_None, 0);
SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN_NO_POS();
GeometryShader = NULL;
@@ -1819,6 +1842,16 @@ technique11 DefaultTechnique
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_DECAL_BLUR();
}
//28
pass Blend_Culling
{
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_Effect, 0);
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN();
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_BLEND();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Some files were not shown because too many files have changed in this diff Show More