Merge branch 'Develope' into Camera

This commit is contained in:
kimnuri
2026-01-13 01:11:11 +09:00
161 changed files with 2795 additions and 372 deletions
@@ -164,6 +164,7 @@ call Update_Resources.bat
<ClInclude Include="..\Public\Avadakedavra.h" />
<ClInclude Include="..\Public\AvadakedavraSide.h" />
<ClInclude Include="..\Public\Elf.h" />
<ClInclude Include="..\public\MapElement_Cave.h" />
<ClInclude Include="..\Public\StupefySide.h" />
<ClInclude Include="..\Public\Broom_Circle.h" />
<ClInclude Include="..\Public\Broom_Exit.h" />
@@ -333,6 +334,9 @@ call Update_Resources.bat
<ClInclude Include="..\public\MiniMap_Camera.h" />
<ClInclude Include="..\Public\Goblin_Teleport.h" />
<ClInclude Include="..\Public\TriggerBox.h" />
<ClInclude Include="..\Public\Troll_Rush.h" />
<ClInclude Include="..\Public\Troll_Self_Hit.h" />
<ClInclude Include="..\Public\Troll_Shout.h" />
<ClInclude Include="..\Public\Troll_State_Stun.h" />
<ClInclude Include="..\Public\State_Sustain.h" />
<ClInclude Include="..\Public\WandEnd.h" />
@@ -469,6 +473,7 @@ call Update_Resources.bat
<ClCompile Include="..\Private\Avadakedavra.cpp" />
<ClCompile Include="..\Private\AvadakedavraSide.cpp" />
<ClCompile Include="..\Private\Elf.cpp" />
<ClCompile Include="..\private\MapElement_Cave.cpp" />
<ClCompile Include="..\Private\StupefySide.cpp" />
<ClCompile Include="..\Private\Broom_Circle.cpp" />
<ClCompile Include="..\Private\Broom_Exit.cpp" />
@@ -644,6 +649,9 @@ call Update_Resources.bat
<ClCompile Include="..\Private\StunEffect.cpp" />
<ClCompile Include="..\Private\Goblin_Teleport.cpp" />
<ClCompile Include="..\Private\TriggerBox.cpp" />
<ClCompile Include="..\Private\Troll_Rush.cpp" />
<ClCompile Include="..\Private\Troll_Self_Hit.cpp" />
<ClCompile Include="..\Private\Troll_Shout.cpp" />
<ClCompile Include="..\Private\Troll_State_Stun.cpp" />
<ClCompile Include="..\Private\WandEnd.cpp" />
<ClCompile Include="..\Private\Magic_Icon.cpp" />
@@ -925,6 +925,19 @@
<ClInclude Include="..\Public\TriggerBox.h">
<Filter>02.GameObjects\Environment\Prop\SkyBox\TriggerBox</Filter>
</ClInclude>
<ClInclude Include="..\Public\TriggerBox.h" />
<ClInclude Include="..\Public\Broom_TargetGate2D.h">
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate2D</Filter>
</ClInclude>
<ClInclude Include="..\Public\Troll_Shout.h">
<Filter>02.GameObjects\Effect\MonsterEffect\Troll_Shout</Filter>
</ClInclude>
<ClInclude Include="..\Public\Troll_Rush.h">
<Filter>02.GameObjects\Effect\MonsterEffect\Troll_Rush</Filter>
</ClInclude>
<ClInclude Include="..\Public\Troll_Self_Hit.h">
<Filter>02.GameObjects\Effect\MonsterEffect\Troll_Self_Hit</Filter>
</ClInclude>
<ClInclude Include="..\Public\Duelist_ProtegoHit.h">
<Filter>02.GameObjects\Effect\MonsterEffect\Duelist_Protego\Duelist_ProtegoHit</Filter>
</ClInclude>
@@ -934,6 +947,9 @@
<ClInclude Include="..\Public\Elf.h">
<Filter>02.GameObjects\NPC\Ally\Elf</Filter>
</ClInclude>
<ClInclude Include="..\public\MapElement_Cave.h">
<Filter>02.GameObjects\Environment\03.MapElement\Cave</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Client.ico">
@@ -1928,9 +1944,24 @@
<Filter Include="02.GameObjects\Effect\Effects\Accio\AccioSide">
<UniqueIdentifier>{0e6d6920-c33c-4202-a2a5-3c883e1d4597}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Effect\MonsterEffect\Troll_Rush">
<UniqueIdentifier>{a4b6f0be-8841-4748-8947-e497d755c2d9}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Effect\MonsterEffect\Troll_Shout">
<UniqueIdentifier>{34b736fb-456e-46e3-8038-49cff23b2f95}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Effect\MonsterEffect\Troll_Self_Hit">
<UniqueIdentifier>{c276c050-7000-441e-bb53-30ec3c20c6f5}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\NPC\Ally\Elf">
<UniqueIdentifier>{9263815e-9651-4ba2-813f-c2a7f207522d}</UniqueIdentifier>
</Filter>
<Filter Include="03.InfoInstance\NewFilter1">
<UniqueIdentifier>{44a8eee1-6b7f-4c9a-bf92-21f6b90e84c3}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Environment\03.MapElement\Cave">
<UniqueIdentifier>{5599bbbd-12f7-4b40-8e3d-24f869cce464}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Client.cpp">
@@ -2798,6 +2829,9 @@
<ClCompile Include="..\Private\StupefySide.cpp">
<Filter>02.GameObjects\Effect\Effects\Stupefy\StupefySide</Filter>
</ClCompile>
<ClCompile Include="..\private\MapElement_Cave.cpp">
<Filter>02.GameObjects\Environment\03.MapElement\Cave</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Private\State_Parry.cpp">
@@ -2815,6 +2849,19 @@
<ClCompile Include="..\Private\TriggerBox.cpp">
<Filter>02.GameObjects\Environment\Prop\SkyBox\TriggerBox</Filter>
</ClCompile>
<ClCompile Include="..\Private\TriggerBox.cpp" />
<ClCompile Include="..\Private\Broom_TargetGate2D.cpp">
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate2D</Filter>
</ClCompile>
<ClCompile Include="..\Private\Troll_Rush.cpp">
<Filter>02.GameObjects\Effect\MonsterEffect\Troll_Rush</Filter>
</ClCompile>
<ClCompile Include="..\Private\Troll_Shout.cpp">
<Filter>02.GameObjects\Effect\MonsterEffect\Troll_Shout</Filter>
</ClCompile>
<ClCompile Include="..\Private\Troll_Self_Hit.cpp">
<Filter>02.GameObjects\Effect\MonsterEffect\Troll_Self_Hit</Filter>
</ClCompile>
<ClCompile Include="..\Private\Broom_TargetGate2D.cpp">
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate2D</Filter>
</ClCompile>
@@ -57,6 +57,8 @@ void CCallBack_Troll_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit)
if (pOwner->Get_AnimInfo(STATEANIM::RUSH_LOOP).first == iAnimIndex) {
CFSM* pFSM = pOwner->Get_Component<CFSM>();
pFSM->Change_State(FSMSTATE::STUN);
/**/
}
}
if (vWorldNormal.y > 0) {
@@ -51,9 +51,11 @@ void CCamera_Cinematic::Late_Update(_float fTimeDelta)
}
}
HRESULT CCamera_Cinematic::Render() {
#ifdef _DEBUG
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
RENDER eType = m_pGameInstance->Get_CurrentRenderPass();
if (RENDER::NONBLEND == eType) {
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
@@ -74,7 +76,7 @@ HRESULT CCamera_Cinematic::Render() {
}
}
else if (RENDER::NONLIGHT == eType) {
#ifdef _DEBUG
m_Batch->Begin();
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
@@ -86,12 +88,15 @@ HRESULT CCamera_Cinematic::Render() {
m_pSubShape->Draw(m_pFollowTargetPart->Get_XMWorldMatrix(), ViewMatrix, ProjMatrix, vColor, nullptr, true);
m_Batch->End();
#endif // _DEBUG
}
#endif // _DEBUG
return S_OK;
}
void CCamera_Cinematic::Active_Camera(pair<_float4, _float3>& pairTransitionInfo)
{
if (true == m_bEnable_TransitionLerp) {
@@ -240,7 +245,7 @@ HRESULT CCamera_Cinematic::Ready_Components(void* pArg)
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
#ifdef _DEBUG
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Camera_Model"),
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
return E_FAIL;
@@ -251,7 +256,7 @@ HRESULT CCamera_Cinematic::Ready_Components(void* pArg)
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
return E_FAIL;
}
#endif // _DEBUG
return S_OK;
}
@@ -270,6 +275,7 @@ HRESULT CCamera_Cinematic::Ready_SubPart()
HRESULT CCamera_Cinematic::Bind_ShaderResources()
{
#ifdef _DEBUG
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
return E_FAIL;
}
@@ -282,7 +288,9 @@ HRESULT CCamera_Cinematic::Bind_ShaderResources()
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
#endif // _DEBUG
return S_OK;
}
void CCamera_Cinematic::Lerp_Translation(_float fTimeDelta)
{
@@ -146,7 +146,7 @@ void CDialogue_Panel::Change_Map()
CLayer* pDuelistLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_DUELIST);
if (nullptr != pDuelistLayer) {
CHuman_Duelist* pDuelist = pDuelistLayer->Get_Object<CHuman_Duelist>();
pDuelist->Get_Component<CCharacter_Controller>()->Set_Position(XMVectorSet(1007.23f, 2.f, 1016.f, 1.f));
pDuelist->Get_Component<CCharacter_Controller>()->Set_Position(XMVectorSet(1007.23f, 2.f, 1015.f, 1.f));
pDuelist->Set_Battle(true);
}
@@ -154,9 +154,10 @@ void CDialogue_Panel::Change_Map()
if (nullptr != pLayer) {
CHuman_Duelist* pDuelist = pDuelistLayer->Get_Object<CHuman_Duelist>();
CPlayer* pPlayer = pLayer->Get_Object<CPlayer>();
pPlayer->Get_Component<CCharacter_Controller>()->Set_Position(XMVectorSet(1007.23f, 2.f, 1008.f, 1.f));
_vector vOriginPos = pPlayer->Get_Component<CCharacter_Controller>()->Get_Position();
pPlayer->Get_Component<CCharacter_Controller>()->Set_Position(XMVectorSet(1007.23f, 2.f, 1010.f, 1.f));
pPlayer->Set_Battle(true);
pPlayer->Set_OriginPos(vOriginPos);
_vector vPos = pPlayer->Get_WorldPostion();
_vector vForward = XMVectorSet(0.f, 0.f, 1.f, 0.f);
@@ -180,7 +181,6 @@ void CDialogue_Panel::Change_Map()
}
}
#endif // Bin
}
void CDialogue_Panel::Priority_Update(_float fTimeDelta)
@@ -31,6 +31,10 @@
#include "Troll_Rush_Hit.h"
#include "Troll_Nomal_Smoke.h"
#include "TrollSwing.h"
#include "Troll_Rush.h"
#include "Troll_Shout.h"
#include "Troll_Self_Hit.h"
#include "Goblin_Protego.h"
#include "Goblin_Attack.h"
#include "Mage_Down_Attack.h"
@@ -768,7 +772,36 @@ HRESULT CEffectPool::Ready_MonsterEffect()
return pEffect; }
))) return E_FAIL;
if (FAILED(Create_Effect(SKILL_TYPE::TROLL_SHOUT, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
CTroll_Shout* pEffect = nullptr;
pEffect = m_pGameInstance->Clone_Prototype<CTroll_Shout>(iPrototypeLevel, nullptr);
return pEffect; }
))) return E_FAIL;
if (FAILED(Create_Effect(SKILL_TYPE::TROLL_RUSH, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
CTroll_Rush* pEffect = nullptr;
pEffect = m_pGameInstance->Clone_Prototype<CTroll_Rush>(iPrototypeLevel, nullptr);
return pEffect; }
))) return E_FAIL;
if (FAILED(Create_Effect(SKILL_TYPE::TROLL_SELF_HIT, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
CTroll_Self_Hit* pEffect = nullptr;
pEffect = m_pGameInstance->Clone_Prototype<CTroll_Self_Hit>(iPrototypeLevel, nullptr);
return pEffect; }
))) return E_FAIL;
return S_OK;
}
+3 -1
View File
@@ -393,8 +393,11 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
if (pEffect_Container != nullptr)
{
_uint iSkillType = pEffect_Container->Get_SkillType();
damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType));
switch (iSkillType)
{
case ENUM_CLASS(SKILL_TYPE::DESCENDO):
@@ -440,7 +443,6 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
}
}
m_DamageInfo.fDamage = damagePair.first;
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
if (0 == damagePair.second) {
@@ -406,7 +406,12 @@ void CGoblin_Assassin::OnCollision(CGameObject* pOther, void* pDesc)
if (pEffect_Container != nullptr)
{
_uint iSkillType = pEffect_Container->Get_SkillType();
#ifndef Bin
damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType));
#endif // !Bin
switch (iSkillType)
{
@@ -453,7 +458,7 @@ void CGoblin_Assassin::OnCollision(CGameObject* pOther, void* pDesc)
}
}
#ifndef Bin
m_DamageInfo.fDamage = damagePair.first;
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
if (0 == damagePair.second) {
@@ -462,7 +467,7 @@ void CGoblin_Assassin::OnCollision(CGameObject* pOther, void* pDesc)
m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID);
return;
}
#endif // !Bin
m_pFSM->Change_State(FSMSTATE::HIT);
@@ -68,6 +68,7 @@ HRESULT CHuman_Duelist::Initialize(void* pArg)
_vector vRotQ = XMLoadFloat4(&pDesc->vRotQ);
m_pCharacter_Controller->Set_Position(vPos);
m_pTransformCom->Set_State(STATE::POSITION, vPos);
m_OriginPos = pDesc->vPos;
m_pTransformCom->Rotation(vRotQ);
}
@@ -94,8 +95,7 @@ void CHuman_Duelist::Update(_float fTimeDelta)
Play_Event();
Check_BattleLose();
__super::Update(fTimeDelta);
#ifdef _DEBUG
@@ -110,8 +110,6 @@ void CHuman_Duelist::Update(_float fTimeDelta)
for (_uint i = 0; i < ENUM_CLASS(SKILL::END); i++)
m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta);
}
void CHuman_Duelist::Late_Update(_float fTimeDelta)
@@ -516,6 +514,29 @@ HRESULT CHuman_Duelist::Bind_ShaderParameters(_uint iMeshOrder)
return S_OK;
}
void CHuman_Duelist::Check_BattleLose()
{
if (!m_bBattle)
return;
_float vPosY = XMVectorGetY(m_pCharacter_Controller->Get_Position());
if (m_OriginPos.y > vPosY)
{
if (true == m_pCharacter_Controller->IsOnGround())
{
m_pEffectPool->Use_Skill(SKILL_TYPE::BOX_SPLESH, this);
m_bBattle = false;
CPlayer* pPlayer = dynamic_cast<CPlayer*>(m_pInfoInstance->Get_NearestPlayerAlly(Get_WorldPostion()).first);
if (pPlayer == nullptr)
return;
pPlayer->ExitBattle();
}
}
}
_matrix CHuman_Duelist::Get_WandPos()
{
@@ -35,11 +35,15 @@ void CHuman_Duelist::Behavior_IdleEnter()
HRESULT CHuman_Duelist::Behavior_IdleExitCheck(_float fTimeDelta)
{
if (m_bBattle) {
m_pFSM->Change_State(FSMSTATE::CUTSCENE);
return E_FAIL;
if (false == m_pFSM->IsEnable_Previous(FSMSTATE::COMBAT))
{
if (m_bBattle) {
m_pFSM->Change_State(FSMSTATE::CUTSCENE);
return E_FAIL;
}
}
if (m_fTargetDistance <= 20.f) {
for (_uint i = 0; i < ENUM_CLASS(SKILL::END); i++)
{
@@ -279,11 +283,8 @@ void CHuman_Duelist::Behavior_HitEnter()
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
break;
case ENUM_CLASS(SKILL_TYPE::STUPEFY):
if (m_eHitState != ENUM_CLASS(HIT_STATE::END)) {
return;
}
pairAnimInfo = m_Animation[STATEANIM::DAZED_START];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.5f);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.3f);
Add_Event(pairAnimInfo.first,
[this]() {
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::DAZED_LOOP];
@@ -397,7 +398,7 @@ HRESULT CHuman_Duelist::Behavior_CutSceneExitCheck(_float fTimeDelta)
void CHuman_Duelist::Behavior_CutSceneExit()
{
m_pFSM->Disable_State(FSMSTATE::CUTSCENE);
m_bBattle = false;
//m_bBattle = false;
}
void CHuman_Duelist::Hit_Levioso(_float fTimeDelta)
@@ -172,6 +172,10 @@ HRESULT CInfoInstance::Load_EffectParts(const _char* pFileName, const _char* pEf
{
return m_pMapInfo->Load_EffectParts(pFileName, pEffectrFilePath);
}
HRESULT CInfoInstance::Load_ReparoObjects(const _char* pFileName)
{
return m_pMapInfo->Load_ReparoObjects(pFileName);
}
HRESULT CInfoInstance::Load_DADA_INT()
{
return m_pMapInfo->Load_DADA_INT();
+33
View File
@@ -98,6 +98,13 @@ HRESULT CLand::Initialize(void* pArg)
m_fRaduis = 350.f;
LAND_DESC* pDesc = static_cast<LAND_DESC*>(pArg);
string RigidBodyTag = CMyTools::ToString(pDesc->strModelComTag) + "_RigidBody";
ReadyForPhysX(RigidBodyTag.c_str());
ConvertToPhysX(RigidBodyTag.c_str());
return S_OK;
}
@@ -166,12 +173,15 @@ HRESULT CLand::Bind_ShaderResources()
if (FAILED(m_pDiffuseTextureCom->Bind_ShaderResources(m_pShaderCom, "g_DiffuseTextures", 0, m_pDiffuseTextureCom->Get_Size()))) {
return E_FAIL;
}
if (FAILED(m_pNormalTextureCom->Bind_ShaderResources(m_pShaderCom, "g_NormalTextures", 0, m_pNormalTextureCom->Get_Size()))) {
return E_FAIL;
}
if (FAILED(m_pMROTextureCom->Bind_ShaderResources(m_pShaderCom, "g_SurfaceParamsTextures", 0, m_pMROTextureCom->Get_Size()))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_SRV("g_MaskTexture", m_pMaskTextureCom->Get_SRV(0)))) {
return E_FAIL;
}
@@ -182,6 +192,28 @@ HRESULT CLand::Bind_ShaderResources()
return S_OK;
}
void CLand::ReadyForPhysX(const _char* pName)
{
_uint iLevel = NEXT_LEVEL;
if (FAILED(m_pModelCom->Ready_PhysXMeshes(XMMatrixIdentity(), iLevel, pName))) {
assert(false);
}
}
void CLand::ConvertToPhysX(const _char* pName)
{
_wstring wstrName = CMyTools::ToWstring(pName);
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
Desc.pMeshName = wstrName.c_str();
Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, wstrName, (CComponent**)&m_RigidBody, &Desc))) {
assert(false);
}
}
CLand* CLand::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CLand* pInstance = new CLand(pDevice, pContext);
@@ -217,6 +249,7 @@ void CLand::Free()
SAFE_RELEASE(m_pMaskTextureCom);
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_RigidBody);
SAFE_RELEASE(m_pModelCom);
for (auto& pInstanceProp : m_InstanceProps)
@@ -57,7 +57,7 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
m_isDay = true;
#endif //
#ifdef 진우
m_isDay = false;
m_isDay = true;
#endif //
#ifdef 기무리
m_isDay = true;
@@ -86,13 +86,15 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
map<_string, CLand*> Lands = {};
if (FAILED(Ready_Land(&Lands))) {
return E_FAIL;
}
#ifndef 진우
if (FAILED(Ready_IntstanceProp(&Lands)))
return E_FAIL;
#endif
if (FAILED(Ready_Markers())) {
return E_FAIL;
}
@@ -144,7 +146,6 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
return E_FAIL;
}
if (FAILED(m_pInfoInstance->Late_Initialize()))
return E_FAIL;
@@ -283,6 +284,7 @@ HRESULT CLevel_GamePlay::Ready_Volumetric()
0.f
);
}
else
{
m_pGameInstance->Setting_Volumetirc(
@@ -343,6 +345,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
isReady_Background = true;
isReady_Hogsmeade = true;
isReady_Hogwart = false;
m_pInfoInstance->Load_ReparoObjects("Reparo_Data");
#endif // gimch
#ifdef Bin
isReady_Background = false;
@@ -579,6 +582,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Hogwart()
{
CInfoInstance::GetInstance()->Load_MapObjects("Hogwart_MapContainer_Data", LAYER_HOGWART);
CInfoInstance::GetInstance()->Load_MapObjects("HogwartMap1221", LAYER_HOGWART);
CInfoInstance::GetInstance()->Load_MapObjects("CaveData", LAYER_HOGWART);
CUnified::UNIFIED_DESC Desc = {};
@@ -1000,11 +1004,11 @@ HRESULT CLevel_GamePlay::Ready_Layer_Item(const _wstring& strLayerTag)
HRESULT CLevel_GamePlay::Ready_Layer_ReparoObject(const _wstring& strLayerTag)
{
for (_uint i = 0; i < 1; ++i) {
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CReparoObject>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) {
return E_FAIL;
}
}
//for (_uint i = 0; i < 1; ++i) {
// if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CReparoObject>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) {
// return E_FAIL;
// }
//}
return S_OK;
}
@@ -1117,11 +1121,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_Duelist()
{
CHuman_Duelist::DUELISTDESC DuelistDesc = {};
DuelistDesc.vPos = _float4(1007.f, 6.f, 1016.f, 1.f);
DuelistDesc.vPos = _float4(1007.23f, 1.775f, 1015.f, 1.f);
DuelistDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHuman_Duelist>(g_iStaticLevel, NEXT_LEVEL, LAYER_DUELIST, &DuelistDesc))) {
return E_FAIL;
}
return S_OK;
}
@@ -1137,8 +1142,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Npc()
isRandomPosition = false;
#endif // gimch
#ifdef 진우
isLoad_RandomNPC = true;
isLoad_NPC = true;
isLoad_RandomNPC = false;
isLoad_NPC = false;
#endif //
#ifdef 기무리
isLoad_NPC = false;
@@ -1186,7 +1191,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Npc()
{
if(isRandomPosition)
{
for (_uint i = 0; i < 10; i++)
for (_uint i = 0; i < 12; i++)
{
CRandomNpc::NPCDESC NPCDesc{};
_float X = m_pGameInstance->Real_Random_Float(22.f, 29.f);
+101 -53
View File
@@ -212,7 +212,9 @@
#include "TrollSwing.h"
#include "Troll_Nomal_Smoke.h"
#include "Troll_Rush_Hit.h"
#include "Troll_Rush.h"
#include "Troll_Shout.h"
#include "Troll_Self_Hit.h"
#include "WandEnd.h"
#include "Goblin_Protego.h"
@@ -272,6 +274,7 @@
#include "WorldDecal.h"
#include "PointLight.h"
#include "MapElement_Balloon.h"
#include "MapElement_Cave.h"
#pragma endregion
@@ -1099,6 +1102,10 @@ HRESULT CLoader::Loading_For_GamePlay()
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogwarts/SUB_DADATower/StaticMesh/EXT",
".bin", false
));
jobMapModels.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Overland_Common/Meshes",
".bin", false
));
}
if (true == isLoad_DataClassroom)
@@ -1314,10 +1321,6 @@ HRESULT CLoader::Loading_For_GamePlay()
MODEL::ANIM, "../Bin/Resources/Models/Object/Reparo_Object/VFX_SK_OLI_TrollFight_BlockerA.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerA_Model")
));
jobCharacterModels.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Object/Reparo_Object/VFX_SK_OLI_TrollFight_BlockerA.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerA_Model")
));
jobCharacterModels.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Object/Reparo_Object/VFX_SK_OLI_TrollFight_BlockerB.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerB_Model")
@@ -1386,123 +1389,141 @@ HRESULT CLoader::Loading_For_GamePlay()
/* LAND_MODEL */
{
CRigidBody_Static::RIGIDBODY_STATIC_PROTOTYPEDESC Desc{}; //
{
Desc.eType = ACTOR::TRIANGLEMESH;
Desc.ePxRigidBodyFlags = {};
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
Desc.fContactOffset = 0.001f;
}
/* For.Prototype_Component_South_Hogwart_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_South_Hogwart_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BCLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
CRigidBody_Static* pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_South_Hogwart_Land_LOD1_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_North_Hogwart_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_North_Hogwart_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_AVLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_North_Hogwart_Land_LOD1_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_North_Hogwart2_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_North_Hogwart2_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_AULOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_North_Hogwart2_Land_LOD1_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_West_Hogwart_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_West_Hogwart_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_AZLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_West_Hogwart_Land_LOD1_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_East_Hogwart_Land_LOD1 */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_East_Hogsmeade_Land_LOD1"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_AYLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_East_Hogsmeade_Land_LOD1_RigidBody"), pRigid))) {
return E_FAIL;
}
// -----------------
/* For.Prototype_Component_Land_HN_BA */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BA"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BALOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BA_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_Land_HN_BD */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BD"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BDLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BD_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_Land_HN_BE */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BE"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BELOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BE_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_Land_HN_BF */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BF"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BFLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BF_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_Land_HN_BG */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BG"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BGLOD/SM_LandscapeStreamingProxy_1_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BG_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_Land_HN_BH */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BH"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BHLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BH_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_Land_HN_BI */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BI"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BILOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BI_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_Land_HN_BJ */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BJ"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/HN_BJLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_HN_BJ_RigidBody"), pRigid))) {
return E_FAIL;
}
/* For.Prototype_Component_Land_TU_BB */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_TU_BB"),
CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "../Bin/Resources/Models/MapMesh/Game/Levels/Overland/HOG/TU_BBLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
return E_FAIL;
///* For.Prototype_Component_Land_HN_BA */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BA"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BALOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
// return E_FAIL;
///* For.Prototype_Component_Land_HN_BD */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BD"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BDLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
// return E_FAIL;
///* For.Prototype_Component_Land_HN_BG */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BG"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BGLOD/SM_LandscapeStreamingProxy_1_LOD1.bin"))))
// return E_FAIL;
///* For.Prototype_Component_Land_HN_BH */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BH"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BHLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
// return E_FAIL;
///* For.Prototype_Component_Land_HN_BE */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BE"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BELOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
// return E_FAIL;
///* For.Prototype_Component_Land_HN_BF */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BF"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BFLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
// return E_FAIL;
///* For.Prototype_Component_Land_HN_BI */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BI"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BILOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
// return E_FAIL;
///* For.Prototype_Component_Land_HN_BJ */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_HN_BJ"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/HN_BJLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
// return E_FAIL;
///* For.Prototype_Component_Land_TU_BB */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Land_TU_BB"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ENVIRONMENT, "C:/MeshTable/Game/Levels/Overland/HOG/TU_BBLOD/SM_LandscapeStreamingProxy_0_LOD1.bin"))))
// return E_FAIL;
pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_Land_TU_BB_RigidBody"), pRigid))) {
return E_FAIL;
}
}
#pragma endregion
#pragma region UI
@@ -2628,6 +2649,19 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype<CTroll_Rush_Hit>(g_iStaticLevel, CTroll_Rush_Hit::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CTroll_Rush>(g_iStaticLevel, CTroll_Rush::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CTroll_Shout>(g_iStaticLevel, CTroll_Shout::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CTroll_Self_Hit>(g_iStaticLevel, CTroll_Self_Hit::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Protego>(g_iStaticLevel, CGoblin_Protego::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
@@ -2845,6 +2879,16 @@ HRESULT CLoader::Loading_For_GamePlay()
});
Asset_FileLoad("../Bin/Resources/Models/Effect/Rock", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
return E_FAIL;
return S_OK;
});
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
#pragma region UI
@@ -3690,6 +3734,10 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Lake>(g_iStaticLevel, CMapElement_Lake::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Cave */
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Cave>(g_iStaticLevel, CMapElement_Cave::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Land */
if (FAILED(m_pGameInstance->Add_Prototype<CLand>(g_iStaticLevel, CLand::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
@@ -0,0 +1,267 @@
#include "pch.h"
#include "MapElement_Cave.h"
#include "GameInstance.h"
#include "Layer.h"
#include "TriggerBox.h"
CMapElement_Cave::CMapElement_Cave(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CMapElement{ pDevice, pContext }
{
}
CMapElement_Cave::CMapElement_Cave(const CMapElement_Cave& rhs)
: CMapElement(rhs)
{
}
HRESULT CMapElement_Cave::Initialize_Prototype()
{
return S_OK;
}
HRESULT CMapElement_Cave::Initialize(void* pArg)
{
MAPELEMENT_DESC* pDesc = static_cast<MAPELEMENT_DESC*>(pArg);
m_bVisible = pDesc->bVisible;
m_iMaxLodLevel = pDesc->iMaxLodLevel;
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
{
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
}
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
m_pTransformCom->Set_Scale(pDesc->vScale);
m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
_float fMaxScale = max(max(pDesc->vScale.x, pDesc->vScale.y), pDesc->vScale.z);
m_fRadius = m_pModelComs[0]->Get_Radius() * fMaxScale;
_float3 vOffset = m_pModelComs[0]->Get_RadiusOffset();
XMStoreFloat3(&m_vWorldCenterPosition, XMVector3TransformCoord(XMLoadFloat3(&vOffset), m_pTransformCom->Get_XMWorldMatrix()));
ReadyForPhysX();
ConvertToPhysX();
if (FAILED(Ready_TriggerBox()))
return E_FAIL;
return S_OK;
}
void CMapElement_Cave::Priority_Update(_float fTimeDelta)
{
}
void CMapElement_Cave::Update(_float fTimeDelta)
{
}
void CMapElement_Cave::Late_Update(_float fTimeDelta)
{
if (m_pGameInstance->IsIn_WorldFrustum(XMVectorSetW(XMLoadFloat3(&m_vWorldCenterPosition), 1.f), m_fRadius)) {
if (m_bVisible)
{
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
#ifdef _DEBUG
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, m_pTriggerBox);
#endif // _DEBUG
}
if (SUCCEEDED(m_pTriggerBox->TryScanArea(fTimeDelta)))
{
Enter_Cave();
}
}
}
HRESULT CMapElement_Cave::Render()
{
if (FAILED(Bind_ShaderResources()))
return E_FAIL;
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
{
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
return E_FAIL;
}
if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
return E_FAIL;
}
}
return S_OK;
}
HRESULT CMapElement_Cave::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
{
CModel* pModel = { nullptr };
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, m_ModelPrototypeTags[i],
reinterpret_cast<CComponent**>(&pModel))))
return E_FAIL;
m_pModelComs.push_back(pModel);
}
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
reinterpret_cast<CComponent**>(&m_pShaderCom))))
return E_FAIL;
return S_OK;
}
HRESULT CMapElement_Cave::Bind_ShaderResources()
{
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CMapElement_Cave::Ready_TriggerBox()
{
CTriggerBox::TRIGGERBOX_DESC Desc = {};
XMStoreFloat4(&Desc.vPosition_Radius, m_pTransformCom->Get_State(STATE::POSITION));
Desc.vPosition_Radius.w = 10.f;
m_pTriggerBox = CTriggerBox::Create(m_pDevice, m_pContext, &Desc);
#ifdef _DEBUG
#endif // _DEBUG
return S_OK;
}
void CMapElement_Cave::ReadyForPhysX()
{
if (true == m_bConverted) {
return;
}
m_bConverted = true;
_uint iLevel = NEXT_LEVEL;
CModel* pModel = m_pModelComs[0];
if (FAILED(pModel->Ready_PhysXMeshes(XMMatrixIdentity(), iLevel))) {
assert(false);
}
}
void CMapElement_Cave::ConvertToPhysX()
{
if (true == m_bReadyToCreatePhysX) {
return;
}
m_bReadyToCreatePhysX = true;
CModel* pModel = m_pModelComs[0];
_uint iNumMeshes = pModel->Get_NumMeshes();
for (_uint iIndex = 0; iIndex < iNumMeshes; ++iIndex)
{
_wstring wstrName = CMyTools::ToWstring(pModel->Get_MeshName(iIndex)) + to_wstring(iIndex);
CRigidBody_Static* pRigidBody = { nullptr };
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
Desc.pMeshName = wstrName.c_str();
Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, wstrName, (CComponent**)&pRigidBody, &Desc))) {
assert(false);
}
m_RigidBodies.push_back(pRigidBody);
}
}
void CMapElement_Cave::Enter_Cave()
{
m_pGameInstance->Set_LevelToChange();
}
CMapElement_Cave* CMapElement_Cave::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CMapElement_Cave* pInstance = new CMapElement_Cave(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CMapElement_Cave");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CMapElement_Cave::Clone(void* pArg, CGameObject* pOwner)
{
CMapElement_Cave* pInstance = new CMapElement_Cave(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CMapElement_Cave");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CMapElement_Cave::Free()
{
__super::Free();
SAFE_RELEASE(m_pShaderCom);
for (_uint i = 0; i < m_RigidBodies.size(); ++i) {
SAFE_RELEASE(m_RigidBodies[i]);
} m_RigidBodies.clear();
for (auto& pModel : m_pModelComs)
SAFE_RELEASE(pModel);
}
#ifdef _DEBUG
void CMapElement_Cave::Describe_Entity()
{
}
#endif // _DEBUG
@@ -30,7 +30,6 @@ HRESULT CMapElement_Static::Initialize(void* pArg)
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
{
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
}
if (FAILED(__super::Initialize(pArg)))
@@ -19,6 +19,8 @@
#include "Layer.h"
#include "EffectParts.h"
#include "RandomNpc.h"
#include "MapElement_Cave.h"
#include "ReparoObject.h"
CMapInfo::CMapInfo()
{
@@ -156,6 +158,10 @@ HRESULT CMapInfo::Load_MapObjects(const _char* pFileName, const _wchar* pLayerTa
Desc.bVisible = false;
m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Static>(g_iStaticLevel, NEXT_LEVEL, pLayerTag, &Desc);
}
else if (MAPOBJECT_TYPE::ELEMENT_CAVE == eType)
{
m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Cave>(g_iStaticLevel, NEXT_LEVEL, pLayerTag, &Desc);
}
/*else if (MAPOBJECT_TYPE::ELEMENT_INTERACT == eType)
m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Interactable>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interact"), &Desc);*/
}
@@ -830,6 +836,48 @@ HRESULT CMapInfo::Load_EffectParts(const _char* pFileName, const _char* pEffectr
return S_OK;
}
HRESULT CMapInfo::Load_ReparoObjects(const _char* pFileName)
{
tinyxml2::XMLDocument xmlDoc;
string strPath = "../Bin/Resources/Data/Map/Reparo/" + string(pFileName) + ".xml";
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
return E_FAIL;
tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Reparo");
if (nullptr == root)
{
MSG_BOX("Failed to Find root");
return S_OK;
}
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
{
CReparoObject::REPARO_OBJECT_DESC Desc = {};
Object->QueryUnsignedAttribute("Type", &Desc.iModelID);
Object->QueryFloatAttribute("Radius", &Desc.fRadius);
/* Transform */
auto* Rotation = Object->FirstChildElement("Rotation");
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
auto* Position = Object->FirstChildElement("Position");
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CReparoObject>(g_iStaticLevel, NEXT_LEVEL, LAYER_REPARO, &Desc)))
return E_FAIL;
}
return S_OK;
}
HRESULT CMapInfo::Load_DADA_INT()
{
if (FAILED(Load_MapObjects("DATA_INT_Data", LAYER_DADA_INT)))
@@ -147,9 +147,15 @@ HRESULT CMonsterInfo::Refresh_LockOnMonsters()
{
// (카메라의 룩)과 (카메라 -> 몬스터 방향 벡터)를 내적해서 가장 큰 크기가 나온 몬스타가 락온 대상
CMonster* pMonster = (*iter);
if (pMonster->isDead()) {
continue;
CStat*pStat = pMonster->Get_Component<CStat>();
if (pStat != nullptr) {
if (pMonster->Get_Hp().x <= 0) {
continue;
}
}
vMonsterPos = pMonster->Get_LockOnPos();
vToMonsterDir = vMonsterPos - vCameraPos;
if (40.f <= XMVectorGetX(XMVector4Length(vToMonsterDir))) {
+17 -9
View File
@@ -127,19 +127,27 @@ void CNomalJap::Late_Update(_float fTimeDelta)
if (false == m_bVisible) {
return;
}
//if (false == m_bHit) {
// _vector vStartPos = XMLoadFloat4(&m_vStartPos);
// _vector vEndPos = m_pProjectile->Get_WorldPostion();
// if (false == m_bHit) {
// _vector vStartPos = XMLoadFloat4(&m_vStartPos);
// _vector vEndPos = XMLoadFloat4(&m_vEndPos);
// if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
// {
// ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
// OnCollision(this, &CollisionInfo);
// }
// }
//}
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = m_pProjectile->Get_WorldPostion();
ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f);
if (false == m_bHit) {
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
if (false == XMVector3NearEqual(vEndPos, XMVectorZero(), XMVectorReplicate(FLT_EPSILON5)))
{
ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.02f);
OnCollision(this, &CollisionInfo);
}
}
OnCollision(this, &CollisionInfo);
}
__super::Late_Update(fTimeDelta);
+25
View File
@@ -21,6 +21,7 @@
#include "Effect_Container.h"
#include "ThestralCarriage.h"
#include "MapElement_Chest.h"
#include "ReparoObject.h"
CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CUnit(pDevice, pContext)
@@ -395,6 +396,12 @@ void CPlayer::Set_Interaction(_bool bInteraction)
m_bCurrentInteraction = bInteraction;
}
void CPlayer::ExitBattle()
{
m_bDuel_ZOnlyMove = false;
m_pCharacter_Controller->Set_Position(XMLoadFloat4(&m_OriginPos));
}
HRESULT CPlayer::Render_Shadow(SHADOW eType)
{
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
@@ -881,6 +888,24 @@ void CPlayer::Find_HiddenObjects()
}
void CPlayer::Check_Reparoobejcts()
{
CLayer* pLayer = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_REPARO);
if (nullptr == pLayer)
return;
const list<class CGameObject*>* pReparoObjects = pLayer->Get_Objects();
for (auto& pObject : *pReparoObjects)
{
CReparoObject* pReparoObject = dynamic_cast<CReparoObject*>(pObject);
if (nullptr != pReparoObject)
if (pReparoObject->IsRepairable(false))
return;
}
}
void CPlayer::Update_CameraCoordinateSystem(_float fTimeDelta)
{
_vector xmvCameraLook = XMVector3Normalize(XMVectorSetY(m_pGameInstance->Get_CameraLook(), 0.f));
@@ -1469,8 +1469,9 @@ void CPlayer::Behavior_SpellEnter()
0.01f);
}
Add_SpellEvent(pairAnimInfo.first, fRatio);
if (m_eSpell != ENUM_CLASS(SKILL_TYPE::LUMOS) &&
m_eSpell != ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA))
if(ENUM_CLASS(SKILL_TYPE::REPARO) == m_eSpell)
Check_Reparoobejcts();
if (!m_bStartSpellAnim)
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, fAnimSpeed);
}
@@ -1478,8 +1479,7 @@ void CPlayer::Behavior_SpellEnter()
fRatio = 0.2f;
pairAnimInfo = m_Animation[STATEANIM::SPELL];
Add_SpellEvent(pairAnimInfo.first, fRatio);
if (m_eSpell != ENUM_CLASS(SKILL_TYPE::LUMOS) &&
m_eSpell !=ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA))
if (!m_bStartSpellAnim)
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
}
@@ -1501,7 +1501,7 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
_uint iIndex = m_pModelCom->Get_AnimIndex();
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
if (SUCCEEDED(InputSpell()) && !m_bSpellHit)
if (SUCCEEDED(InputSpell()) && !m_bSpellHit && iIndex != m_Animation[STATEANIM::AVADA_KEDAVRA].first)
{
_uint iCurr = m_pModelCom->Get_AnimIndex();
_uint iStart = m_Animation[STATEANIM::SPELL].first;
@@ -1621,7 +1621,7 @@ void CPlayer::Behavior_SpellExit()
Reset_Event();
m_bLookAt = false;
m_bSpellHit = false;
m_bStartSpellAnim = false;
}
void CPlayer::Behavior_AncientSpellEnter()
@@ -2743,7 +2743,7 @@ void CPlayer::Attach_Broom()
_matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
m_OffsetPos = { 0.f,0.9f,0.f };
m_OffsetPos = { 0.f,1.f,0.f };
_matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
m_OffsetPos.y, m_OffsetPos.z);
@@ -2881,6 +2881,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
switch (m_eSpell)
{
case ENUM_CLASS(SKILL_TYPE::BOMBARDA):
m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this); }, /* 임시로 바꿔놓음 */
fRatio);
@@ -2892,6 +2893,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
break;
case ENUM_CLASS(SKILL_TYPE::DESCENDO):
m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, Get_PartObject<CWand>()); },
fRatio);
@@ -2903,6 +2905,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
break;
case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this); },
fRatio);
@@ -2914,7 +2917,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
break;
case ENUM_CLASS(SKILL_TYPE::ACCIO):
m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::ACCIO, this); },
fRatio);
@@ -2927,6 +2930,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
break;
case ENUM_CLASS(SKILL_TYPE::TRANSFORMATION):
m_bStartSpellAnim = false;
Add_Event(AnimIndex,
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::TRANSFORMATION, this); },
fRatio);
@@ -2937,19 +2941,8 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
Info.pText = TEXT("베라베르토!");
m_pInfoInstance->Event_CallBack(TEXT("Dialogue"), &Info);
break;
case ENUM_CLASS(SKILL_TYPE::DIFFINDO):
pairAnimInfo = m_Animation[STATEANIM::DIFFINDO];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
Info.pText = TEXT("디핀도!");
m_pInfoInstance->Event_CallBack(TEXT("Dialogue"), &Info);
break;
case ENUM_CLASS(SKILL_TYPE::DISILLUSIONMENT):
pairAnimInfo = m_Animation[STATEANIM::DISILLUSION_ENTER];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
break;
case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA):
m_bStartSpellAnim = true;
m_pInfoInstance->Set_SearchLockOnFlag(false);
pairAnimInfo = m_Animation[STATEANIM::AVADA_KEDAVRA];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, false,1.f,true);
@@ -2971,6 +2964,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
break;
case ENUM_CLASS(SKILL_TYPE::REPARO):
{
m_bStartSpellAnim = true;
pairAnimInfo = m_Animation[STATEANIM::REPARO_START];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
@@ -2988,6 +2982,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
}
break;
case ENUM_CLASS(SKILL_TYPE::LUMOS):
m_bStartSpellAnim = true;
if (m_pModelCom->Get_SecondAnimIndex() != m_Animation[STATEANIM::LUMOS].first)
{
if (SUCCEEDED(InputMove()))
@@ -3034,6 +3029,7 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio)
}
break;
default:
m_bStartSpellAnim = true;
pairAnimInfo = m_Animation[STATEANIM::SPELL_FAIL];
Add_Event(AnimIndex,
[this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::WAND_END, Get_PartObject<CWand>()); },
+73 -28
View File
@@ -37,15 +37,20 @@ HRESULT CRandomNpc::Initialize(void* pArg)
return E_FAIL;
}
Load_AnimXML(("../Bin/Resources/Data/AnimList/RandomNpc.xml"));
_vector vPos = XMLoadFloat4(&pDesc->vPos);
m_pTransformCom->Set_State(STATE::POSITION, vPos);
m_pCharacter_Controller->Set_Position(vPos);
m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotQ.x), XMConvertToRadians(pDesc->vRotQ.y), XMConvertToRadians(pDesc->vRotQ.z));
m_pModelCom->Set_AnimationIndex(1, true);
_int iRandom = m_pGameInstance->Real_Random_Int(0, 12);
m_pModelCom->Set_AnimationIndex(m_Anims[iRandom], false,1.f,false,1.f,false);
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
m_bNpc = true;
return S_OK;
}
@@ -67,8 +72,18 @@ void CRandomNpc::Update(_float fTimeDelta)
if (!m_pGameInstance->IsIn_WorldFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius())) {
return;
}
BattleObserve_Anim();
if (m_pModelCom->IsFinishedAnim())
{
if (false == m_bBattle)
{
_int iRandom = m_pGameInstance->Real_Random_Int(0, 12);
m_pModelCom->Set_AnimationIndex(m_Anims[iRandom], false, 1.f, false, 1.f, false);
}
}
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
__super::Update(fTimeDelta);
#ifdef _DEBUG
@@ -91,28 +106,6 @@ void CRandomNpc::Update(_float fTimeDelta)
SAFE_RELEASE(m_pTarget);
m_fTargetDistance = { FLT_MAX };
}
/*if (m_fTargetDistance <= 5.f && m_bInteract == false)
{
m_pInfoInstance->Event_CallBack(TEXT("NPCDialogue"), m_pNpcStat);
m_bInteract = true;
}
if (m_bInteract != m_bPreviousInteract)
{
m_bPreviousInteract = m_bInteract;
m_fInteractTime = 0.f;
}
else
{
m_fInteractTime += fTimeDelta;
}
if (m_fInteractTime >= 5.f)
{
m_bInteract = false;
m_fInteractTime = 0.f;
}*/
}
void CRandomNpc::Late_Update(_float fTimeDelta)
@@ -390,6 +383,20 @@ HRESULT CRandomNpc::Ready_Components(void* pArg)
}
m_bBattleObserve_Npc = true;
break;
case 10:
m_strModelPrototypeTag = TEXT("Prototype_Component_VictorRookWood_Model");
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("VICTORROCKWOOD"), (CComponent**)&m_pNpcStat))) {
return E_FAIL;
}
m_bBroomRacer = true;
break;
case 11:
m_strModelPrototypeTag = TEXT("Prototype_Component_ChiyoKogawa_Model");
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("CHIYOKOGAWA"), (CComponent**)&m_pNpcStat))) {
return E_FAIL;
}
m_bBroomRacer = true;
break;
}
/* Com_Model */
@@ -444,15 +451,15 @@ void CRandomNpc::BattleObserve_Anim()
_float fRandX = 0.f;
if (iRand == 0)
{
fRandX = m_pGameInstance->Real_Random_Float(1002.f, 1004.f);
fRandX = m_pGameInstance->Real_Random_Float(1003.f, 1005.f);
}
else {
fRandX = m_pGameInstance->Real_Random_Float(1010.f, 1012.f);
fRandX = m_pGameInstance->Real_Random_Float(1009.f, 1011.f);
}
_float fRandY = m_pGameInstance->Real_Random_Float(1008.f, 1016.f);
_float fRandZ = m_pGameInstance->Real_Random_Float(1008.f, 1016.f);
m_pCharacter_Controller->Set_Position(XMVectorSet(fRandX, 2.f, fRandY, 1.f));
m_pCharacter_Controller->Set_Position(XMVectorSet(fRandX, 2.f, fRandZ, 1.f));
_vector vPos = Get_WorldPostion();
_vector vForward = XMVectorZero();
@@ -463,6 +470,8 @@ void CRandomNpc::BattleObserve_Anim()
vForward = XMVectorSet(-1.f, 0.f, 0.f, 0.f);
}
_int iRandIndex = m_pGameInstance->Real_Random_Int(14, 21);
m_pModelCom->Set_AnimationIndex(iRandIndex, false, 1.f, false, 1.f, false);
m_pTransformCom->LookAt(vPos + vForward);
@@ -474,11 +483,47 @@ void CRandomNpc::BattleObserve_Anim()
if (m_pModelCom->IsFinishedAnim())
{
_int iRand = m_pGameInstance->Real_Random_Int(14, 21);
m_pModelCom->Set_AnimationIndex(iRand, false,1.f,false,1.f,false);
m_pModelCom->Set_AnimationIndex(iRand, false, 1.f, false, 1.f, false);
}
}
}
void CRandomNpc::Load_AnimXML(const _char* pFilePath)
{
tinyxml2::XMLDocument doc;
if (doc.LoadFile(pFilePath) != tinyxml2::XML_SUCCESS)
return;
tinyxml2::XMLElement* pRoot = doc.FirstChildElement("NPCAnimations");
const char* pModelType =
(m_bBroomRacer == true) ? "RACING" : "DEFAULT";
for (tinyxml2::XMLElement* pNPC = pRoot->FirstChildElement("NPC");
pNPC;
pNPC = pNPC->NextSiblingElement("NPC"))
{
if (strcmp(pNPC->Attribute("Model"), pModelType) != 0)
continue;
for (tinyxml2::XMLElement* pAnim = pNPC->FirstChildElement("Anim");
pAnim;
pAnim = pAnim->NextSiblingElement("Anim"))
{
string animName = pAnim->Attribute("Name");
for (tinyxml2::XMLElement* pIndex = pAnim->FirstChildElement("Index");
pIndex;
pIndex = pIndex->NextSiblingElement("Index"))
{
m_Anims.push_back(pIndex->IntText());
}
}
break;
}
}
CRandomNpc* CRandomNpc::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CRandomNpc* pInstance = new CRandomNpc(pDevice, pContext);
+96 -11
View File
@@ -28,16 +28,20 @@ HRESULT CReparoObject::Initialize(void* pArg)
return E_FAIL;
}
if (FAILED(Ready_Components())) {
return E_FAIL;
}
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
m_pModelCom->Set_AnimationIndex(0);
REPARO_OBJECT_DESC* pDesc = static_cast<REPARO_OBJECT_DESC*>(pArg);
m_iModelID = pDesc->iModelID;
m_fRadius = pDesc->fRadius;
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
// 되돌리기 전 Before
m_ePreState = m_eCurState = REPARO_OBJECT_STATE::SLEEP;
m_pModelCom->Set_AnimationIndex(2);
m_pInfoInstance->Deregist_PlayerAlly(this);
return S_OK;
}
@@ -51,20 +55,41 @@ void CReparoObject::Update(_float fTimeDelta)
{
__super::Update(fTimeDelta);
Change_State();
switch (m_eCurState)
{
case Client::CReparoObject::REPARO_OBJECT_STATE::SLEEP:
break;
case Client::CReparoObject::REPARO_OBJECT_STATE::BEFORE:
break;
case Client::CReparoObject::REPARO_OBJECT_STATE::PLAYANIM:
if (true == m_pModelCom->IsFinishedAnim())
m_eCurState = REPARO_OBJECT_STATE::AFTER;
break;
case Client::CReparoObject::REPARO_OBJECT_STATE::AFTER:
break;
default:
break;
}
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
}
void CReparoObject::Late_Update(_float fTimeDelta)
{
__super::Late_Update(fTimeDelta);
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
if(m_pGameInstance->IsIn_WorldFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_fRadius))
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
}
@@ -118,6 +143,25 @@ HRESULT CReparoObject::Render()
return S_OK;
}
_bool CReparoObject::IsRepairable(_bool isAwake)
{
if (isAwake && REPARO_OBJECT_STATE::SLEEP == m_eCurState)
{
m_eCurState = REPARO_OBJECT_STATE::BEFORE;
return false;
}
LOCKON_INFO info = {};
m_pInfoInstance->Get_LockOnInfo(info);
if (info.pUnit == this && REPARO_OBJECT_STATE::BEFORE == m_eCurState)
{
m_eCurState = REPARO_OBJECT_STATE::PLAYANIM;
return true;
}
return false;
}
HRESULT CReparoObject::Render_OutLine()
{
m_bDrawOutLine = false;
@@ -186,6 +230,36 @@ HRESULT CReparoObject::Render_OutLine()
return S_OK;
}
void CReparoObject::Change_State()
{
if (m_eCurState != m_ePreState)
{
switch (m_eCurState)
{
case Client::CReparoObject::REPARO_OBJECT_STATE::SLEEP:
break;
case Client::CReparoObject::REPARO_OBJECT_STATE::BEFORE:
m_pInfoInstance->Regist_PlayerAlly(this);
break;
case Client::CReparoObject::REPARO_OBJECT_STATE::PLAYANIM:
m_pModelCom->Set_AnimationIndex(0, false);
break;
case Client::CReparoObject::REPARO_OBJECT_STATE::AFTER:
m_pModelCom->Set_AnimationIndex(1);
m_pInfoInstance->Deregist_PlayerAlly(this);
break;
case Client::CReparoObject::REPARO_OBJECT_STATE::END:
default:
break;
}
m_ePreState = m_eCurState;
}
}
HRESULT CReparoObject::Ready_Components()
{
CTransform::TRANSFORM_DESC Desc = {};
@@ -198,10 +272,21 @@ HRESULT CReparoObject::Ready_Components()
return E_FAIL;
}
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerA_Model"),
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
return E_FAIL;
if(0 == m_iModelID)
{
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerA_Model"),
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
return E_FAIL;
}
}
else
{
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VFX_SK_OLI_TrollFight_BlockerB_Model"),
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
return E_FAIL;
}
}
/* Com_Shader */
+11 -2
View File
@@ -581,6 +581,14 @@ HRESULT CTroll::Ready_Parts()
m_pLeft_Smoke->FollowParents(m_pModelCom->Get_BoneMatrixPtr("LeftArm"));
if (FAILED(Add_PartObject<CEffectParts>("Troll_Dead_Smoke", g_iStaticLevel, &m_pDead_Smoke, &PartsDesc)))
{
return E_FAIL;
}
m_pDead_Smoke->Load("../Bin/Resources/Data/Effect/Troll/TrollDead/TrollDead", static_cast<LEVEL>(g_iStaticLevel));
if (FAILED(Add_PartObject<CTrailObject>("Left_Trail", g_iStaticLevel, &m_pLeftTrail, &PartsDesc))) {
return E_FAIL;
}
@@ -691,12 +699,15 @@ void CTroll::Free()
SAFE_RELEASE(m_pLeftTrail);
SAFE_RELEASE(m_pRightTrail);
SAFE_RELEASE(m_pWeaponTrail);
SAFE_RELEASE(m_pRushEffect);
SAFE_RELEASE(m_pDead_Smoke);
}
#ifdef _DEBUG
void CTroll::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
if (GUI::CollapsingHeader("Troll")) {
__super::Describe_Entity();
@@ -714,8 +725,6 @@ void CTroll::Describe_Entity()
}
}
m_pTransformCom->Describe_Entity();
}
GUI::End();
+12 -21
View File
@@ -83,19 +83,29 @@ HRESULT CTrollSwing::Pre_Setting(CGameObject* pObject, void* pArg)
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
return E_FAIL;
_vector vPos = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::POSITION);
vPos += m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK) * 2.f;
vPos += m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK) * 4.f;
CEffectParts* pRockPT = Get_PartObject<CEffectParts>("Rock_PT_25");
CEffectParts* pRock_PT_Brown = Get_PartObject<CEffectParts>("Rock_PT_Brown");
CEffectParts* pRock_PT_Large = Get_PartObject<CEffectParts>("Rock_PT_Large");
CEffectParts* pCrack_Decal = Get_PartObject<CEffectParts>("Crack_Decal");
CEffectParts* pSmoke = Get_PartObject<CEffectParts>("Smoke");
pRockPT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.5f, 0.f, 0.f));
pSmoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.2f, 0.f, 0.f));
pRock_PT_Large->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.5f, 0.f, 0.f));
pSmoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 1.5f, 0.f, 0.f));
pCrack_Decal->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos + XMVectorSet(0.f, 0.2f, 0.f, 0.f));
pRockPT->Set_Visible(true);
pRock_PT_Large->Set_Visible(true);
pSmoke->Set_Visible(true);
//pRock_PT_Brown->Set_Visible(true);
pCrack_Decal->Set_Visible(true);
CPlayer* pPlayer = static_cast<CPlayer*>(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first);
@@ -155,25 +165,6 @@ CGameObject* CTrollSwing::Clone(void* pArg, CGameObject* pOwner)
void CTrollSwing::OnCollision(CGameObject* pOther, void* pDesc)
{
_int iIndex = CollisionCheck();
if (iIndex < 0)
return;
if (m_isCollisionEnter == true)
return;
m_isCollisionEnter = true;
_vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f);
for (auto& pPair : m_PartObjects)
{
pPair.second->Set_Visible(true);
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
}
}
+12 -1
View File
@@ -3,6 +3,8 @@
#include "GameInstance.h"
#include "Troll.h"
#include "EffectPool.h"
#include "Layer.h"
CTroll_Rock::CTroll_Rock(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CPartObject(pDevice, pContext)
@@ -33,11 +35,17 @@ HRESULT CTroll_Rock::Initialize(void* pArg)
return E_FAIL;
}
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
SAFE_ADDREF(m_pEffectPool);
return S_OK;
}
void CTroll_Rock::Priority_Update(_float fTimeDelta)
{
XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION));
m_pModelCom->Combined_BoneMatrix();
if (m_bAttach)
@@ -152,6 +160,9 @@ void CTroll_Rock::RockHit()
break;
}
m_bVisible = false;
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_NOMAL_SMOKE, m_pOwner , &tagCollInfo.vWorldPos);
pUserData->pOwner->OnCollision(this, &tagCollInfo);
}
break;
@@ -287,7 +298,7 @@ void CTroll_Rock::Free()
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pModelCom);
SAFE_RELEASE(m_pEffectPool);
}
#ifdef _DEBUG
@@ -0,0 +1,190 @@
#include "pch.h"
#include "Troll_Rush.h"
#include "GameInstance.h"
#include "EffectParts.h"
#include "Wand.h"
#include "Player.h"
CTroll_Rush::CTroll_Rush(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CEffect_Container{ pDevice, pContext }
{
}
CTroll_Rush::CTroll_Rush(const CTroll_Rush& rhs)
: CEffect_Container(rhs)
{
}
HRESULT CTroll_Rush::Initialize_Prototype()
{
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollRushBlur")))
return E_FAIL;
return S_OK;
}
HRESULT CTroll_Rush::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
if (FAILED(Create_Effect()))
return E_FAIL;
m_wstrEffectName = L"TrollRushBlur";
m_pRush_Blur = Get_PartObject<CEffectParts>("Rush_Blur");
SAFE_ADDREF(m_pRush_Blur);
m_fDuration = 2.5f;
return S_OK;
}
void CTroll_Rush::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
}
void CTroll_Rush::Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Update(fTimeDelta);
Update_Event(fTimeDelta);
CCharacter_Controller* pCCT = m_pOwner->Get_Component<CCharacter_Controller>();
_vector vPos = pCCT->Get_Position();
vPos += m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK) * 2.f;
m_pRush_Blur->Set_Visible(true);
_vector vRight = XMVector3Normalize(m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
_vector vLook = XMVector3Normalize(XMVector3Cross(vRight , XMVectorSet(0.f, 1.f, 0.f, 0.f)));
_vector vUp = XMVector3Normalize(XMVector3Cross(vLook ,vRight));
_matrix PJ_WorldMat = { vRight , vUp ,vLook , vPos };
m_pRush_Blur->Get_Component<CTransform>()->Set_WorldMatrix(PJ_WorldMat);
}
void CTroll_Rush::Late_Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Late_Update(fTimeDelta);
}
HRESULT CTroll_Rush::Pre_Setting(CGameObject* pObject, void* pArg)
{
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
return E_FAIL;
m_pRush_Blur->Get_Component<CInstance_Model>()->Set_Loop(true);
CCharacter_Controller* pCCT = m_pOwner->Get_Component<CCharacter_Controller>();
_vector vPos = pCCT->Get_Position();
vPos += m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
m_pRush_Blur->Set_Visible(true);
_vector vRight = XMVector3Normalize( m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
_vector vLook = XMVector3Normalize(XMVector3Cross(XMVectorSet(0.f, 1.f, 0.f, 0.f), vRight));
_vector vUp = XMVector3Normalize(XMVector3Cross(vRight, vLook));
_matrix PJ_WorldMat = { vRight , vUp ,vLook , vPos };
m_pRush_Blur->Get_Component<CTransform>()->Set_WorldMatrix(PJ_WorldMat);
return S_OK;
}
HRESULT CTroll_Rush::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CTroll_Rush::Ready_Child()
{
return S_OK;
}
CTroll_Rush* CTroll_Rush::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CTroll_Rush* pInstance = new CTroll_Rush(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CTroll_Rush");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CTroll_Rush::Clone(void* pArg, CGameObject* pOwner)
{
CTroll_Rush* pInstance = new CTroll_Rush(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CTroll_Rush");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CTroll_Rush::OnCollision(CGameObject* pOther, void* pDesc)
{
}
void CTroll_Rush::Free()
{
__super::Free();
SAFE_RELEASE(m_pRush_Blur);
}
#ifdef _DEBUG
void CTroll_Rush::Describe_Entity()
{
}
#endif
HRESULT CTroll_Rush::Bind_ShaderResources()
{
return S_OK;
}
@@ -0,0 +1,185 @@
#include "pch.h"
#include "Troll_Self_Hit.h"
#include "GameInstance.h"
#include "EffectParts.h"
#include "Wand.h"
#include "Player.h"
#include "InfoInstance.h"
CTroll_Self_Hit::CTroll_Self_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CEffect_Container{ pDevice, pContext }
{
}
CTroll_Self_Hit::CTroll_Self_Hit(const CTroll_Self_Hit& rhs)
: CEffect_Container(rhs),
m_pInfoInstance(CInfoInstance::GetInstance())
{
SAFE_ADDREF(m_pInfoInstance);
}
HRESULT CTroll_Self_Hit::Initialize_Prototype()
{
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollSelfHit")))
return E_FAIL;
return S_OK;
}
HRESULT CTroll_Self_Hit::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
if (FAILED(Create_Effect()))
return E_FAIL;
m_wstrEffectName = L"TrollSelfHit";
m_fDuration = 3.5f;
return S_OK;
}
void CTroll_Self_Hit::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
}
void CTroll_Self_Hit::Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Update(fTimeDelta);
Update_Event(fTimeDelta);
}
void CTroll_Self_Hit::Late_Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Late_Update(fTimeDelta);
}
HRESULT CTroll_Self_Hit::Pre_Setting(CGameObject* pObject, void* pArg)
{
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
return E_FAIL;
_vector vPos = m_pOwner->Get_Component<CCharacter_Controller>()->Get_HeadPosition();
CEffectParts* pHit0 = Get_PartObject<CEffectParts>("Hit0");
CEffectParts* pHit1 = Get_PartObject<CEffectParts>("Hit1");
pHit0->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
pHit1->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
pHit0->Set_Visible(true);
pHit1->Set_Visible(true);
return S_OK;
}
HRESULT CTroll_Self_Hit::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CTroll_Self_Hit::Ready_Child()
{
return S_OK;
}
CTroll_Self_Hit* CTroll_Self_Hit::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CTroll_Self_Hit* pInstance = new CTroll_Self_Hit(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CTroll_Self_Hit");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CTroll_Self_Hit::Clone(void* pArg, CGameObject* pOwner)
{
CTroll_Self_Hit* pInstance = new CTroll_Self_Hit(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CTroll_Self_Hit");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CTroll_Self_Hit::OnCollision(CGameObject* pOther, void* pDesc)
{
_int iIndex = CollisionCheck();
if (iIndex < 0)
return;
if (m_isCollisionEnter == true)
return;
m_isCollisionEnter = true;
_vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f);
for (auto& pPair : m_PartObjects)
{
pPair.second->Set_Visible(true);
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
}
}
void CTroll_Self_Hit::Free()
{
__super::Free();
SAFE_RELEASE(m_pInfoInstance);
}
#ifdef _DEBUG
void CTroll_Self_Hit::Describe_Entity()
{
}
#endif
HRESULT CTroll_Self_Hit::Bind_ShaderResources()
{
return S_OK;
}
@@ -0,0 +1,191 @@
#include "pch.h"
#include "Troll_Shout.h"
#include "GameInstance.h"
#include "EffectParts.h"
#include "Wand.h"
#include "Player.h"
CTroll_Shout::CTroll_Shout(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CEffect_Container{ pDevice, pContext }
{
}
CTroll_Shout::CTroll_Shout(const CTroll_Shout& rhs)
: CEffect_Container(rhs)
{
}
HRESULT CTroll_Shout::Initialize_Prototype()
{
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/TrollShout")))
return E_FAIL;
return S_OK;
}
HRESULT CTroll_Shout::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
if (FAILED(Create_Effect()))
return E_FAIL;
m_wstrEffectName = L"TrollShout";
m_fDuration = 3.f;
return S_OK;
}
void CTroll_Shout::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
}
void CTroll_Shout::Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Update(fTimeDelta);
Update_Event(fTimeDelta);
}
void CTroll_Shout::Late_Update(_float fTimeDelta)
{
if (m_bVisible == false)
return;
__super::Late_Update(fTimeDelta);
}
HRESULT CTroll_Shout::Pre_Setting(CGameObject* pObject, void* pArg)
{
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
return E_FAIL;
CCharacter_Controller* pCCT = m_pOwner->Get_Component<CCharacter_Controller>();
_vector vPos = XMLoadFloat4(static_cast<_float4*>(pArg));
vPos += m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK) * 2.f;
_vector vFootPos = {};
if (pCCT != nullptr)
{
vFootPos = pCCT->Get_FootPosition();
CEffectParts* pShout_Blur = Get_PartObject<CEffectParts>("Shout_Blur");
CEffectParts* pSmoke = Get_PartObject<CEffectParts>("Shout_Smoke");
pShout_Blur->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
pShout_Blur->Set_Visible(true);
pSmoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, vFootPos);
pSmoke->Set_Visible(true);
}
return S_OK;
}
HRESULT CTroll_Shout::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CTroll_Shout::Ready_Child()
{
return S_OK;
}
CTroll_Shout* CTroll_Shout::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CTroll_Shout* pInstance = new CTroll_Shout(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CTroll_Shout");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CTroll_Shout::Clone(void* pArg, CGameObject* pOwner)
{
CTroll_Shout* pInstance = new CTroll_Shout(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CTroll_Shout");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CTroll_Shout::OnCollision(CGameObject* pOther, void* pDesc)
{
_int iIndex = CollisionCheck();
if (iIndex < 0)
return;
if (m_isCollisionEnter == true)
return;
m_isCollisionEnter = true;
_vector vPos = XMVectorSet(m_Hitbuffer.touches[iIndex].position.x, m_Hitbuffer.touches[iIndex].position.y, m_Hitbuffer.touches[iIndex].position.z, 1.f);
for (auto& pPair : m_PartObjects)
{
pPair.second->Set_Visible(true);
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
}
}
void CTroll_Shout::Free()
{
__super::Free();
}
#ifdef _DEBUG
void CTroll_Shout::Describe_Entity()
{
}
#endif
HRESULT CTroll_Shout::Bind_ShaderResources()
{
return S_OK;
}
+110 -19
View File
@@ -8,6 +8,10 @@
#include "Layer.h"
#include "EffectPool.h"
#include "TrailObject.h"
#include "Troll_Weapon.h"
#include "Effect_Container.h"
#include "EffectParts.h"
#include "ReparoObject.h"
#pragma region STATE
#include "State_Idle.h"
@@ -87,6 +91,17 @@ void CTroll::Behavior_IdleBreakEnter()
break;
case 1:// 방망이
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK2];
Add_Event(pairAnimInfo.first, [this]() {
_matrix WeaponMat = XMLoadFloat4x4(m_pWeapon_BoneMat) * Get_PartObject<CTroll_Weapon>()->Get_Component<CTransform>()->Get_XMWorldMatrix();;
_float4 vPosition = {};
XMStoreFloat4(&vPosition, WeaponMat.r[3]);
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_NOMAL_SMOKE, this, &vPosition);
}, 0.7f);
break;
case 2: // 발구르기
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK3];
@@ -104,9 +119,22 @@ void CTroll::Behavior_IdleBreakEnter()
break;
case 3: //소리지르기
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK4];
Add_Event(pairAnimInfo.first,
[this]() {CameraShake(5.f, 1.f, 2.f, 0.5f);},
0.3f);
Add_Event(pairAnimInfo.first, [this]() {
_matrix HandMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("mouth_bag")) * m_pTransformCom->Get_XMWorldMatrix();
_float4 vPosition = {};
XMStoreFloat4(&vPosition, HandMat.r[3]);
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_SHOUT, this, &vPosition);
CameraShake(5.f, 1.f, 2.f, 0.5f);
}, 0.2f);
break;
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
@@ -316,6 +344,22 @@ void CTroll::Behavior_RushEnter()
pairAnimInfo = m_Animation[STATEANIM::RUSH_START];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
Add_Event(pairAnimInfo.first, [this]() {
_matrix HandMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("IK_LeftFoot")) * m_pTransformCom->Get_XMWorldMatrix();
_float4 vPosition = {};
XMStoreFloat4(&vPosition, HandMat.r[3]);
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_NOMAL_SMOKE, this, &vPosition);
}, 0.45f);
Add_Event(m_Animation[STATEANIM::RUSH_LOOP].first, [this]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_RUSH, this, nullptr, &m_pRushEffect);
}, 0.f);
}
HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta)
@@ -336,6 +380,14 @@ HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta)
}
else {
m_fRushTime += fTimeDelta;
if (m_fRushTime >= 1.f && m_pRushEffect != nullptr)
{
m_pRushEffect->Get_PartObject<CEffectParts>()->Get_Component<CInstance_Model>()->Set_Loop(false);
SAFE_RELEASE(m_pRushEffect);
}
if (m_fRushTime >= 1.5f)
{
m_fRushTime = 0.f;
@@ -387,7 +439,10 @@ void CTroll::Behavior_ThrowEnter()
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
Add_Event(pairAnimInfo.first,
[this]() {Get_PartObject<CTroll_Rock>()->Set_Visible(true); },
[this]() {
Get_PartObject<CTroll_Rock>()->Set_Visible(true);
},
0.95f);
Set_Easing(m_Animation[STATEANIM::THROW_ROCK].first, 0.1f, 0.47f, 1.5f);
@@ -447,6 +502,7 @@ void CTroll::Behavior_ThrowExit()
m_pFSM->Disable_State(FSMSTATE::THROW_ROCK);
Get_PartObject<CTroll_Rock>()->Set_Attach(true);
Get_PartObject<CTroll_Rock>()->Set_Visible(false);
}
void CTroll::Behavior_SwingEnter()
@@ -513,17 +569,12 @@ void CTroll::Behavior_SlamEnter()
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
Troll_Trail_Visible(true);
m_pWeaponTrail->Set_Visible(true);
m_pWeaponTrail->Get_Component<CTrail>()->Reset_Trail();
Add_Event(pairAnimInfo.first,
[this]() {
Troll_Trail_Visible(false);
m_pWeaponTrail->Set_Visible(false);
},
0.7f);
Troll_Trail_Visible(true);
m_pWeaponTrail->Set_Visible(true);
m_pWeaponTrail->Get_Component<CTrail>()->Reset_Trail(); },
0.15f);
Add_Event(m_Animation[STATEANIM::SLAM].first,
[this]() { m_bLookAt = false; },
@@ -531,6 +582,8 @@ void CTroll::Behavior_SlamEnter()
Add_Event(m_Animation[STATEANIM::SLAM].first, [this]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_ATTACK, this);
Troll_Trail_Visible(false);
m_pWeaponTrail->Set_Visible(false);
}, 0.3f);
Set_Easing(pairAnimInfo.first, 0.2f, 0.42f, 1.5f);
@@ -571,20 +624,25 @@ void CTroll::Behavior_BackHandSwingEnter()
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] =
m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)];
Add_Event(m_Animation[STATEANIM::BACKHAND_SWING_JOG].first,
[this]() { m_bLookAt = false; },
0.2f);
Troll_Trail_Visible(true);
m_pWeaponTrail->Set_Visible(true);
m_pWeaponTrail->Get_Component<CTrail>()->Reset_Trail();
Add_Event(pairAnimInfo.first,
[this]() {
Troll_Trail_Visible(true);
m_pWeaponTrail->Set_Visible(true);
m_pWeaponTrail->Get_Component<CTrail>()->Reset_Trail(); },
0.4f);
Add_Event(pairAnimInfo.first,
[this]() {
Troll_Trail_Visible(false);
m_pWeaponTrail->Set_Visible(false);
},
0.9f);
0.66f);
Set_Easing(pairAnimInfo.first, 0.1f, 0.45f, 1.8f);
Set_Easing(pairAnimInfo.first, 0.65f, 0.7f, 0.5f);
@@ -626,12 +684,20 @@ void CTroll::Behavior_StunEnter()
m_pEffectPool->Use_Skill(SKILL_TYPE::STUN, this, &strBoneName);
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
Add_Event(pairAnimInfo.first,
[this]() { m_bLookAt = true;
},
0.6f);
if (m_pRushEffect != nullptr)
{
m_pRushEffect->Get_PartObject<CEffectParts>()->Get_Component<CInstance_Model>()->Set_Loop(false);
SAFE_RELEASE(m_pRushEffect);
}
}
HRESULT CTroll::Behavior_StunExitCheck(_float fTimeDelta)
@@ -662,8 +728,11 @@ void CTroll::Behavior_HitEnter()
if (fRatio <= 0.75f) {
pairAnimInfo = m_Animation[STATEANIM::HIT_FACE];
Add_Event(pairAnimInfo.first,
[this]() {CameraShake(10.f, 2.f, 3.f, 0.3f); },
0.1f);
[this]() {
CameraShake(10.f, 2.f, 3.f, 0.3f);
m_pEffectPool->Use_Skill(SKILL_TYPE::TROLL_SELF_HIT, this);
},0.1f);
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
}
@@ -727,6 +796,14 @@ void CTroll::Behavior_DeadEnter()
m_pCharacter_Controller->Set_Position(XMLoadFloat3((_float3*)&pxTransform.p));
m_pRigidBody->SetActive(false);
m_pCharacter_Controller->SetActive(false);
Add_Event(pairAnimInfo.first,
[this]() {
m_pDead_Smoke->Set_Visible(true);
m_pDead_Smoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pTransformCom->Get_State(STATE::POSITION));
}, 0.55f);
}
HRESULT CTroll::Behavior_DeadExitCheck(_float fTimeDelta)
@@ -741,6 +818,7 @@ HRESULT CTroll::Behavior_DeadExitCheck(_float fTimeDelta)
void CTroll::Behavior_DeadExit()
{
m_bDead = true;
m_pDead_Smoke->Set_Visible(false);
}
_bool CTroll::IsHitSpellDisabled()
@@ -889,6 +967,19 @@ void CTroll::Add_FSM()
Desc.funcLateUpdate = [this](_float fDeadRatio) {
m_fDeadRatio = fDeadRatio;
if (m_fDeadRatio > 1.f) {
CLayer* pLayer = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_REPARO);
if (nullptr != pLayer)
{
const list<class CGameObject*>* pReparoObjects = pLayer->Get_Objects();
for (auto& pObject : *pReparoObjects)
{
CReparoObject* pReparoObject = dynamic_cast<CReparoObject*>(pObject);
if (nullptr != pReparoObject)
pReparoObject->IsRepairable(true);
}
}
m_bDead = true;
}
};
@@ -66,6 +66,8 @@ class CCamera_Cinematic final : public CCamera
CCamPosition_Target* m_pLookTargetPart = { nullptr };
CCamPosition_Target* m_pFollowTargetPart = { nullptr };
_bool m_bLerpTranslation = { false };
_float2 m_vLerpTranslationTimer = {};
+3 -3
View File
@@ -3,7 +3,7 @@
namespace Client
{
enum class LEVEL { STATIC, LOADING, LOGO, INTRO, GAMEPLAY, FIELD, RESTART, END };
enum class MAPOBJECT_TYPE { CONTAINER, ELEMENT_STATIC, ELEMENT_INTERACT, ELEMENT_COLLIDER };
enum class MAPOBJECT_TYPE { CONTAINER, ELEMENT_STATIC, ELEMENT_INTERACT, ELEMENT_COLLIDER, ELEMENT_CAVE };
enum class MAPOBJECT_RENDER_TYPE { NORMAL, DECAL, GLASS };
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ, SPECTOR, END };
@@ -75,13 +75,13 @@ namespace Client
JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END, LIGHTNING_SIDE, TRANSFORMATION_SIDE, AVADAKEDAVRA_SIDE, STUPEFY_SIDE, ACCIO_SIDE,
/*트롤*/
TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, GOBLIN_PROTEGO,
TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, TROLL_SHOUT , TROLL_RUSH, TROLL_SELF_HIT,
/*고블린*/
GOBLIN_ATTACK, GOBILN_TELEPORT,
/*고블린 메이지*/
GOBLIN_MAGE_ATTACK, GOBLIN_MAGE_DOWN, GOBLIN_MAGE_SIDE,
GOBLIN_MAGE_ATTACK, GOBLIN_MAGE_DOWN, GOBLIN_MAGE_SIDE, GOBLIN_PROTEGO,
/*란록*/
@@ -71,6 +71,7 @@ namespace Client {
#define LAYER_DADA_INT TEXT("Layer_DADA_INT")
#define LAYER_DUELIST TEXT("Layer_Duelist")
#define LAYER_NPC TEXT("Layer_Npc")
#define LAYER_REPARO TEXT("Layer_Reparo")
#define LAYER_MAPOBJECTMANAGER TEXT("Layer_MapObjectManager")
@@ -54,6 +54,7 @@ class CHuman_Duelist final : public CMonster
HRESULT Ready_Parts();
HRESULT Bind_ShaderResources();
HRESULT Bind_ShaderParameters(_uint iMeshOrder);
void Check_BattleLose();
public:
static CHuman_Duelist* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -78,6 +79,7 @@ class CHuman_Duelist final : public CMonster
_bool m_bHitJap = {};
_bool m_bBattle = {};
_bool m_bCameraShake = { };
_float4 m_OriginPos = { };
_float m_fSkillCoolTime[ENUM_CLASS(SKILL::END)] = {};
@@ -63,6 +63,7 @@ DECLARE_SINGLETON(CInfoInstance)
HRESULT Load_WorldDecal(const _char* pFileName, const _wchar* pLayerTag);
HRESULT Load_PointLights(const _char* pFileName, const _wchar* pLayerTag);
HRESULT Load_EffectParts(const _char* pFileName, const _char* pEffectrFilePath);
HRESULT Load_ReparoObjects(const _char* pFileName);
HRESULT Load_DADA_INT();
HRESULT Load_Npc();
#pragma endregion
+14 -9
View File
@@ -34,24 +34,29 @@ class CLand final : public CGameObject
void Add_InstanceProp(CInstancedProp* pIntanceProp);
private:
_float m_fRaduis = {};
_float m_fUsingSurfaceParams = {};
_float m_fRaduis = {};
_float m_fUsingSurfaceParams = {};
CShader* m_pShaderCom = { nullptr };
CModel* m_pModelCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CModel* m_pModelCom = { nullptr };
CTexture* m_pDiffuseTextureCom = { nullptr };
CTexture* m_pNormalTextureCom = { nullptr };
CTexture* m_pMROTextureCom = { nullptr };
CTexture* m_pMaskTextureCom = { nullptr };
CTexture* m_pDiffuseTextureCom = { nullptr };
CTexture* m_pNormalTextureCom = { nullptr };
CTexture* m_pMROTextureCom = { nullptr };
CTexture* m_pMaskTextureCom = { nullptr };
list<class CInstancedProp*> m_InstanceProps = {};
CRigidBody_Static* m_RigidBody = { nullptr };
list<class CInstancedProp*> m_InstanceProps = {};
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
virtual HRESULT Bind_ShaderResources() override;
void ReadyForPhysX(const _char* pName);
void ConvertToPhysX(const _char* pName);
public:
static CLand* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
@@ -0,0 +1,52 @@
#pragma once
#include "Client_Define.h"
#include "MapElement.h"
NS_BEGIN(Client)
class CMapElement_Cave : public CMapElement
{
private:
CMapElement_Cave(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CMapElement_Cave(const CMapElement_Cave& rhs);
virtual ~CMapElement_Cave() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
private:
_bool m_bReadyToCreatePhysX = { false };
_bool m_bConverted = { false };
_float m_fRadius = {};
_float3 m_vWorldCenterPosition = {};
class CTriggerBox* m_pTriggerBox = { nullptr };
vector<CRigidBody_Static*> m_RigidBodies;
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
virtual HRESULT Bind_ShaderResources() override;
HRESULT Ready_TriggerBox();
void ReadyForPhysX();
void ConvertToPhysX();
void Enter_Cave();
public:
static CMapElement_Cave* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
#ifdef _DEBUG
void Describe_Entity() override;
#endif // _DEBUG
};
NS_END
+1
View File
@@ -30,6 +30,7 @@ class CMapInfo final : public CBase
HRESULT Load_WorldDecal(const _char* pFileName, const _wchar* pLayerTag);
HRESULT Load_PointLights(const _char* pFilePath, const _wchar* pLayerTag);
HRESULT Load_EffectParts(const _char* pFileName, const _char* pEffectrFilePath);
HRESULT Load_ReparoObjects(const _char* pFileName);
HRESULT Load_DADA_INT();
HRESULT Load_Npc();
+5
View File
@@ -57,6 +57,8 @@ class CPlayer final : public CUnit
HRESULT Update_RaycastElements();
void Set_Battle(_bool bBattle) { m_bDuel_ZOnlyMove = bBattle; }
void Set_Interaction(_bool bInteraction);
void ExitBattle();
void Set_OriginPos(_vector vPos) { XMStoreFloat4(&m_OriginPos, vPos); }
#ifdef _DEBUG
void Render_CameraCoordinateSystem();
#endif // _DEBUG
@@ -122,6 +124,7 @@ class CPlayer final : public CUnit
void Play_SpellHitAnim();
void Player_PixRot();
void Find_HiddenObjects();
void Check_Reparoobejcts();
void Update_CameraCoordinateSystem(_float fTimeDelta);
#ifdef _DEBUG
@@ -190,6 +193,8 @@ class CPlayer final : public CUnit
_float m_fDegree = {};
_bool m_bGuarding = {};
_float m_fParryTimer = {};
_bool m_bStartSpellAnim = {};
_float4 m_OriginPos = {};
/* 무적 불 변수*/
@@ -71,6 +71,8 @@ class CRandomNpc final : public CUnit
_bool m_bBattleObserve_Npc = {};
_bool m_bBattle = {};
_int m_eNpcState = ENUM_CLASS(NPC_STATE::END);
_bool m_bBroomRacer = {};
vector<_int> m_Anims;
protected:
virtual HRESULT Initialize_Prototype() override;
@@ -83,6 +85,8 @@ class CRandomNpc final : public CUnit
void BattleObserve_Anim();
void Load_AnimXML(const _char* pFilePath);
public:
static CRandomNpc* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr);
@@ -7,6 +7,17 @@ NS_BEGIN(Client)
class CReparoObject final : public CMonster
{
// 되돌리기 전 Before
enum class REPARO_OBJECT_STATE { SLEEP, BEFORE, PLAYANIM, AFTER, END };
public:
typedef struct tagReparoObjectDesc
{
_uint iModelID = {};
_float fRadius = {};
_float3 vPosition = {};
_float3 vRotation = {};
}REPARO_OBJECT_DESC;
private:
CReparoObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CReparoObject(const CReparoObject& Prototype);
@@ -20,11 +31,21 @@ class CReparoObject final : public CMonster
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
_bool IsRepairable(_bool isAwake);
private:
REPARO_OBJECT_STATE m_ePreState = { REPARO_OBJECT_STATE::END };
REPARO_OBJECT_STATE m_eCurState = { REPARO_OBJECT_STATE::END };
_uint m_iModelID = {};
_float m_fRadius = {};
private:
HRESULT Ready_Components();
HRESULT Bind_ShaderResources();
HRESULT Render_OutLine();
void Change_State();
public:
static CReparoObject* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
+5
View File
@@ -59,10 +59,14 @@ class CTroll final : public CMonster
class CEffectParts* m_pTroll_Particle = { nullptr };
class CEffectParts* m_pTroll_Particle2 = { nullptr };
class CEffectParts* m_pDead_Smoke = { nullptr };
class CTrailObject* m_pLeftTrail = { nullptr };
class CTrailObject* m_pRightTrail = { nullptr };
class CTrailObject* m_pWeaponTrail = { nullptr };
const _float4x4* m_pLeftHand_BoneMat = { nullptr };
const _float4x4* m_pRightHand_BoneMat = { nullptr };
const _float4x4* m_pWeapon_BoneMat = { nullptr };
@@ -96,6 +100,7 @@ class CTroll final : public CMonster
_float m_fRushTime = {};
_float m_fAttackDelay = {};
class CEffect_Container* m_pRushEffect = nullptr;
void Behavior_IdleEnter();
HRESULT Behavior_IdleExitCheck();
@@ -34,6 +34,8 @@ class CTroll_Rock final : public CPartObject
CModel* m_pModelCom = { nullptr };
_bool m_bAttach = { true };
class CEffectPool* m_pEffectPool = { nullptr };
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
@@ -0,0 +1,43 @@
#pragma once
#include "Client_Define.h"
#include "Effect_Container.h"
NS_BEGIN(Client)
class CTroll_Rush final : public CEffect_Container
{
private:
CTroll_Rush(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CTroll_Rush(const CTroll_Rush& rhs);
virtual ~CTroll_Rush() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
public:
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
private:
_wstring m_wstrEffectName = {};
class CEffectParts* m_pRush_Blur = { nullptr };
public:
static CTroll_Rush* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
void Describe_Entity() override;
};
NS_END
@@ -0,0 +1,48 @@
#pragma once
#include "Client_Define.h"
#include "Effect_Container.h"
NS_BEGIN(Engine)
NS_END
NS_BEGIN(Client)
class CTroll_Self_Hit final : public CEffect_Container
{
private:
CTroll_Self_Hit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CTroll_Self_Hit(const CTroll_Self_Hit& rhs);
virtual ~CTroll_Self_Hit() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
public:
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
private:
_wstring m_wstrEffectName = {};
private:
class CInfoInstance* m_pInfoInstance = { nullptr };
public:
static CTroll_Self_Hit* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
#ifdef _DEBUG
void Describe_Entity() override;
#endif // _DEBUG
};
NS_END
@@ -0,0 +1,43 @@
#pragma once
#include "Client_Define.h"
#include "Effect_Container.h"
NS_BEGIN(Engine)
NS_END
NS_BEGIN(Client)
class CTroll_Shout final : public CEffect_Container
{
private:
CTroll_Shout(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CTroll_Shout(const CTroll_Shout& rhs);
virtual ~CTroll_Shout() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
public:
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
HRESULT Ready_Child();
HRESULT Bind_ShaderResources() override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
private:
_wstring m_wstrEffectName = {};
public:
static CTroll_Shout* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual void Free() override;
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
void Describe_Entity() override;
};
NS_END
@@ -0,0 +1,39 @@
<NPCAnimations>
<NPC Model="DEFAULT">
<Anim Name="IDLE">
<Index>0</Index>
<Index>1</Index>
<Index>2</Index>
<Index>3</Index>
<Index>4</Index>
<Index>5</Index>
<Index>6</Index>
<Index>7</Index>
<Index>8</Index>
<Index>9</Index>
<Index>10</Index>
<Index>11</Index>
<Index>12</Index>
</Anim>
</NPC>
<NPC Model="RACING">
<Anim Name="IDLE">
<Index>76</Index>
<Index>77</Index>
<Index>78</Index>
<Index>79</Index>
<Index>80</Index>
<Index>81</Index>
<Index>82</Index>
<Index>83</Index>
<Index>84</Index>
<Index>85</Index>
<Index>86</Index>
<Index>87</Index>
<Index>88</Index>
</Anim>
</NPC>
</NPCAnimations>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<Land>
<Object Type="4" Lod_Level="3">
<PrototypeTag>Prototype_GameObject_SM_LLA_Cave</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_LLA_Cave_Lod1</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_LLA_Cave_Lod2</PrototypeTag>
<PrototypeTag>Prototype_GameObject_SM_LLA_Cave_Lod3</PrototypeTag>
<Position x="-637.9436" y="-27.070477" z="-295.71112"/>
<Scale x="1" y="1" z="1"/>
<Rotation x="0" y="298" z="0"/>
</Object>
</Land>
@@ -30,22 +30,22 @@
<Scale x="0.99999529" y="1" z="0.99999529"/>
<Rotation x="0" y="315" z="0"/>
</Object>
<Object ID="9" Index="7">
<Object ID="9" Index="6">
<Position x="35.15633" y="1.5198594" z="50.624886"/>
<Scale x="0.99999732" y="1" z="0.99999732"/>
<Rotation x="0" y="120" z="0"/>
</Object>
<Object ID="10" Index="8">
<Object ID="10" Index="7">
<Position x="129.77383" y="15.728663" z="121.83965"/>
<Scale x="0.99999732" y="1" z="0.99999732"/>
<Rotation x="0" y="-105" z="0"/>
</Object>
<Object ID="11" Index="9">
<Object ID="11" Index="8">
<Position x="-393.24478" y="-33.342117" z="-362.13519"/>
<Scale x="0.9999885" y="1" z="0.9999885"/>
<Rotation x="0" y="285" z="0"/>
</Object>
<Object ID="12" Index="10">
<Object ID="12" Index="9">
<Position x="79.841499" y="3.8484674" z="83.004013"/>
<Scale x="0.99980307" y="1" z="0.99980307"/>
<Rotation x="0" y="210" z="0"/>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<Reparo>
<Object Type="0" Radius="10">
<Position x="91.9" y="15.1" z="125.6"/>
<Rotation x="0" y="-74" z="0"/>
</Object>
<Object Type="0" Radius="10">
<Position x="123.4" y="16.1" z="144.3"/>
<Rotation x="0" y="-8" z="0"/>
</Object>
<Object Type="1" Radius="15">
<Position x="93.46" y="15.6" z="138.2"/>
<Rotation x="0" y="135" z="0"/>
</Object>
<Object Type="1" Radius="15">
<Position x="129.3" y="15.5" z="112.9"/>
<Rotation x="2" y="168" z="-3"/>
</Object>
</Reparo>
@@ -13,4 +13,6 @@
<DINAHHECAT ID="11" Name="디나 헤카트" NpcName="DINAHHECAT" TAG="1" SizeX="256"/>
<MUDIWAONAI ID="12" Name="무디아 오나이" NpcName="MUDIWAONAI" TAG="1" SizeX="256"/>
<KITCHENFEMALE ID="13" Name="주방 도비" NpcName="KITCHENFEMALE" TAG="1" SizeX="256"/>
<VICTORROCKWOOD ID="14" Name="빅터 룩우드" NpcName="VICTORROCKWOOD" TAG="1" SizeX="256"/>
<CHIYOKOGAWA ID="15" Name="치요 코가와" NpcName="CHIYOKOGAWA" TAG="1" SizeX="256"/>
</StatInfo>
@@ -90,7 +90,7 @@
</MI_HUM_N_Heads_Teeth>
<MI_HUM_N_Heads_Eyelash ShaderIndex = "25" OutLineWrite="5">
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_F_Hair_PROHair01_Asuka_DAO_MSK" Extension=".dds"/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Old_M_Hair_BaiHowin_DAO_MSK" Extension=".dds"/>
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
<aiTextureType_AMBIENT Index="3" Filename="" Extension=""/>
<aiTextureType_EMISSIVE Index="4" Filename="" Extension=""/>
@@ -98,7 +98,7 @@
<aiTextureType_NORMALS Index="6" Filename="T_DefaultGrey_D" Extension=".png"/>
<aiTextureType_SHININESS Index="7" Filename="" Extension=""/>
<aiTextureType_OPACITY Index="8" Filename="" Extension=""/>
<aiTextureType_DISPLACEMENT Index="9" Filename="T_HUM_F_Hair_PROHair01_Asuka_THV_MSK" Extension=".dds"/>
<aiTextureType_DISPLACEMENT Index="9" Filename="T_Old_M_Hair_BaiHowin_THV_MSK" Extension=".dds"/>
<aiTextureType_LIGHTMAP Index="10" Filename="" Extension=""/>
<aiTextureType_REFLECTION Index="11" Filename="" Extension=""/>
<aiTextureType_BASE_COLOR Index="12" Filename="" Extension=""/>
@@ -120,7 +120,7 @@
<MI_HUM_N_Heads_Eye ShaderIndex = "2" OutLineWrite="2">
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Poltergeist_Eye_E" Extension=".dds"/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Eye_Iris_D" Extension=".png"/>
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
<aiTextureType_AMBIENT Index="3" Filename="" Extension=""/>
<aiTextureType_EMISSIVE Index="4" Filename="" Extension=""/>
@@ -158,7 +158,7 @@
<MI_HUM_N_Heads_Eye ShaderIndex = "2" OutLineWrite="2">
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Poltergeist_Eye_E" Extension=".dds"/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Eye_Iris_D" Extension=".png"/>
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
<aiTextureType_AMBIENT Index="3" Filename="" Extension=""/>
<aiTextureType_EMISSIVE Index="4" Filename="" Extension=""/>
@@ -32,7 +32,7 @@
<MI_HUM_N_Heads_Eyelash ShaderIndex = "25" OutLineWrite="5">
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Poltergeist_Eye_E" Extension=".dds"/>
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_M_Hair_Hecat_DAO_MSK" Extension=".dds"/>
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
<aiTextureType_AMBIENT Index="3" Filename="" Extension=""/>
<aiTextureType_EMISSIVE Index="4" Filename="" Extension=""/>
@@ -40,7 +40,7 @@
<aiTextureType_NORMALS Index="6" Filename="T_DefaultGrey_D" Extension=".png"/>
<aiTextureType_SHININESS Index="7" Filename="" Extension=""/>
<aiTextureType_OPACITY Index="8" Filename="" Extension=""/>
<aiTextureType_DISPLACEMENT Index="9" Filename="T_HUM_F_Hair_PROHair01_Asuka_THV_MSK" Extension=".dds"/>
<aiTextureType_DISPLACEMENT Index="9" Filename="T_HUM_M_Hair_Hecat_THV_MSK" Extension=".dds"/>
<aiTextureType_LIGHTMAP Index="10" Filename="" Extension=""/>
<aiTextureType_REFLECTION Index="11" Filename="" Extension=""/>
<aiTextureType_BASE_COLOR Index="12" Filename="" Extension=""/>
@@ -30,7 +30,7 @@
</MI_Professor_EleazarFig_Hair>
<MI_HUM_N_Heads_Eye ShaderIndex = "2" OutLineWrite="2">
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Poltergeist_Eye_E" Extension=".dds"/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Eye_Iris_D" Extension=".png"/>
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
<aiTextureType_AMBIENT Index="3" Filename="" Extension=""/>
<aiTextureType_EMISSIVE Index="4" Filename="" Extension=""/>
@@ -61,7 +61,7 @@
<MI_HUM_N_Heads_Eye ShaderIndex = "2" OutLineWrite="2">
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Poltergeist_Eye_E" Extension=".dds"/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Eye_Iris_D" Extension=".png"/>
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
<aiTextureType_AMBIENT Index="3" Filename="" Extension=""/>
<aiTextureType_EMISSIVE Index="4" Filename="" Extension=""/>
@@ -34,7 +34,7 @@
<MI_HUM_N_Heads_Eyelash ShaderIndex = "25" OutLineWrite="5">
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_F_Hair_PROHair01_Asuka_DAO_MSK" Extension=".dds"/>
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_M_Hair_GeorgeOsric_DAO_MSK" Extension=".dds"/>
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
<aiTextureType_AMBIENT Index="3" Filename="" Extension=""/>
<aiTextureType_EMISSIVE Index="4" Filename="" Extension=""/>
@@ -42,7 +42,7 @@
<aiTextureType_NORMALS Index="6" Filename="T_DefaultGrey_D" Extension=".png"/>
<aiTextureType_SHININESS Index="7" Filename="" Extension=""/>
<aiTextureType_OPACITY Index="8" Filename="" Extension=""/>
<aiTextureType_DISPLACEMENT Index="9" Filename="T_HUM_F_Hair_PROHair01_Asuka_THV_MSK" Extension=".dds"/>
<aiTextureType_DISPLACEMENT Index="9" Filename="T_HUM_M_Hair_GeorgeOsric_THV_MSK" Extension=".dds"/>
<aiTextureType_LIGHTMAP Index="10" Filename="" Extension=""/>
<aiTextureType_REFLECTION Index="11" Filename="" Extension=""/>
<aiTextureType_BASE_COLOR Index="12" Filename="" Extension=""/>
@@ -94,7 +94,7 @@
<MI_HUM_N_Heads_Eye ShaderIndex = "2" OutLineWrite="2">
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Poltergeist_Eye_E" Extension=".dds"/>
<aiTextureType_DIFFUSE Index="1" Filename="T_Eye_Iris_D" Extension=".png"/>
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
<aiTextureType_AMBIENT Index="3" Filename="" Extension=""/>
<aiTextureType_EMISSIVE Index="4" Filename="" Extension=""/>

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