Merge branch 'Develope' into Effect
This commit is contained in:
@@ -58,6 +58,7 @@ Texture2D g_Texture5;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
|
||||
int g_iHover;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
@@ -344,7 +345,7 @@ PS_OUT PS_Spell_Anim(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f,1.f,1.f,1.f);
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -1059,7 +1060,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float3 BGColor= float3(1.f, 1.f, 1.f);
|
||||
float3 BGColor = float3(1.f, 1.f, 1.f);
|
||||
|
||||
switch (g_iSpellType)
|
||||
{
|
||||
@@ -1189,6 +1190,48 @@ PS_OUT PS_Spell_Drag(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Camera_LockOn(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float2 center = float2(0.5, 0.5);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
float angle = -g_fTime;
|
||||
float s = sin(angle);
|
||||
float c = cos(angle);
|
||||
float2 maskuv = float2(uv.x * c - uv.y * s, uv.x * s + uv.y * c) + center;
|
||||
|
||||
float tex1 = g_Texture.Sample(ClampSampler, maskuv).r;
|
||||
|
||||
Color.a = tex1 * 0.3f;
|
||||
|
||||
if (g_iHover != 0)
|
||||
{
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, maskuv);
|
||||
|
||||
Color.rgb += (tex2.rgb * tex2.a) * 2.f;
|
||||
}
|
||||
|
||||
float2 UpUV = In.vTexcoord;
|
||||
UpUV.y += g_fTime;
|
||||
|
||||
float4 tex3 = g_Texture2.Sample(DefaultSampler, UpUV);
|
||||
float tex4 = g_Texture1.Sample(ClampSampler, In.vTexcoord).r;
|
||||
|
||||
tex3.a *= tex4;
|
||||
|
||||
Color = lerp(Color, tex3, tex3.a);
|
||||
|
||||
Color.a *= Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -1429,4 +1472,14 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_Spell_Drag();
|
||||
}
|
||||
|
||||
pass Camera_LockOn
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, 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_Camera_LockOn();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<Filter>01.Levels\01.Logo</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_GamePlay.h">
|
||||
<Filter>01.Levels\02.GamePlay</Filter>
|
||||
<Filter>01.Levels\01.Logo\02.GamePlay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\InfoInstance.h">
|
||||
<Filter>03.InfoInstance</Filter>
|
||||
@@ -398,9 +398,6 @@
|
||||
<Filter Include="01.Levels\00.Loading\Loader">
|
||||
<UniqueIdentifier>{37d70d8d-655c-498b-82a6-afd3d1726cd8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels\02.GamePlay">
|
||||
<UniqueIdentifier>{7e641382-9dfa-4da7-a8c8-a3ee06360e7a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects">
|
||||
<UniqueIdentifier>{27434478-691e-42a8-83c7-ecd1a60f46ce}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -782,6 +779,9 @@
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Blink">
|
||||
<UniqueIdentifier>{27251db2-19f2-4492-a3a4-32c11526f413}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels\01.Logo\02.GamePlay">
|
||||
<UniqueIdentifier>{7e641382-9dfa-4da7-a8c8-a3ee06360e7a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -803,7 +803,7 @@
|
||||
<Filter>01.Levels\01.Logo</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level_GamePlay.cpp">
|
||||
<Filter>01.Levels\02.GamePlay</Filter>
|
||||
<Filter>01.Levels\01.Logo\02.GamePlay</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\InfoInstance.cpp">
|
||||
<Filter>03.InfoInstance</Filter>
|
||||
@@ -937,9 +937,6 @@
|
||||
<ClCompile Include="..\Private\Monster.cpp">
|
||||
<Filter>02.GameObjects\Monster</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapContainer.cpp">
|
||||
<Filter>02.GameObjects\Environment\00.MapContainer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\BuildingContainer.cpp">
|
||||
<Filter>02.GameObjects\Environment\00.MapContainer\BuildingContainer</Filter>
|
||||
</ClCompile>
|
||||
@@ -1144,6 +1141,7 @@
|
||||
<ClCompile Include="..\Private\Spell_Drag.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Drag</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapContainer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc">
|
||||
|
||||
@@ -59,7 +59,7 @@ HRESULT CGoblin::Initialize(void* pArg)
|
||||
|
||||
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(m_pGameInstance->Random_Float(-20.f, 20.f), 0.f, m_pGameInstance->Random_Float(-20.f, 20.f), 1.f));
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(m_pGameInstance->Real_Random_Float(-20.f, 20.f), 0.f, m_pGameInstance->Real_Random_Float(-20.f, 20.f), 1.f));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -185,6 +185,8 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
m_pCharacter_Controller->ConvertToDO(*m_pRigidBody);
|
||||
m_pRigidBody->Add_Force(vHitDir * fLength * 10000.f, PSX::PxForceMode::eFORCE);
|
||||
|
||||
//m_pCharacter_Controller->ConvertToDO(*m_pRigidBody);
|
||||
//m_pRigidBody->Add_Force(vHitDir * fLength * 100.f, PSX::PxForceMode::eIMPULSE);
|
||||
_uint iSkillType = dynamic_cast<CEffect_Container*>(pOther)->Get_SkillType();
|
||||
switch (iSkillType)
|
||||
{
|
||||
@@ -194,6 +196,12 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
case ENUM_CLASS(SKILL_TYPE::FLIPENDO):
|
||||
m_eHitSpell = STATEANIM::TUMBLE2;
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::JAP):
|
||||
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
|
||||
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
|
||||
break;
|
||||
default:
|
||||
m_eHitSpell = STATEANIM::KNOCKDOWN_FWD;
|
||||
break;
|
||||
|
||||
@@ -29,7 +29,7 @@ void CGoblin::Behavior_IdleEnter()
|
||||
|
||||
HRESULT CGoblin::Behavior_IdleExitCheck()
|
||||
{
|
||||
if (m_fTargetDistance <= 20.f && m_fTargetDistance != 0.f)
|
||||
if (m_fTargetDistance <= 20.f /*&& m_fTargetDistance != 0.f*/)
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
|
||||
return E_FAIL;
|
||||
@@ -243,7 +243,24 @@ void CGoblin::Behavior_HitEnter()
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::HIT);
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD];
|
||||
switch (m_eHitSpell)
|
||||
{
|
||||
case STATEANIM::KNOCKDOWN_FWD:
|
||||
pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD];
|
||||
break;
|
||||
case STATEANIM::TUMBLE2:
|
||||
pairAnimInfo = m_Animation[STATEANIM::TUMBLE2];
|
||||
break;
|
||||
case STATEANIM::HIT_LEVIOSO:
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::HIT_LEVIOSO];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD];
|
||||
break;
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
@@ -254,22 +271,29 @@ HRESULT CGoblin::Behavior_HitExitCheck(_float fTimeDelta)
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::KNOCKDOWN_FWD].first)
|
||||
{
|
||||
if (m_pModelCom->Get_CurrentTrackProgressRatio()>=0.5f)
|
||||
if (m_pModelCom->Get_CurrentTrackProgressRatio() >= 0.5f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 10.f);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT].first)
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::HIT_LEVIOSO].first)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
if (m_pModelCom->Get_CurrentTrackProgressRatio() >= 0.31f)
|
||||
{
|
||||
m_bLookAt = true;
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
pairAnimInfo = m_Animation[STATEANIM::LAND];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_bLookAt = true;
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -390,7 +414,7 @@ void CGoblin::Set_Anim()
|
||||
m_Animation[STATEANIM::SPRINT] = { 90, true };
|
||||
|
||||
m_Animation[STATEANIM::SKILL] = { 85,false }; // 나이프 던지기
|
||||
m_Animation[STATEANIM::BLINK] = { 234,false }; // 텔레포트
|
||||
m_Animation[STATEANIM::BLINK] = { 426,false }; // 텔레포트
|
||||
m_Animation[STATEANIM::SWING_FWD] = { 100,false }; // 도끼 스윙 444
|
||||
|
||||
m_Animation[STATEANIM::HIT_FWD] = { 353, false };
|
||||
@@ -421,9 +445,12 @@ void CGoblin::Set_Anim()
|
||||
m_Animation[STATEANIM::KNOCKBACK] = { 377, true };
|
||||
m_Animation[STATEANIM::KNOCKBACK2] = { 378, true };
|
||||
m_Animation[STATEANIM::TUMBLE] = { 379, true };
|
||||
m_Animation[STATEANIM::TUMBLE2] = { 380, false };// 원래 true 였음
|
||||
m_Animation[STATEANIM::TUMBLE2] = { 380, true };// 원래 true 였음
|
||||
m_Animation[STATEANIM::PETRIFICUSED_START] = { 383, false };
|
||||
|
||||
m_Animation[STATEANIM::LAND] = { 376, false };
|
||||
m_Animation[STATEANIM::HIT_LEVIOSO] = { 381, false };
|
||||
|
||||
m_Animation[STATEANIM::DEAD_BWD] = { 317, false };
|
||||
m_Animation[STATEANIM::DEAD_BWD2] = { 318, false };
|
||||
m_Animation[STATEANIM::DEAD_FWD] = { 319, false };
|
||||
@@ -433,7 +460,7 @@ void CGoblin::Set_Anim()
|
||||
m_Animation[STATEANIM::DEAD_R] = { 323, false };
|
||||
m_Animation[STATEANIM::DEAD_R2] = { 324, false };
|
||||
|
||||
//Tp 234
|
||||
//Tp 426
|
||||
|
||||
|
||||
|
||||
@@ -457,4 +484,7 @@ void CGoblin::Set_Anim()
|
||||
// 디센도 찍기전 띄우기 371
|
||||
// 디센도 찍기 372
|
||||
|
||||
// 레비오소 피격 381
|
||||
// 착지 376
|
||||
|
||||
}
|
||||
|
||||
@@ -121,12 +121,28 @@ void CInfoInstance::Key_Input(_uint Input)
|
||||
switch (m_eInput)
|
||||
{
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_1):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_2):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_3):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_4):
|
||||
Event_CallBack(TEXT("Spell"), &m_eInput);
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_T):
|
||||
if (m_eUI_State == UI_STATE::GAMEPLAYER)
|
||||
{
|
||||
m_eUI_State = UI_STATE::SPELL;
|
||||
Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State);
|
||||
}
|
||||
else if (m_eUI_State == UI_STATE::SPELL)
|
||||
{
|
||||
m_eUI_State = UI_STATE::GAMEPLAYER;
|
||||
Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State);
|
||||
}
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_G):
|
||||
|
||||
@@ -140,6 +156,11 @@ void CInfoInstance::Key_Input(_uint Input)
|
||||
}
|
||||
}
|
||||
|
||||
void CInfoInstance::Set_UISTATE(UI_STATE eState)
|
||||
{
|
||||
m_eUI_State = eState;
|
||||
}
|
||||
|
||||
void CInfoInstance::Add_Event(_wstring EventName, function<void(void*)> Event)
|
||||
{
|
||||
UI_Event.emplace(EventName, Event);
|
||||
|
||||
@@ -124,9 +124,8 @@ HRESULT CInstancedProp::Load_InstancedProp(const _char* pFilePath)
|
||||
WorldMatrices.reserve(iNumWorldMatrix);
|
||||
|
||||
_float4x4 WorldMatrix = {};
|
||||
FileIn.read(reinterpret_cast<char*>(&WorldMatrix), sizeof(_float4x4));
|
||||
|
||||
for (_uint i = 1; i < iNumWorldMatrix; ++i)
|
||||
for (_uint i = 0; i < iNumWorldMatrix; ++i)
|
||||
{
|
||||
FileIn.read(reinterpret_cast<char*>(&WorldMatrix), sizeof(_float4x4));
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
|
||||
CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
|
||||
/* 전체 맵 */
|
||||
//CInfoInstance::GetInstance()->Load_MapObjects("Map1129");
|
||||
CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
|
||||
|
||||
/* 조명 오브젝트 */
|
||||
CInfoInstance::GetInstance()->Load_LightElements("LightElement");
|
||||
|
||||
@@ -38,11 +38,14 @@ void CLight_Main::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CLight_Main::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("Main_Light");
|
||||
#ifdef _DEBUG
|
||||
m_pLightCom->Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
|
||||
void CLight_Main::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -483,6 +483,16 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{/* Step and Stair */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/GroundSurfaces",
|
||||
".bin", false
|
||||
));
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/GroundSurfaces",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
@@ -1175,7 +1185,9 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc.fDensity = 1.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 1.f, 1.f };
|
||||
Desc.vAutoDamping = { 100.f, 100.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_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
|
||||
@@ -79,8 +79,9 @@ HRESULT CMapInfo::Load_MapObjects(const _char* pFileName)
|
||||
{
|
||||
const _char* pName = {};
|
||||
_uint iMapContainerType = {};
|
||||
Container->QueryStringAttribute("Name", &pName);
|
||||
Container->QueryUnsignedAttribute("MapContainerType", &iMapContainerType);
|
||||
//Container->QueryUnsignedAttribute("MapContainerType", &iMapContainerType);
|
||||
|
||||
Container->FirstChildElement("MapContainerType")->QueryUnsignedAttribute("type", &iMapContainerType);
|
||||
|
||||
CMapContainer* pContainerObject = nullptr;
|
||||
|
||||
|
||||
@@ -139,7 +139,6 @@ __super::Update(fTimeDelta);
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
TestKeyInput(fTimeDelta);
|
||||
}
|
||||
|
||||
void CPlayer::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -33,40 +33,7 @@
|
||||
// UI 연동 추가
|
||||
void CPlayer::Get_Spell(_int SkillIndex)
|
||||
{
|
||||
if (SkillIndex == ENUM_CLASS(SKILL_TYPE::DIFFINDO))
|
||||
Index = SkillIndex;
|
||||
}
|
||||
|
||||
void CPlayer::TestKeyInput(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_F1))
|
||||
{
|
||||
m_eSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA);
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_F2))
|
||||
{
|
||||
m_eSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO);
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_F3))
|
||||
{
|
||||
m_eSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO);
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_F4))
|
||||
{
|
||||
m_eSpell = ENUM_CLASS(SKILL_TYPE::DIFFINDO);
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_F5))
|
||||
{
|
||||
m_eSpell = ENUM_CLASS(SKILL_TYPE::DISILLUSIONMENT);
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_F6))
|
||||
{
|
||||
m_eSpell = ENUM_CLASS(SKILL_TYPE::LUMOS);
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_F7))
|
||||
{
|
||||
m_eSpell = ENUM_CLASS(SKILL_TYPE::ACCIO);
|
||||
}
|
||||
m_eSpell = SkillIndex;
|
||||
}
|
||||
|
||||
HRESULT CPlayer::InputAction()
|
||||
@@ -739,13 +706,6 @@ void CPlayer::Behavior_CombatEnter()
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::COMBAT);
|
||||
|
||||
// UI 연동 추가
|
||||
if (Index == ENUM_CLASS(SKILL_TYPE::DIFFINDO))
|
||||
{
|
||||
Add_Event(pairAnimInfo.first, [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::DIFFINDO, Get_PartObject<CWand>()); }, 0.1f);
|
||||
Index = -1;
|
||||
}
|
||||
|
||||
if (m_pModelCom->Get_SecondAnimIndex() == m_Animation[STATEANIM::LUMOS].first)
|
||||
{
|
||||
m_pModelCom->Set_Second_AnimationIndex(-1, ENUM_CLASS(BLEND_BONE::SHOULDER_R));
|
||||
@@ -853,13 +813,13 @@ void CPlayer::Behavior_CombatEnter()
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL];
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL_FAIL];
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL];
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL_FAIL];
|
||||
}
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_V)) {
|
||||
@@ -926,7 +886,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
[this]() {
|
||||
_uint iIndex = m_pModelCom->Get_AnimIndex() - m_Animation[STATEANIM::LIGHT_ATTACK].first;
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject<CWand>(), &iIndex); },
|
||||
0.1f);
|
||||
0.05f);
|
||||
|
||||
Add_Event(pairAnimInfo.first, [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE, Get_PartObject<CWand>()); }, 0.0f);
|
||||
}
|
||||
@@ -1278,11 +1238,11 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
{
|
||||
/*if (!m_pFSM->IsEnable(FSMSTATE::STOP))
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::STOP))
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.05f);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1464,6 +1424,8 @@ void CPlayer::Set_Anim()
|
||||
m_Animation[STATEANIM::DISILLUSION_EXIT] = { 586,false };
|
||||
m_Animation[STATEANIM::ANCIENT_THROW] = { 919,false };
|
||||
|
||||
m_Animation[STATEANIM::SPELL_FAIL] = { 906,false };
|
||||
|
||||
|
||||
m_Animation[STATEANIM::HIT_L] = { 1124,false };
|
||||
m_Animation[STATEANIM::HIT_R] = { 1125,false };
|
||||
@@ -1506,6 +1468,8 @@ void CPlayer::Set_Anim()
|
||||
|
||||
//738 착지
|
||||
|
||||
//906 마법 실패
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ _int CSkill_Data::Update_Spell(_int SpellID)
|
||||
return ENUM_CLASS(SKILL_TYPE::END);
|
||||
|
||||
if (SpellInfo[SpellID].bUse_Skill == false)
|
||||
return ENUM_CLASS(SKILL_TYPE::END);
|
||||
return -1;
|
||||
|
||||
SpellInfo[SpellID].bUse_Skill = false;
|
||||
m_iSpell_CoolTime[SpellID] = 0.f;
|
||||
|
||||
@@ -59,9 +59,7 @@ void CTerrain::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
#endif // DEBUG
|
||||
}
|
||||
|
||||
void CTerrain::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "GameInstance.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Spell_Canvas.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CUIObject(pDevice, pContext)
|
||||
@@ -10,7 +11,8 @@ CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
}
|
||||
|
||||
CUI_Manager::CUI_Manager(const CUI_Manager& rhs)
|
||||
:CUIObject(rhs)
|
||||
:CUIObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -26,30 +28,71 @@ HRESULT CUI_Manager::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
m_bCanvas_Change = false;
|
||||
m_eType = UI_STATE::GAMEPLAYER;
|
||||
m_pInfoInstance->Set_UISTATE(m_eType);
|
||||
m_pInfoInstance->Add_Event(TEXT("Canvas_Change"), [this](void* p) {this->Canvas_Change(*reinterpret_cast<UI_STATE*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CUI_Manager::Canvas_Change(UI_STATE eType)
|
||||
{
|
||||
m_eType = eType;
|
||||
|
||||
switch (eType)
|
||||
{
|
||||
case UI_STATE::GAMEPLAYER:
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pSpell_Canvas)->Visible(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::SPELL:
|
||||
static_cast<CCanvasObject*>(m_pSpell_Canvas)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
break;
|
||||
|
||||
case UI_STATE::POTION:
|
||||
break;
|
||||
|
||||
case UI_STATE::INVENTORY:
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void CUI_Manager::Clear_Canvas()
|
||||
{
|
||||
}
|
||||
|
||||
CGameObject* CUI_Manager::Get_Canvas(const wstring& Name)
|
||||
{
|
||||
return Find_Canvas(Name);
|
||||
}
|
||||
|
||||
_int CUI_Manager::Canvas_Count()
|
||||
{
|
||||
return m_iCanvas_Count;
|
||||
}
|
||||
|
||||
const vector<wstring> CUI_Manager::Canvas_Name()
|
||||
{
|
||||
return m_CanvasNames;
|
||||
}
|
||||
|
||||
void CUI_Manager::Add_Manager_Event(_wstring Name, function<void(void*)> Event)
|
||||
{
|
||||
m_Event_map.emplace(Name, Event);
|
||||
}
|
||||
|
||||
void CUI_Manager::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CUI_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_T))
|
||||
{
|
||||
m_bCanvas_Change = !m_bCanvas_Change;
|
||||
}
|
||||
|
||||
if (m_bCanvas_Change == false)
|
||||
{
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pSpell_Panel)->Visible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<CCanvasObject*>(m_pSpell_Panel)->Visible(true);
|
||||
static_cast<CCanvasObject*>(m_pGamePlay_Canves)->Visible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void CUI_Manager::Late_Update(_float fTimeDelta)
|
||||
@@ -80,15 +123,51 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGamePlay_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CGamePlay_Canvas**>(&m_pGamePlay_Canves)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Canvas**>(&m_pSpell_Panel)))) {
|
||||
Add_Canvas(TEXT("GamePlay_Canvas"), m_pGamePlay_Canves);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Canvas**>(&m_pSpell_Canvas)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Canvas(TEXT("Spell_Canvas"), m_pSpell_Canvas);
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMouse_Cursor>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMouse_Cursor**>(&m_pMouse_Cursor)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor);
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCameraLockOn>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CCameraLockOn**>(&m_pCamera_LockOn)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CUI_Manager::Clear_Penel()
|
||||
void CUI_Manager::Add_Canvas(_wstring Name, CGameObject* pCanvas)
|
||||
{
|
||||
if (pCanvas == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Find_Canvas(Name) != nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_Canvases.push_back(pCanvas);
|
||||
m_CanvasNames.push_back(Name);
|
||||
m_Canvas_map.emplace(Name, pCanvas);
|
||||
m_iCanvas_Count++;
|
||||
}
|
||||
|
||||
CGameObject* CUI_Manager::Find_Canvas(const _wstring& Name)
|
||||
{
|
||||
auto iter = m_Canvas_map.find(Name);
|
||||
|
||||
if (iter == m_Canvas_map.end())
|
||||
return nullptr;
|
||||
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
CUI_Manager* CUI_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace Client
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END };
|
||||
|
||||
enum class UI_STATE { GAMEPLAYER, SPELL, POTION, INVENTORY, END };
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
_float Get_CoolTime(_int SpellID);
|
||||
void Change_Canvas();
|
||||
void Key_Input(_uint Input); // 플레이어 키 입력
|
||||
|
||||
void Set_UISTATE(UI_STATE eState);
|
||||
void Add_Event(_wstring EventName, function<void(void*)> Event);
|
||||
void Event_CallBack(_wstring EventName, void* pArg = nullptr);
|
||||
#pragma endregion
|
||||
@@ -65,6 +65,8 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
_uint m_eInput = ENUM_CLASS(KEYINPUT::END);
|
||||
_int m_eSpell = ENUM_CLASS(SKILL_TYPE::END);
|
||||
|
||||
UI_STATE m_eUI_State;
|
||||
|
||||
// 임시로 이벤트 1개 만들어 둠
|
||||
multimap<_wstring, function<void(void*)>> UI_Event;
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -84,9 +84,7 @@ class CPlayer final : public CUnit
|
||||
private:
|
||||
// UI 연동 추가
|
||||
void Get_Spell(_int SkillIndex);
|
||||
_int Index{-1};
|
||||
|
||||
void TestKeyInput(_float fTimeDelta);
|
||||
virtual void Add_FSM();
|
||||
virtual void Set_Anim();
|
||||
|
||||
|
||||
@@ -33,15 +33,39 @@ class CUI_Manager final : public CUIObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Clear_Penel();
|
||||
void Canvas_Change(UI_STATE eType);
|
||||
void Clear_Canvas();
|
||||
virtual class CGameObject* Get_Canvas(const wstring& Name);
|
||||
virtual _int Canvas_Count();
|
||||
virtual const vector<wstring> Canvas_Name();
|
||||
|
||||
void Add_Manager_Event(_wstring Name, function<void(void*)> Event);
|
||||
void Event_Callback(_wstring Name, void* pArg = nullptr);
|
||||
private:
|
||||
void Add_Canvas(_wstring Name, class CGameObject* pCanvas);
|
||||
CGameObject* Find_Canvas(const _wstring& Name);
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pGamePlay_Canves= { nullptr };
|
||||
CGameObject* m_pSpell_Panel = { nullptr };
|
||||
CGameObject* m_pGamePlay_Canves = { nullptr };
|
||||
CGameObject* m_pSpell_Canvas = { nullptr };
|
||||
CGameObject* m_pMouse_Cursor = { nullptr };
|
||||
CGameObject* m_pCamera_LockOn = { nullptr };
|
||||
_bool m_bCanvas_Change = { false };
|
||||
|
||||
UI_STATE m_eType{};
|
||||
|
||||
vector<class CGameObject*> m_Canvases; // 캔버스가 패널들을 관리 하기 위해서 필요함
|
||||
vector<wstring> m_CanvasNames; // 패널들의 이름을 전해주기 위해서
|
||||
map<wstring, class CGameObject*> m_Canvas_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서
|
||||
_int m_iCanvas_Count{}; // 전체 패널의 갯수
|
||||
|
||||
multimap<wstring, function<void(void*)>> m_Event_map;
|
||||
|
||||
|
||||
public:
|
||||
static CUI_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -3686,4 +3686,220 @@
|
||||
<Rotation x="0" y="109.99998" z="0"/>
|
||||
</PartObject>
|
||||
</Container>
|
||||
<Container Name="HM_HIGHTSTREET_1">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="2" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod2</PrototypeTag>
|
||||
<Position x="43.060459" y="4.4474273" z="86.324295"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="-1.9999999"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2" Key_Index="1" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod2</PrototypeTag>
|
||||
<Position x="43.16312" y="5.1212273" z="87.537697"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="-3.0000002"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="2" Key_Index="2" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_C_Lod2</PrototypeTag>
|
||||
<Position x="43.246662" y="5.8459349" z="88.465637"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="-3.0000002"/>
|
||||
</PartObject>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_01_A_COL</PrototypeTag>
|
||||
<Position x="43.272125" y="4.5027952" z="86.833504"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="-1.9999999"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_01_A_COL</PrototypeTag>
|
||||
<Position x="43.313957" y="5.0392594" z="87.718208"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="-3.0000002"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_01_A_COL</PrototypeTag>
|
||||
<Position x="43.331394" y="5.6026211" z="88.623962"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="-3.0000002"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_01_A_COL</PrototypeTag>
|
||||
<Position x="43.442574" y="5.9601059" z="89.690971"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="-3.0000002"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
<Container Name="HM_PlazzaStep_1">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="3" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3</PrototypeTag>
|
||||
<Position x="108.98026" y="12.006719" z="98.133469"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="-2.6680425e-08" y="120" z="0.50003815"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3" Key_Index="1" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3</PrototypeTag>
|
||||
<Position x="94.653152" y="7.0902638" z="87.852188"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3" Key_Index="2" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3</PrototypeTag>
|
||||
<Position x="94.30027" y="8.9721889" z="94.704437"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3" Key_Index="3" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3</PrototypeTag>
|
||||
<Position x="111.71465" y="14.805841" z="104.53838"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="15.000003" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3" Key_Index="4" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Lod3</PrototypeTag>
|
||||
<Position x="111.50461" y="13.667078" z="102.27715"/>
|
||||
<Scale x="0.99999994" y="1" z="0.99999994"/>
|
||||
<Rotation x="0" y="18.000004" z="0"/>
|
||||
</PartObject>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL</PrototypeTag>
|
||||
<Position x="109.02284" y="12.009924" z="98.142662"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="-2.6680425e-08" y="120" z="0.50003815"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL</PrototypeTag>
|
||||
<Position x="94.647194" y="7.0425816" z="87.874741"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL</PrototypeTag>
|
||||
<Position x="94.29937" y="8.9283915" z="94.739632"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL</PrototypeTag>
|
||||
<Position x="111.70499" y="14.759014" z="104.55251"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="15.000003" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_PlazaSteps_A_Small_COL</PrototypeTag>
|
||||
<Position x="111.49685" y="13.618633" z="102.31825"/>
|
||||
<Scale x="0.99999994" y="1" z="0.99999994"/>
|
||||
<Rotation x="0" y="18.000004" z="0"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
<Container Name="HM_HighStreet_2">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="3" Key_Index="2" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3</PrototypeTag>
|
||||
<Position x="54.502098" y="7.9298048" z="102.99089"/>
|
||||
<Scale x="0.99999994" y="0.99999994" z="1"/>
|
||||
<Rotation x="5" y="49.999996" z="-3.8342409"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3" Key_Index="3" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3</PrototypeTag>
|
||||
<Position x="56.1898" y="8.8552332" z="104.5234"/>
|
||||
<Scale x="0.99999994" y="0.99999994" z="1"/>
|
||||
<Rotation x="5" y="49.999996" z="-3.8342409"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3" Key_Index="4" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3</PrototypeTag>
|
||||
<Position x="53.122005" y="6.8031578" z="101.34745"/>
|
||||
<Scale x="0.99999994" y="1" z="0.99999994"/>
|
||||
<Rotation x="0" y="50" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3" Key_Index="5" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3</PrototypeTag>
|
||||
<Position x="58.088501" y="9.7055407" z="106.00336"/>
|
||||
<Scale x="0.99999994" y="0.99999994" z="1"/>
|
||||
<Rotation x="5" y="49.999996" z="-3.8342409"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3" Key_Index="6" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3</PrototypeTag>
|
||||
<Position x="59.941898" y="10.550675" z="107.57169"/>
|
||||
<Scale x="0.99999994" y="0.99999994" z="1"/>
|
||||
<Rotation x="5" y="49.999996" z="-3.8342409"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="3" Key_Index="7" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod1</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod2</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stone_Steps_High_Street_A_Lod3</PrototypeTag>
|
||||
<Position x="60.668945" y="10.918675" z="108.6668"/>
|
||||
<Scale x="0.99999994" y="1" z="0.99999994"/>
|
||||
<Rotation x="0" y="50" z="0"/>
|
||||
</PartObject>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_High_Street_Stairs_A_COL</PrototypeTag>
|
||||
<Position x="54.589691" y="8.3145065" z="103.22376"/>
|
||||
<Scale x="0.99999994" y="0.99999994" z="1.0000001"/>
|
||||
<Rotation x="10.000001" y="50.000008" z="-7.6926308"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_High_Street_Stairs_B_COL</PrototypeTag>
|
||||
<Position x="53.374268" y="6.9218588" z="100.79335"/>
|
||||
<Scale x="0.99999994" y="1" z="0.99999994"/>
|
||||
<Rotation x="0" y="50" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_High_Street_Stairs_A_COL</PrototypeTag>
|
||||
<Position x="57.332142" y="9.6449766" z="105.63279"/>
|
||||
<Scale x="0.99999994" y="0.99999994" z="0.99999988"/>
|
||||
<Rotation x="10.000001" y="50.000008" z="-7.6926308"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="0" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_High_Street_Stairs_B_COL</PrototypeTag>
|
||||
<Position x="60.616646" y="11.076958" z="107.7627"/>
|
||||
<Scale x="0.99999994" y="0.99999994" z="1"/>
|
||||
<Rotation x="9.999999" y="48" z="-7.4653044"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
</Land>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -58,6 +58,7 @@ Texture2D g_Texture5;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
|
||||
int g_iHover;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
@@ -344,7 +345,7 @@ PS_OUT PS_Spell_Anim(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f,1.f,1.f,1.f);
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -1059,7 +1060,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float3 BGColor= float3(1.f, 1.f, 1.f);
|
||||
float3 BGColor = float3(1.f, 1.f, 1.f);
|
||||
|
||||
switch (g_iSpellType)
|
||||
{
|
||||
@@ -1189,6 +1190,48 @@ PS_OUT PS_Spell_Drag(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Camera_LockOn(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float2 center = float2(0.5, 0.5);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
float angle = -g_fTime;
|
||||
float s = sin(angle);
|
||||
float c = cos(angle);
|
||||
float2 maskuv = float2(uv.x * c - uv.y * s, uv.x * s + uv.y * c) + center;
|
||||
|
||||
float tex1 = g_Texture.Sample(ClampSampler, maskuv).r;
|
||||
|
||||
Color.a = tex1 * 0.3f;
|
||||
|
||||
if (g_iHover != 0)
|
||||
{
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, maskuv);
|
||||
|
||||
Color.rgb += (tex2.rgb * tex2.a) * 2.f;
|
||||
}
|
||||
|
||||
float2 UpUV = In.vTexcoord;
|
||||
UpUV.y += g_fTime;
|
||||
|
||||
float4 tex3 = g_Texture2.Sample(DefaultSampler, UpUV);
|
||||
float tex4 = g_Texture1.Sample(ClampSampler, In.vTexcoord).r;
|
||||
|
||||
tex3.a *= tex4;
|
||||
|
||||
Color = lerp(Color, tex3, tex3.a);
|
||||
|
||||
Color.a *= Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -1429,4 +1472,14 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_Spell_Drag();
|
||||
}
|
||||
|
||||
pass Camera_LockOn
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, 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_Camera_LockOn();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 914 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -167,6 +167,7 @@
|
||||
<ClInclude Include="..\public\AlphaMap.h" />
|
||||
<ClInclude Include="..\Public\Body.h" />
|
||||
<ClInclude Include="..\Public\BombardSide.h" />
|
||||
<ClInclude Include="..\public\CameraLockOn.h" />
|
||||
<ClInclude Include="..\public\Current_Slot_Number.h" />
|
||||
<ClInclude Include="..\public\Current_Spell_Slot.h" />
|
||||
<ClInclude Include="..\Public\Decendo.h" />
|
||||
@@ -334,6 +335,7 @@
|
||||
<ClCompile Include="..\private\AlphaMap.cpp" />
|
||||
<ClCompile Include="..\Private\Body.cpp" />
|
||||
<ClCompile Include="..\Private\BombardSide.cpp" />
|
||||
<ClCompile Include="..\private\CameraLockOn.cpp" />
|
||||
<ClCompile Include="..\private\Current_Slot_Number.cpp" />
|
||||
<ClCompile Include="..\private\Current_Spell_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\Decendo.cpp" />
|
||||
|
||||
@@ -933,6 +933,9 @@
|
||||
<ClInclude Include="..\public\UI_Manager.h">
|
||||
<Filter>50.UI\UI_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\CameraLockOn.h">
|
||||
<Filter>50.UI\Mouse_Cursor</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1387,6 +1390,9 @@
|
||||
<ClCompile Include="..\private\UI_Manager.cpp">
|
||||
<Filter>50.UI\UI_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\CameraLockOn.cpp">
|
||||
<Filter>50.UI\Mouse_Cursor</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
#include "pch.h"
|
||||
#include "CameraLockOn.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CCameraLockOn::CCameraLockOn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CUIObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CCameraLockOn::CCameraLockOn(const CCameraLockOn& rhs)
|
||||
:CUIObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CCameraLockOn::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCameraLockOn::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 960.f;
|
||||
Desc.fY = 540.f;
|
||||
Desc.fSizeX = 50.f;
|
||||
Desc.fSizeY = 50.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
m_fTimeMult = 0.5f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCameraLockOn::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CCameraLockOn::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON))
|
||||
{
|
||||
m_bHover = true;
|
||||
}
|
||||
else
|
||||
m_bHover = false;
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
}
|
||||
|
||||
void CCameraLockOn::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible) {
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CCameraLockOn::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::CAMERA_LOCKON)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CCameraLockOn::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CCameraLockOn::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bHover, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCameraLockOn::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_CameraLockOnReticlePulse"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_AimReticleBase"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_MagicSplatter"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CCameraLockOn* CCameraLockOn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCameraLockOn* pInstance = new CCameraLockOn(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CCameraLockOn");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CCameraLockOn::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CCameraLockOn* pInstance = new CCameraLockOn(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CCameraLockOn");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CCameraLockOn::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CCameraLockOn::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -56,11 +56,6 @@ HRESULT CLevel_UI::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_UI::Ready_Layer_Cursor(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMouse_Cursor>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,13 +39,15 @@
|
||||
#include "Spell_Data.h"
|
||||
#include "UI_Manager.h"
|
||||
|
||||
#include "Mouse_Cursor.h"
|
||||
#include "CameraLockOn.h"
|
||||
|
||||
#include "GamePlay_Canvas.h"
|
||||
|
||||
#include "Mission_Panel.h"
|
||||
#include "MissionBanner_Border.h"
|
||||
#include "MissionBanner_Key.h"
|
||||
#include "Mission_Icon.h"
|
||||
#include "Mouse_Cursor.h"
|
||||
#include "MiniMap_TrimBorder.h"
|
||||
|
||||
#include "MiniMap_Panel.h"
|
||||
@@ -350,11 +352,6 @@ HRESULT CLoader::Loading_For_UI()
|
||||
|
||||
});
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Cursor"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Cursor/UI_T_CursorRings.dds"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Mission", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
@@ -500,7 +497,7 @@ HRESULT CLoader::Loading_For_UI()
|
||||
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/GadgetWheel", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Cursor", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
@@ -515,6 +512,7 @@ HRESULT CLoader::Loading_For_UI()
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Item"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/GadgetWheel/Item%d.png"), 8)))) {
|
||||
return E_FAIL;
|
||||
@@ -839,12 +837,17 @@ HRESULT CLoader::Loading_For_UI()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGamePlay_Canvas>(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext))))
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMouse_Cursor>(g_iStaticLevel, CMouse_Cursor::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMouse_Cursor>(g_iStaticLevel, CMouse_Cursor::Create(m_pDevice, m_pContext))))
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CCameraLockOn>(g_iStaticLevel, CCameraLockOn::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGamePlay_Canvas>(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -1037,6 +1040,8 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { };
|
||||
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_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
@@ -1055,6 +1060,8 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 100.f, 100.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_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
@@ -1389,6 +1396,8 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { };
|
||||
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_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
@@ -1408,6 +1417,8 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 100.f, 100.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_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
@@ -1427,6 +1438,8 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = { PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_X | PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Z | PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Y };
|
||||
Desc.vAutoDamping = { 10.f, 10.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_DYNAMIC_PLATFORM"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
@@ -1444,6 +1457,8 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
Desc.vhalfGeometryInfo = { 3.5f, 1.5f, 0.25f };
|
||||
Desc.fDensity = 10.f;
|
||||
PSX::PxTransform pxPivotTransform = PSX::PxTransform(PSX::PxVec3(3.5f, 1.5f, 0.f));
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
|
||||
Desc.pxMassCenter = pxPivotTransform;
|
||||
Desc.eLockFlag = {
|
||||
@@ -1476,6 +1491,8 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
Desc.pxMassCenter = pxPivotTransform;
|
||||
Desc.eLockFlag = { };
|
||||
Desc.vAutoDamping = { 10.f, 10.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_DYNAMIC_DOOR"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
@@ -1888,6 +1905,8 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 100.f, 100.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_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
@@ -2021,9 +2040,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
));*/
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Wand_Model")
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Npc_Model")
|
||||
));
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin",XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Wand_Model")
|
||||
@@ -2299,7 +2319,7 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
|
||||
///* BLDG_TeaShop */
|
||||
/*if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Meshes",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Collision",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
@@ -2416,10 +2436,21 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
|
||||
/* Doors */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Doors",
|
||||
".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Barrel */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Objects\\Meshes",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Step */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\GroundSurfaces",
|
||||
".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\GroundSurfaces",
|
||||
".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
@@ -2756,6 +2787,23 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
Desc.eType = ACTOR::BOX;
|
||||
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.fContactOffset = { 0.05f };
|
||||
Desc.vhalfGeometryInfo = { 0.5f, 0.5f, 0.5f };
|
||||
Desc.fDensity = 10.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { };
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_Collider */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Collider"),
|
||||
|
||||
@@ -50,6 +50,9 @@ HRESULT CMapElement_Interactable::Initialize(void* pArg)
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
#endif // _DEBUG
|
||||
|
||||
m_vBoxSize = _float3(1.f, 1.f, 1.f);
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -62,20 +65,21 @@ void CMapElement_Interactable::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CMapElement_Interactable::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CMapElement_Interactable::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
if (m_bSelected)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
}
|
||||
}
|
||||
|
||||
void CMapElement_Interactable::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
|
||||
#endif
|
||||
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
}
|
||||
@@ -92,7 +96,7 @@ HRESULT CMapElement_Interactable::Render()
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (m_bSelected)
|
||||
if (m_bSelected && m_bUseSelectColor)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::MAPTOOL)))) {
|
||||
return E_FAIL;
|
||||
@@ -111,6 +115,12 @@ HRESULT CMapElement_Interactable::Render()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pRigidBody->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -137,6 +147,17 @@ HRESULT CMapElement_Interactable::Ready_Components(void* pArg)
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
ELEMENT_INTERACTABLE_DESC* pPhysXDummyDesc = static_cast<ELEMENT_INTERACTABLE_DESC*>(pArg);
|
||||
|
||||
// RIGID_BODY
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::BOX);//pPhysXDummyDesc->iSubKind;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -187,9 +208,14 @@ CGameObject* CMapElement_Interactable::Clone(void* pArg, CGameObject* pOwner)
|
||||
|
||||
void CMapElement_Interactable::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
for (auto& pModel : m_pModelComs)
|
||||
SAFE_RELEASE(pModel);
|
||||
}
|
||||
@@ -201,34 +227,82 @@ void CMapElement_Interactable::Describe_Entity()
|
||||
if (nullptr == m_pGameInstance)
|
||||
return;
|
||||
|
||||
PSX::PxVec3 vDir = PSX::PxVec3(0.f, 1.f, 0.f);
|
||||
|
||||
if (GUI::CollapsingHeader("Rigid Body"))
|
||||
{
|
||||
GUI::InputFloat("Power", &m_fPower);
|
||||
|
||||
if (GUI::Button("Move Test"))
|
||||
{
|
||||
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
if(nullptr != m_pActor)
|
||||
{
|
||||
m_pActor->wakeUp();
|
||||
m_pActor->addForce(vDir * m_fPower * 100000.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
}
|
||||
if (GUI::Button("OFF_Kinematic"))
|
||||
{
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
if (nullptr != m_pActor)
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
|
||||
}
|
||||
if (GUI::Button("ON_Kinematic"))
|
||||
{
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
if (nullptr != m_pActor)
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, true);
|
||||
}
|
||||
|
||||
if(GUI::InputFloat("Mass", &m_fMass))
|
||||
m_pActor->setMass(m_fMass);
|
||||
|
||||
m_pRigidBody->Describe_Entity();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
GUI::Text(CMyTools::ToString(m_ModelPrototypeTags[m_iLodIndex]).c_str());
|
||||
GUI::InputInt("Lod Level", (_int*)(&m_iLodIndex));
|
||||
m_iLodIndex = max(0, m_iLodIndex);
|
||||
m_iLodIndex = min(m_iMaxLodLevel, m_iLodIndex);
|
||||
|
||||
GUI::Checkbox("Select Color ON / OFF", &m_bUseSelectColor);
|
||||
|
||||
GUI::Text("----- Transfrom ----");
|
||||
GUI::InputFloat("X##Position", &m_vPosition.x, 0.1f, 1.f);
|
||||
GUI::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
|
||||
GUI::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
|
||||
_float3 vMove = {};
|
||||
GUI::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
|
||||
|
||||
//m_pTransformCom->Move_Right(vMove.x);
|
||||
//m_pTransformCom->Move_Up(vMove.y);
|
||||
//m_pTransformCom->Move_Look(vMove.z);
|
||||
|
||||
//XMStoreFloat3(&m_vPosition, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
{
|
||||
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object<CTerrain>();
|
||||
if (nullptr != pTerrain)
|
||||
_float3 vPosition = {};
|
||||
if (m_pGameInstance->isPicking(&vPosition))
|
||||
{
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>()->Get_XMWorldMatrix(), &m_vPosition);
|
||||
memcpy(&m_vPosition, &vPosition, sizeof(_float3));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat3(&m_vPosition));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GUI::Text("----- Rotation ----");
|
||||
GUI::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
|
||||
GUI::InputFloat("Y##Rotation", &m_vRotation.y, 10.f, 45.f);
|
||||
GUI::InputFloat("Z##Rotation", &m_vRotation.z, 10.f, 45.f);
|
||||
GUI::InputFloat("X##Rotation", &m_vRotation.x, 1.f, 15.f);
|
||||
GUI::InputFloat("Y##Rotation", &m_vRotation.y, 1.f, 15.f);
|
||||
GUI::InputFloat("Z##Rotation", &m_vRotation.z, 1.f, 15.f);
|
||||
|
||||
GUI::Text("----- Scale ----");
|
||||
GUI::InputFloat("X##Scale", &m_vScale.x, 0.1f, 1.f);
|
||||
GUI::InputFloat("Y##Scale", &m_vScale.y, 0.1f, 1.f);
|
||||
GUI::InputFloat("Z##Scale", &m_vScale.z, 0.1f, 1.f);
|
||||
GUI::InputFloat("X##Scale", &m_vScale.x, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Y##Scale", &m_vScale.y, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Z##Scale", &m_vScale.z, 0.05f, 0.1f);
|
||||
|
||||
m_vScale.x = max(0.01f, m_vScale.x);
|
||||
m_vScale.y = max(0.01f, m_vScale.y);
|
||||
@@ -239,3 +313,55 @@ void CMapElement_Interactable::Describe_Entity()
|
||||
|
||||
m_bSelected = true;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Interactable::Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)
|
||||
{
|
||||
tinyxml2::XMLElement* object = doc.NewElement("Object");
|
||||
object->SetAttribute("Type", ENUM_CLASS(MAPOBJECT_TYPE::ELEMENT_INTERACT));
|
||||
object->SetAttribute("ID", ENUM_CLASS(m_eInteractableID));
|
||||
object->SetAttribute("Lod_Level", m_iLodIndex);
|
||||
root->InsertEndChild(object);
|
||||
|
||||
#pragma region PROTOTYPETAG
|
||||
for (_uint i = 0; i < m_iLodIndex + 1; ++i)
|
||||
{
|
||||
tinyxml2::XMLElement* prototype = doc.NewElement("PrototypeTag");
|
||||
prototype->SetText(CMyTools::ToString(m_ModelPrototypeTags[i]).c_str());
|
||||
object->InsertEndChild(prototype);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region TRANSFORM
|
||||
_float3 vPosition = {};
|
||||
XMStoreFloat3(&vPosition, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
|
||||
_float3 vRotation = {};
|
||||
XMStoreFloat3(&vRotation, m_pTransformCom->Get_RollPitchYawVector());
|
||||
vRotation.x = XMConvertToDegrees(vRotation.x);
|
||||
vRotation.y = XMConvertToDegrees(vRotation.y);
|
||||
vRotation.z = XMConvertToDegrees(vRotation.z);
|
||||
|
||||
tinyxml2::XMLElement* Position = doc.NewElement("Position");
|
||||
Position->SetAttribute("x", vPosition.x);
|
||||
Position->SetAttribute("y", vPosition.y);
|
||||
Position->SetAttribute("z", vPosition.z);
|
||||
object->InsertEndChild(Position);
|
||||
|
||||
tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
|
||||
Scale->SetAttribute("x", vScale.x);
|
||||
Scale->SetAttribute("y", vScale.y);
|
||||
Scale->SetAttribute("z", vScale.z);
|
||||
object->InsertEndChild(Scale);
|
||||
|
||||
tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
|
||||
Rotation->SetAttribute("x", vRotation.x);
|
||||
Rotation->SetAttribute("y", vRotation.y);
|
||||
Rotation->SetAttribute("z", vRotation.z);
|
||||
object->InsertEndChild(Rotation);
|
||||
#pragma endregion
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ void CMapObject_Collision::Late_Update(_float fTimeDelta)
|
||||
#endif
|
||||
|
||||
XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
|
||||
if (m_pGameInstance->Key_Pressing(DIK_V)){
|
||||
if (m_bVisible){
|
||||
if (m_pGameInstance->isIn_WorldFrustum(XMLoadFloat4(reinterpret_cast<_float4*>(m_CombinedWorldMatrix.m[3])), m_pTransformCom->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
@@ -96,7 +96,7 @@ HRESULT CMapObject_Collision::Initialize_Prototype()
|
||||
HRESULT CMapObject_Collision::Initialize(void* pArg)
|
||||
{
|
||||
m_iMaxLodLevel = 0;
|
||||
|
||||
m_bVisible = true;
|
||||
MAPOBJECT_LOD_DESC* pDesc = static_cast<MAPOBJECT_LOD_DESC*>(pArg);
|
||||
|
||||
m_iMaxLodLevel = pDesc->iMaxLodLevel;
|
||||
@@ -115,6 +115,7 @@ HRESULT CMapObject_Collision::Initialize(void* pArg)
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_bSelected = false;
|
||||
m_bVisible = false;
|
||||
m_vPosition = pDesc->vPosition;
|
||||
m_vScale = pDesc->vScale;
|
||||
m_vRotation = pDesc->vRotation;
|
||||
@@ -233,20 +234,28 @@ void CMapObject_Collision::Describe_Entity()
|
||||
|
||||
//ImGui::Text(CMyTools::ToString(m_strModelPrototypeTag).c_str());
|
||||
GUI::Checkbox("Visible", &m_bVisible);
|
||||
_float3 vMove = {};
|
||||
|
||||
ImGui::Text("----- Transfrom ----");
|
||||
ImGui::InputFloat("X##Position", &m_vPosition.x, 0.1f, 1.f);
|
||||
ImGui::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
|
||||
ImGui::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
|
||||
ImGui::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
|
||||
ImGui::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
|
||||
ImGui::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
|
||||
|
||||
m_pTransformCom->Move_Right(vMove.x);
|
||||
m_pTransformCom->Move_Up(vMove.y);
|
||||
m_pTransformCom->Move_Look(vMove.z);
|
||||
|
||||
XMStoreFloat3(&m_vPosition, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
{
|
||||
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object<CTerrain>();
|
||||
if (nullptr != pTerrain)
|
||||
_float3 vPosition = {};
|
||||
if (m_pGameInstance->isPicking(&vPosition))
|
||||
{
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>()->Get_XMWorldMatrix(), &m_vPosition);
|
||||
memcpy(&m_vPosition, &vPosition, sizeof(_float3));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat3(&m_vPosition));
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Text("----- Rotation ----");
|
||||
ImGui::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
|
||||
ImGui::InputFloat("Y##Rotation", &m_vRotation.y, 10.f, 45.f);
|
||||
|
||||
@@ -58,7 +58,10 @@ HRESULT CMapObject_Manager::Initialize(void* pArg)
|
||||
m_iContainerObjectIndex = 99;
|
||||
//m_pContainer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"))->Get_Object<CBuildingContainer>();
|
||||
|
||||
if (FAILED(Load_MapData("Map1129")))
|
||||
if (FAILED(Load_MapData("Map1205")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Load_LightObject("LightElement")))
|
||||
return E_FAIL;
|
||||
/*if (FAILED(Load_LightObject("LightElement")))
|
||||
return E_FAIL;
|
||||
@@ -409,7 +412,7 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
|
||||
prototype->SetText(CMyTools::ToString(pElement->Get_PrototypeTag(i)).c_str());
|
||||
object->InsertEndChild(prototype);
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma endregion // PROTOTYPETAG
|
||||
|
||||
#pragma region TRANSFORM
|
||||
_float3 vPosition = {};
|
||||
@@ -440,11 +443,11 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
|
||||
Rotation->SetAttribute("y", vRotation.y);
|
||||
Rotation->SetAttribute("z", vRotation.z);
|
||||
object->InsertEndChild(Rotation);
|
||||
#pragma endregion
|
||||
#pragma endregion // TRANSFORM
|
||||
|
||||
}
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma endregion // ELEMENT_INTERACTABEL
|
||||
|
||||
|
||||
// ?ú?å
|
||||
@@ -1184,8 +1187,6 @@ HRESULT CMapObject_Manager::Save_LightObject(const _char* pFileName)
|
||||
tinyxml2::XMLElement* root = doc.NewElement("MapLightObjects");
|
||||
doc.InsertEndChild(root);
|
||||
|
||||
|
||||
|
||||
if (nullptr != pLayer)
|
||||
{
|
||||
const list<CGameObject*>* pList = pLayer->Get_Objects();
|
||||
@@ -1200,7 +1201,6 @@ HRESULT CMapObject_Manager::Save_LightObject(const _char* pFileName)
|
||||
if (FAILED(pElement->Save_XML(doc, root)))
|
||||
return E_FAIL;
|
||||
}
|
||||
#pragma endregion
|
||||
}
|
||||
|
||||
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
|
||||
@@ -1302,6 +1302,101 @@ HRESULT CMapObject_Manager::Load_LightObject(const _char* pFileName)
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CMapObject_Manager::Save_InteractObject(const _char* pFileName)
|
||||
{
|
||||
CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Interactable"));
|
||||
|
||||
if (nullptr != pLayer)
|
||||
return S_OK;
|
||||
|
||||
tinyxml2::XMLDocument doc;
|
||||
string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
|
||||
|
||||
tinyxml2::XMLError loadResult = doc.LoadFile(strPath.c_str());
|
||||
|
||||
doc.Clear();
|
||||
doc.InsertFirstChild(doc.NewDeclaration());
|
||||
|
||||
tinyxml2::XMLElement* Element_Interactable = doc.NewElement("Element_Interactable");
|
||||
doc.InsertEndChild(Element_Interactable);
|
||||
|
||||
#pragma region ELEMENT_INTERACTABEL
|
||||
|
||||
if (nullptr != pLayer)
|
||||
{
|
||||
const list<CGameObject*>* pList = pLayer->Get_Objects();
|
||||
|
||||
for (auto pGamObject : *pList)
|
||||
{
|
||||
CMapElement* pElement = dynamic_cast<CMapElement*>(pGamObject);
|
||||
|
||||
if (nullptr == pElement)
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(pElement->Save_XML(doc, Element_Interactable)))
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
#pragma endregion // ELEMENT_INTERACTABEL
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CMapObject_Manager::Load_InteractObject(const _char* pFileName)
|
||||
{
|
||||
tinyxml2::XMLDocument xmlDoc;
|
||||
|
||||
string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
|
||||
|
||||
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
|
||||
return E_FAIL;
|
||||
|
||||
tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("MapLightObjects");
|
||||
|
||||
if (nullptr == root)
|
||||
{
|
||||
MSG_BOX("Failed to Find root");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
{
|
||||
CMapElement_Interactable::ELEMENT_INTERACTABLE_DESC Desc = {};
|
||||
|
||||
/* Model Prototypes */
|
||||
Object->QueryUnsignedAttribute("Lod_Level", &Desc.iMaxLodLevel);
|
||||
Object->QueryUnsignedAttribute("Lod_Level", &Desc.iInteractableID);
|
||||
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = Object->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
|
||||
/* Transform */
|
||||
auto* Position = Object->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
auto* Scale = Object->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
auto* Rotation = Object->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Interactable>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interactable"), &Desc)))
|
||||
return E_FAIL;
|
||||
}
|
||||
MSG_BOX("Successed to Create Interactalbe Element");
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CMapObject_Manager::Update_PrototypeList()
|
||||
{
|
||||
GUI::Begin("Model Prototype List");
|
||||
@@ -1594,6 +1689,7 @@ void CMapObject_Manager::Create_Elemnt(_wstring& strPrototypeTag)
|
||||
{
|
||||
MAPOBJECT_LOD_DESC Desc = {};
|
||||
CMapElement_Light::MAPELEMENT_LIGHT_DESC Light_Desc = {};
|
||||
CMapElement_Interactable::ELEMENT_INTERACTABLE_DESC Interactable_Desc = {};
|
||||
vector<_wstring> PrototypeTags;
|
||||
vector<_uint> LodModelIndices;
|
||||
|
||||
@@ -1607,13 +1703,13 @@ void CMapObject_Manager::Create_Elemnt(_wstring& strPrototypeTag)
|
||||
PrototypeTags.push_back(strLodTag);
|
||||
}
|
||||
|
||||
Light_Desc.iMaxLodLevel = Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
|
||||
Light_Desc.ModelPrototypeTags = Desc.ModelPrototypeTags = PrototypeTags;
|
||||
Light_Desc.pParentTransform = Desc.pParentTransform = m_pTransformCom;
|
||||
Light_Desc.vPosition = Desc.vPosition = _float3(0.f, 0.f, 0.f);
|
||||
Light_Desc.vRotation = Desc.vRotation = _float3(0.f, 0.f, 0.f);
|
||||
Light_Desc.vScale = Desc.vScale = _float3(1.f, 1.f, 1.f);
|
||||
Light_Desc.pModelPathIndices =Desc.pModelPathIndices = &LodModelIndices;
|
||||
Interactable_Desc.iMaxLodLevel = Light_Desc.iMaxLodLevel = Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
|
||||
Interactable_Desc.ModelPrototypeTags = Light_Desc.ModelPrototypeTags = Desc.ModelPrototypeTags = PrototypeTags;
|
||||
Interactable_Desc.pParentTransform = Light_Desc.pParentTransform = Desc.pParentTransform = m_pTransformCom;
|
||||
Interactable_Desc.vPosition = Light_Desc.vPosition = Desc.vPosition = _float3(0.f, 0.f, 0.f);
|
||||
Interactable_Desc.vRotation = Light_Desc.vRotation = Desc.vRotation = _float3(0.f, 0.f, 0.f);
|
||||
Interactable_Desc.vScale = Light_Desc.vScale = Desc.vScale = _float3(1.f, 1.f, 1.f);
|
||||
Interactable_Desc.pModelPathIndices = Light_Desc.pModelPathIndices =Desc.pModelPathIndices = &LodModelIndices;
|
||||
|
||||
if (ADD_TYPE::ELEMENT_STATIC == m_eType)
|
||||
{
|
||||
@@ -1621,6 +1717,8 @@ void CMapObject_Manager::Create_Elemnt(_wstring& strPrototypeTag)
|
||||
}
|
||||
else if (ADD_TYPE::ELEMENT_INTERACT == m_eType)
|
||||
{
|
||||
Interactable_Desc.iInteractableID = 0;
|
||||
|
||||
m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Interactable>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interact"), &Desc);
|
||||
}
|
||||
else if (ADD_TYPE::ELEMENT_LIGHT == m_eType)
|
||||
|
||||
@@ -37,6 +37,7 @@ HRESULT CMouse_Cursor::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 5.f;
|
||||
// 메뉴가 실행이 되면 마우스가 나타나고 다른 UI위에 올라가면 살짝 작아진다.
|
||||
return S_OK;
|
||||
}
|
||||
@@ -52,7 +53,9 @@ void CMouse_Cursor::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CMouse_Cursor::Update(_float fTimeDelta)
|
||||
{
|
||||
m_fTime += fTimeDelta;
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
|
||||
/*ShowCursor(false);*/
|
||||
}
|
||||
|
||||
@@ -118,6 +121,7 @@ HRESULT CMouse_Cursor::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -127,7 +131,7 @@ HRESULT CMouse_Cursor::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Cursor"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_CursorRings"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -86,9 +86,9 @@ void CTerrain::Priority_Update(_float fTimeDelta)
|
||||
#pragma endregion
|
||||
|
||||
#pragma region HEIGHT MAP
|
||||
//HRESULT hr = {};
|
||||
//if(GUI::Button("Save HeightMap"))
|
||||
// hr = m_pVIBufferCom->Save_HeightMap("Hogsmeade_HeightMap.bin");
|
||||
HRESULT hr = {};
|
||||
if(GUI::Button("Save HeightMap"))
|
||||
hr = m_pVIBufferCom->Save_HeightMap("Hogsmeade_HeightMap2.bin");
|
||||
//if(GUI::Button("Load HeightMap"))
|
||||
// hr = m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin");
|
||||
#pragma endregion
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#include "pch.h"
|
||||
#include "UI_Manager.h"
|
||||
#include "pch.h"
|
||||
#include "UI_Manager.h"
|
||||
#include "GameInstance.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Spell_Canvas.h"
|
||||
#include "Mouse_Cursor.h"
|
||||
#include "CameraLockOn.h"
|
||||
|
||||
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CUIObject(pDevice, pContext)
|
||||
@@ -51,6 +54,7 @@ void CUI_Manager::Canvas_Change(Canvases eType)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CUI_Manager::Clear_Canvas()
|
||||
{
|
||||
}
|
||||
@@ -135,6 +139,16 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
}
|
||||
Add_Canvas(TEXT("Spell_Canvas"), m_pSpell_Canvas);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMouse_Cursor>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMouse_Cursor**>(&m_pMouse_Cursor)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCameraLockOn>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CCameraLockOn**>(&m_pCamera_LockOn)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "UIObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CCameraLockOn final : public CUIObject
|
||||
{
|
||||
private:
|
||||
CCameraLockOn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CCameraLockOn(const CCameraLockOn& rhs);
|
||||
virtual ~CCameraLockOn() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom2 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
public:
|
||||
static CCameraLockOn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -24,27 +24,29 @@ namespace Editor
|
||||
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,END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, 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, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END };
|
||||
|
||||
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
enum class SKILL_TYPE{ ARRESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색
|
||||
ACCIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색
|
||||
CONFRINGO, DIFFINDO, EXPELLIARMUS, BOMBARDA, INCENDIO, // 빨간색
|
||||
DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA, // 하늘색
|
||||
CONJURING_SPELL, ALTERING_SPELL, EVANESCO, // 연녹색
|
||||
AVADA_KEDAVRA, CRUCIO, IMPERIO, // 진녹색
|
||||
BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색
|
||||
JAP , REVELIO, PROTEGO, STUPEFY, // 검은색
|
||||
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS,
|
||||
JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE,END
|
||||
enum class SKILL_TYPE {
|
||||
ARRESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색
|
||||
ACCIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색
|
||||
CONFRINGO, DIFFINDO, EXPELLIARMUS, BOMBARDA, INCENDIO, // 빨간색
|
||||
DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA, // 하늘색
|
||||
CONJURING_SPELL, ALTERING_SPELL, EVANESCO, // 연녹색
|
||||
AVADA_KEDAVRA, CRUCIO, IMPERIO, // 진녹색
|
||||
BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색
|
||||
JAP, REVELIO, PROTEGO, STUPEFY, // 검은색
|
||||
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS,
|
||||
JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, END
|
||||
};
|
||||
|
||||
enum class BLOOM_TYPE { NONE , BASIC , MULTIPLY , END};
|
||||
enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END };
|
||||
|
||||
enum class ELEMENT_INTERACTABLE_ID { BARREL, END };
|
||||
}
|
||||
|
||||
using namespace Editor;
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "MapElement.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CMapElement_Interactable : public CMapElement
|
||||
class CMapElement_Interactable final : public CMapElement
|
||||
{
|
||||
public:
|
||||
typedef struct tagElement_Interactable_Desc : MAPOBJECT_LOD_DESC
|
||||
{
|
||||
_uint iInteractableID = {};
|
||||
_uint iSubKind = {};
|
||||
}ELEMENT_INTERACTABLE_DESC;
|
||||
|
||||
private:
|
||||
CMapElement_Interactable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMapElement_Interactable(const CMapElement_Interactable& rhs);
|
||||
@@ -19,7 +26,19 @@ class CMapElement_Interactable : public CMapElement
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
_uint m_iSaveIndex = {}; // 원래 위치 받아올때 필요한 인덱스
|
||||
ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END};
|
||||
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
|
||||
#ifdef _DEBUG
|
||||
_bool m_bUseSelectColor = { true };
|
||||
|
||||
_float m_fPower = {};
|
||||
_float m_fMass = {};
|
||||
_float3 m_vBoxSize = {};
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
@@ -32,6 +51,7 @@ class CMapElement_Interactable : public CMapElement
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
virtual HRESULT Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -64,6 +64,9 @@ class CMapObject_Manager final : public CGameObject
|
||||
|
||||
HRESULT Save_LightObject(const _char* pFileName);
|
||||
HRESULT Load_LightObject(const _char* pFileName);
|
||||
|
||||
HRESULT Save_InteractObject(const _char* pFileName);
|
||||
HRESULT Load_InteractObject(const _char* pFileName);
|
||||
#pragma endregion
|
||||
|
||||
void Update_PrototypeList();
|
||||
|
||||
@@ -12,7 +12,7 @@ NS_BEGIN(Editor)
|
||||
class CUI_Manager final : public CUIObject
|
||||
{
|
||||
public:
|
||||
enum class Canvases {GAMEPLAYER_CANVAS, SPELL_CANVAS};
|
||||
enum class Canvases { GAMEPLAYER_CANVAS, SPELL_CANVAS };
|
||||
|
||||
private:
|
||||
CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -51,6 +51,8 @@ class CUI_Manager final : public CUIObject
|
||||
|
||||
CGameObject* m_pGamePlay_Canves = { nullptr };
|
||||
CGameObject* m_pSpell_Canvas = { nullptr };
|
||||
CGameObject* m_pMouse_Cursor = { nullptr };
|
||||
CGameObject* m_pCamera_LockOn = { nullptr };
|
||||
_bool m_bCanvas_Change = { false };
|
||||
|
||||
Canvases m_eType{};
|
||||
|
||||
@@ -114,7 +114,7 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pResource_Manager = CResource_Manager::Create(*ppDevice, 500);
|
||||
m_pResource_Manager = CResource_Manager::Create(*ppDevice, 1000);
|
||||
if (nullptr == m_pResource_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ HRESULT CMaterial::Initialize(const _char* pModelFilePath, const aiMaterial* pAI
|
||||
if (FAILED(hr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_strPath[i].push_back(szSaveDir);
|
||||
//m_strPath[i].push_back(szSaveDir);
|
||||
m_SRVs[i].push_back(pSRV);
|
||||
}
|
||||
}
|
||||
@@ -353,32 +353,6 @@ HRESULT CMaterial::Add_Texture(const _char* pTextureFolderPath, string& FileType
|
||||
strTexturePath = CMyTools::ToString(szTextureFilePath);
|
||||
}
|
||||
|
||||
//_string strPrefix = "C:";
|
||||
//_string strSearchString = "MeshTable";
|
||||
//_string strResultPath = {};
|
||||
|
||||
//size_t mapRePos = strTexturePath.find(strSearchString);
|
||||
|
||||
//if (mapRePos != std::string::npos)
|
||||
//{
|
||||
// size_t startPos = mapRePos + strSearchString.length();
|
||||
|
||||
// // 'MapRe' 뒤에 오는 경로 건너뛰기
|
||||
// if (startPos < strTexturePath.length() &&
|
||||
// (strTexturePath[startPos] == '\\' || strTexturePath[startPos] == '/')) {
|
||||
// startPos++;
|
||||
// }
|
||||
|
||||
// // 'MapRe' 이후의 나머지 경로를 추출
|
||||
// strResultPath = strTexturePath;//.substr(startPos);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// MSG_BOX("FAILED to Find Path");
|
||||
//}
|
||||
|
||||
//replace(strResultPath.begin(), strResultPath.end(), '\\', '/');
|
||||
|
||||
m_SaveMaterial.Path[ENUM_CLASS(eTexture)].push_back(strTexturePath);
|
||||
m_SRVs[ENUM_CLASS(eTexture)].push_back(pSRV);
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ ID3D11ShaderResourceView* CResource_Manager::Load_SRV(const _char* pFilePath)
|
||||
|
||||
HRESULT hr = {};
|
||||
|
||||
hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV, 1024); // 일단 dds로 시도하고
|
||||
hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV); // 일단 dds로 시도하고
|
||||
if (FAILED(hr)) {
|
||||
memset(szTextureFilePath, 0, sizeof(_char) * MAX_PATH); // 실패하면 원래 확장자로 다시 시도
|
||||
strcat_s(szTextureFilePath, szTextureFileName);
|
||||
@@ -87,7 +87,9 @@ ID3D11ShaderResourceView* CResource_Manager::Load_SRV(const _char* pFilePath)
|
||||
return nullptr;
|
||||
|
||||
m_Resources.emplace(CMyTools::ToWstring(szFileName), pSRV);
|
||||
#ifdef _DEBUG
|
||||
++m_iCount;
|
||||
#endif // _DEBUG
|
||||
|
||||
return pSRV;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ CRigidBody::CRigidBody(const CRigidBody& rhs) :
|
||||
m_ePxRigidBodyFlags(rhs.m_ePxRigidBodyFlags),
|
||||
m_ePxShapeFlags(rhs.m_ePxShapeFlags),
|
||||
m_eMatType(rhs.m_eMatType),
|
||||
m_fContactOffset(rhs.m_fContactOffset)
|
||||
m_fContactOffset(rhs.m_fContactOffset),
|
||||
m_vLocalRotQ(rhs.m_vLocalRotQ),
|
||||
m_vLocalTranslation(rhs.m_vLocalTranslation)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,67 @@ HRESULT CRigidBody_Dynamic::Render()
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
#endif
|
||||
void CRigidBody_Dynamic::Set_HalfGeometryInfo(_float3 vhalfGeometryInfo)
|
||||
{
|
||||
m_vhalfGeometryInfo = vhalfGeometryInfo;
|
||||
PSX::PxShape* pShape = { nullptr };
|
||||
m_pRigidBody->getShapes(&pShape, m_pRigidBody->getNbShapes());
|
||||
|
||||
switch (m_eActorType)
|
||||
{
|
||||
case ACTOR::BOX:
|
||||
{
|
||||
PSX::PxBoxGeometry Geometry((const PSX::PxBoxGeometry&)pShape->getGeometry());
|
||||
Geometry.halfExtents = { vhalfGeometryInfo.x, vhalfGeometryInfo.y, vhalfGeometryInfo.z };
|
||||
if (false == Geometry.isValid()) {
|
||||
assert(false);
|
||||
}
|
||||
pShape->setGeometry(Geometry);
|
||||
} break;
|
||||
case ACTOR::CAPSULE:
|
||||
{
|
||||
PSX::PxCapsuleGeometry Geometry((const PSX::PxCapsuleGeometry&)pShape->getGeometry());
|
||||
Geometry.halfHeight = { vhalfGeometryInfo.y };
|
||||
Geometry.radius = { vhalfGeometryInfo.x };
|
||||
if (false == Geometry.isValid()) {
|
||||
assert(false);
|
||||
}
|
||||
pShape->setGeometry(Geometry);
|
||||
} break;
|
||||
case ACTOR::SPHERE:
|
||||
{
|
||||
PSX::PxSphereGeometry Geometry((const PSX::PxSphereGeometry&)pShape->getGeometry());
|
||||
Geometry.radius = { vhalfGeometryInfo.x };
|
||||
if (false == Geometry.isValid()) {
|
||||
assert(false);
|
||||
}
|
||||
pShape->setGeometry(Geometry);
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (nullptr != m_pMainShape) {
|
||||
m_pMainShape.release();
|
||||
m_pMainShape = nullptr;
|
||||
}
|
||||
if (nullptr != m_pSubShape) {
|
||||
m_pSubShape.release();
|
||||
m_pSubShape = nullptr;
|
||||
}
|
||||
Add_DebugShape();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
void CRigidBody_Dynamic::Move_LocalPos(_float4 vNewRotQ, _float3 vNewTranslation)
|
||||
{
|
||||
m_vLocalRotQ = vNewRotQ;
|
||||
m_vLocalTranslation = vNewTranslation;
|
||||
PSX::PxShape* pShape = { nullptr };
|
||||
m_pRigidBody->getShapes(&pShape, m_pRigidBody->getNbShapes());
|
||||
pShape->setLocalPose(PSX::PxTransform(vNewTranslation.x, vNewTranslation.y, vNewTranslation.z, PSX::PxQuat(vNewRotQ.x, vNewRotQ.y, vNewRotQ.z, vNewRotQ.w)));
|
||||
}
|
||||
// _DEBUG
|
||||
void CRigidBody_Dynamic::Add_Force(_fvector vForce, PSX::PxForceMode::Enum eType)
|
||||
{
|
||||
PSX::PxVec3 vPxForce = {};
|
||||
@@ -125,6 +185,8 @@ HRESULT CRigidBody_Dynamic::Initialize_Prototype(RIGIDBODY_PROTOTYPE_DYNAMIC_DES
|
||||
m_eLockFlag = Desc.eLockFlag;
|
||||
m_PxMassCenter = Desc.pxMassCenter;
|
||||
m_vDamping = Desc.vAutoDamping;
|
||||
m_vLocalRotQ = Desc.vLocalRotQ;
|
||||
m_vLocalTranslation = Desc.vLocalTranslation;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -150,6 +212,8 @@ HRESULT CRigidBody_Dynamic::Initialize(void* pArg)
|
||||
m_pRigidBody->setRigidDynamicLockFlags(m_eLockFlag);
|
||||
m_pRigidBody->setLinearDamping(m_vDamping.x);
|
||||
m_pRigidBody->setAngularDamping(m_vDamping.y);
|
||||
|
||||
Move_LocalPos(m_vLocalRotQ, m_vLocalTranslation);
|
||||
//m_pRigidBody->joint;
|
||||
//PSX::PxRevol
|
||||
|
||||
@@ -213,5 +277,40 @@ void CRigidBody_Dynamic::Free()
|
||||
|
||||
void CRigidBody_Dynamic::Describe_Entity()
|
||||
{
|
||||
GUI::BeginChild(("Child ID: " + to_string((size_t)(this))).c_str());
|
||||
GUI::Text("ReSize"); GUI::SameLine();
|
||||
if (GUI::DragFloat3("##Size", (_float*)&m_vhalfGeometryInfo, 0.01f, 0.01f, 10.f, "%.3f")) {
|
||||
Set_HalfGeometryInfo(m_vhalfGeometryInfo);
|
||||
}
|
||||
GUI::Text("Translation"); GUI::SameLine();
|
||||
if (GUI::DragFloat3("##LocalPos", (_float*)&m_vLocalTranslation, 0.125f, -10.f, 10.f, "%.4f")) {
|
||||
Move_LocalPos(m_vLocalRotQ, m_vLocalTranslation);
|
||||
}
|
||||
_vector q = XMLoadFloat4(&m_vLocalRotQ);
|
||||
|
||||
// 기본 방향벡터 (엔진 기준)
|
||||
_vector forward = XMVector3Rotate(XMVectorSet(0, 0, 1, 0), q);
|
||||
_vector right = XMVector3Rotate(XMVectorSet(1, 0, 0, 0), q);
|
||||
_vector up = XMVector3Rotate(XMVectorSet(0, 1, 0, 0), q);
|
||||
|
||||
// --- RPY 계산 ---
|
||||
_float fYaw = atan2f(XMVectorGetX(forward), XMVectorGetZ(forward));
|
||||
_float fPitch = asinf(-XMVectorGetY(forward));
|
||||
_float fRoll = atan2f(XMVectorGetY(right), XMVectorGetY(up)); // 수정된 Roll 계산
|
||||
|
||||
_float3 vRPY = { fRoll, fPitch, fYaw }; // Roll-Pitch-Yaw 순서 정렬
|
||||
|
||||
// --- GUI 편집 ---
|
||||
GUI::Text("Rotation (Roll Pitch Yaw)");
|
||||
GUI::SameLine();
|
||||
if (GUI::DragFloat3("##LocalRotq", (_float*)&vRPY,
|
||||
XMConvertToRadians(0.5f), -XM_2PI, XM_2PI, "%.5f"))
|
||||
{
|
||||
// XMQuaternionRotationRollPitchYaw는 (Yaw→Pitch→Roll) 순서
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(vRPY.z, vRPY.y, vRPY.x);
|
||||
XMStoreFloat4(&m_vLocalRotQ, vRotq);
|
||||
Move_LocalPos(m_vLocalRotQ, m_vLocalTranslation);
|
||||
}
|
||||
GUI::EndChild();
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -20,6 +20,8 @@ HRESULT CRigidBody_Static::Initialize_Prototype(RIGIDBODY_STATIC_PROTOTYPEDESC&
|
||||
m_ePxShapeFlags = Desc.ePxShapeFlags;
|
||||
m_eMatType = Desc.ePxMaterialTypes;
|
||||
m_fContactOffset = Desc.fContactOffset;
|
||||
m_vLocalRotQ = Desc.vLocalRotQ;
|
||||
m_vLocalTranslation = Desc.vLocalTranslation;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -40,11 +40,13 @@ _uint CTexture::Get_Size()
|
||||
{
|
||||
return (_uint)m_SRVs.size();
|
||||
}
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
_bool CTexture::Compare_GroupName(_wstring wstrGroupName)
|
||||
{
|
||||
return m_wstrPrototypeName == wstrGroupName;
|
||||
}
|
||||
#endif // EDITOR_PROJECT
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CTexture::HoverName()
|
||||
@@ -78,8 +80,10 @@ HRESULT CTexture::Initialize_Prototype(TEXTURE_LOAD_TYPE eType, const _tchar* pT
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
m_wstrPrototypeName = wstrPrototypeName;
|
||||
#endif // EDITOR_PROJECT
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -278,11 +278,10 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
class CThreadHolder* m_pThreadHolder = { nullptr };
|
||||
class CFog* m_pFog = { nullptr };
|
||||
class CResource_Manager* m_pResource_Manager = { nullptr };
|
||||
|
||||
mt19937 m_Rng{ random_device{}() };
|
||||
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
|
||||
_float m_fTimer_PriorityUpdate = { 0.f };
|
||||
_float m_fTimer_Update = { 0.f };
|
||||
_float m_fTimer_LateUpdate = { 0.f };
|
||||
|
||||
@@ -12,21 +12,24 @@ class ENGINE_DLL CMaterial final : public CBase
|
||||
|
||||
public:
|
||||
HRESULT Bind_SRV(class CShader* pShader);
|
||||
SaveMaterial Get_SaveMaterial() { return m_SaveMaterial; }
|
||||
|
||||
private:
|
||||
class CGameInstance* m_pGameInstance = { nullptr };
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
class CGameInstance* m_pGameInstance = { nullptr };
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
|
||||
vector<ID3D11ShaderResourceView*> m_SRVs[AI_TEXTURE_TYPE_MAX];
|
||||
SaveMaterial m_SaveMaterial;
|
||||
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
public:
|
||||
SaveMaterial Get_SaveMaterial() { return m_SaveMaterial; }
|
||||
|
||||
static CMaterial* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pModelFilePath, const aiMaterial* pAIMaterial);
|
||||
static CMaterial* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pMaterialFilePath, const _char* pTextureFilePath);
|
||||
private:
|
||||
vector<string> m_strPath[AI_TEXTURE_TYPE_MAX];
|
||||
SaveMaterial m_SaveMaterial;
|
||||
|
||||
HRESULT Initialize(const _char* pModelFilePath, const aiMaterial* pAIMaterial);
|
||||
HRESULT Initialize(const _char* pMaterialFilePath, const _char* pTextureFilePath);
|
||||
HRESULT Read_MaterialFile(const _char* pMaterialFilePath, const _char* pTextureFolderPath);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
|
||||
@@ -20,7 +20,10 @@ class CResource_Manager final : public CBase
|
||||
ID3D11ShaderResourceView* Load_SRV(const _char* pFilePath);
|
||||
|
||||
private:
|
||||
#ifdef _DEBUG
|
||||
_uint m_iCount = {};
|
||||
#endif // DEBUG
|
||||
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
|
||||
unordered_map<_wstring, ID3D11ShaderResourceView*> m_Resources;
|
||||
|
||||
@@ -16,7 +16,8 @@ class ENGINE_DLL CRigidBody abstract : public CComponent
|
||||
PXMATERIAL ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
_float3 vMatInfo = { 0.5f, 0.5f, 0.6f }; // 피직스 객체의 속성 등
|
||||
_float fContactOffset = { 0.05f }; // 접촉 유격 오프셋
|
||||
|
||||
_float4 vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
_float3 vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
}RIGIDBODY_PROTOTYPEDESC;
|
||||
|
||||
typedef struct tagRigidBody_Desc
|
||||
@@ -44,6 +45,8 @@ class ENGINE_DLL CRigidBody abstract : public CComponent
|
||||
PSX::PxShapeFlags m_ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
PXMATERIAL m_eMatType = { PXMATERIAL::END };
|
||||
_float m_fContactOffset = { 0.05f };
|
||||
_float4 m_vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
_float3 m_vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
|
||||
CTransform* m_pTransform = { nullptr };
|
||||
PhsXUserData m_tagData = {};
|
||||
|
||||
@@ -34,6 +34,8 @@ class ENGINE_DLL CRigidBody_Dynamic : public CRigidBody
|
||||
|
||||
virtual PSX::PxRigidDynamic* Get_Actor() override { return m_pRigidBody; };
|
||||
_float3 Get_HalfGeometryInfo() const { return m_vhalfGeometryInfo; }
|
||||
void Set_HalfGeometryInfo(_float3 vhalfGeometryInfo);
|
||||
void Move_LocalPos(_float4 vNewRotQ, _float3 vNewTranslation);
|
||||
_float Get_Density() const { return m_fDensity; }
|
||||
|
||||
virtual void Add_Force(_fvector vForce, PSX::PxForceMode::Enum eType = PSX::PxForceMode::Enum::eFORCE); // 속도 + 방향
|
||||
|
||||
@@ -15,12 +15,13 @@ enum ESTATE
|
||||
COMBAT, LIGHT_ATTACK, SPELL, SKILL, SKILL2,
|
||||
MAPHELP,POTION,
|
||||
ACCIO,DESCENDO,DIFFINDO,DEPULSO,LUMOS,LUMOS_STOP,DISILLUSION_ENTER,DISILLUSION_EXIT, ANCIENT_THROW,
|
||||
SPELL_FAIL,
|
||||
BROOM_IDLE,BROOM_FWD,BROOM_LEFT,BROOM_RIGHT,BROOM_DOWN,BROOM_UP, BROOM_HOVER_IDLE, BROOM_HOVER_FWD, BROOM_HOVER_LEFT, BROOM_HOVER_RIGHT, BROOM_HOVER_START,BROOM_MOUNT, BROOM_MOUNT_END,BROOM_DISMOUNT,
|
||||
RUSH_START,RUSH_LOOP,RUSH_END,
|
||||
THROW_ROCK_START,THROW_ROCK,
|
||||
BACKHAND_SWING_JOG,SWING_FWD,SLAM,
|
||||
BLINK,
|
||||
HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R,HIT_FACE,HIT_FACE_END,
|
||||
HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R,HIT_FACE,HIT_FACE_END,HIT_LEVIOSO,
|
||||
KNOCKDOWN, KNOCKDOWN_FWD, KNOCKDOWN_FWD_SPLT, KNOCKDOWN_FWD_SPLT_HOLD, KNOCKDOWN_BWD, KNOCKDOWN_BWD_SPLT, KNOCKDOWN_BWD_SPLT_HOLD,
|
||||
GETUP, GETUP_BWD, GETUP_FWD, GETUP_L, GETUP_L_FD, GETUP_L_FU, GETUP_R, GETUP_R_FD, GETUP_R_FU, GETUP_SLOUCH,
|
||||
DEAD, DEAD_FWD, DEAD_FWD2, DEAD_BWD, DEAD_BWD2, DEAD_L, DEAD_L2, DEAD_R, DEAD_R2,
|
||||
|
||||
@@ -18,7 +18,9 @@ class ENGINE_DLL CTexture final :
|
||||
vector<ID3D11ShaderResourceView*>* Get_Texture() { return &m_SRVs; }
|
||||
ID3D11ShaderResourceView* Get_SRV(_uint iTextureIndex);
|
||||
_uint Get_Size();
|
||||
#ifdef EDITOR_PROJECT
|
||||
_bool Compare_GroupName(_wstring wstrGroupName);
|
||||
#endif //
|
||||
|
||||
#ifdef _DEBUG
|
||||
void HoverName();
|
||||
|
||||
@@ -69,8 +69,8 @@ class ENGINE_DLL CUnit abstract : public CContainerObject
|
||||
unordered_map<size_t, CState*> m_States = { };
|
||||
size_t m_iStateMask = { 0 };
|
||||
|
||||
_uint m_eSpell = { };
|
||||
_uint m_eHitSpell = {};
|
||||
_int m_eSpell = { };
|
||||
_int m_eHitSpell = {};
|
||||
|
||||
vector<PendingEvent> m_PendingEvents;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user