From 5c788cfde0d2548c6097ccb85e9c372ce3d98083 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Thu, 8 Jan 2026 11:16:18 +0900 Subject: [PATCH 01/12] =?UTF-8?q?[fix]=20=ED=83=80=EC=9E=84=EC=86=8C?= =?UTF-8?q?=EC=BC=93=20=EC=97=94=EC=A7=84=EC=9C=BC=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Default/Client.vcxproj | 2 - .../Client/Default/Client.vcxproj.filters | 9 - .../Client/Private/CutSceneInfo.cpp | 24 +- .../Client/Private/InfoInstance.cpp | 22 + Jusin154_Team3D/Client/Public/Client_Struct.h | 572 +++++++++--------- Jusin154_Team3D/Client/Public/CutSceneInfo.h | 8 +- Jusin154_Team3D/Client/Public/InfoInstance.h | 6 + Jusin154_Team3D/Engine/Default/Engine.vcxproj | 2 + .../Engine/Default/Engine.vcxproj.filters | 9 + .../{Client => Engine}/Private/TimeSocket.cpp | 0 .../{Client => Engine}/Public/TimeSocket.h | 8 +- 11 files changed, 332 insertions(+), 330 deletions(-) rename Jusin154_Team3D/{Client => Engine}/Private/TimeSocket.cpp (100%) rename Jusin154_Team3D/{Client => Engine}/Public/TimeSocket.h (92%) diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index f48b5b0f4..300e277cd 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -222,7 +222,6 @@ call Update_Resources.bat - @@ -513,7 +512,6 @@ call Update_Resources.bat - diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index e99bb8320..265498909 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -884,9 +884,6 @@ 03.InfoInstance\04.CutSceneInfo - - 04.Mechanic\TimeSocket - @@ -1833,9 +1830,6 @@ {b03591a7-a14e-425a-8a3f-2a6a054c884a} - - {ca386d46-aca6-44a4-94cc-15610e1a878e} - {d07bd195-0cdf-4a47-8c50-e3a88361352f} @@ -2676,9 +2670,6 @@ 03.InfoInstance\04.CutSceneInfo - - 04.Mechanic\TimeSocket - diff --git a/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp b/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp index 4ec4f9475..6e616f1e1 100644 --- a/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp +++ b/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp @@ -66,29 +66,9 @@ HRESULT CCutSceneInfo::DeActive_ActiveEvent(_string& strKey) return S_OK; } -void CCutSceneInfo::Load_Events(LEVEL eLevel) +void CCutSceneInfo::Load_Events(pair<_string, TimeLine>& pairTimeLine) { - switch (eLevel) - { - case Client::LEVEL::STATIC: - break; - case Client::LEVEL::LOADING: - break; - case Client::LEVEL::LOGO: - break; - case Client::LEVEL::INTRO: - break; - case Client::LEVEL::GAMEPLAY: - break; - case Client::LEVEL::FIELD: - break; - case Client::LEVEL::RESTART: - break; - case Client::LEVEL::END: - break; - default: - break; - } + m_funcWaitEvents.emplace(pairTimeLine); } HRESULT CCutSceneInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index edac1466e..4b412c385 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -5,6 +5,7 @@ #include "MonsterInfo.h" #include "PlayerInfo.h" #include "InteractiveInfo.h" +#include "CutSceneInfo.h" #include "Skill_Data.h" #include "Quest_Data.h" #include "Damage_Font.h" @@ -394,6 +395,21 @@ _float CInfoInstance::Get_Broom_Booster_Timer() return m_fBroom_Booster; } +void CInfoInstance::Active_Event(_string& strKey) +{ + m_pCutSceneInfo->Active_Event(strKey); +} + +HRESULT CInfoInstance::DeActive_ActiveEvent(_string& strKey) +{ + return m_pCutSceneInfo->DeActive_ActiveEvent(strKey); +} + +void CInfoInstance::Load_Events(pair<_string, TimeLine>& pairTimeLine) +{ + m_pCutSceneInfo->Load_Events(pairTimeLine); +} + #pragma endregion LEVEL CInfoInstance::Get_RestartLevel() { @@ -456,6 +472,11 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic if (nullptr == m_pDialogue_Data) { return E_FAIL; } + + m_pCutSceneInfo = CCutSceneInfo::Create(pDevice, pContext); + if (nullptr == m_pCutSceneInfo) { + return E_FAIL; + } return S_OK; } @@ -538,6 +559,7 @@ void CInfoInstance::Release_Information() SAFE_RELEASE(m_pMonsterInfo); SAFE_RELEASE(m_pSkillInfo); SAFE_RELEASE(m_pQuestInfo); + SAFE_RELEASE(m_pCutSceneInfo); SAFE_RELEASE(m_pInteractiveInfo); SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index f397d777f..ae720add1 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -3,364 +3,370 @@ NS_BEGIN(Engine) class CModel; class CRigidBody_Static; class CUnit; + class CTimeSocket; NS_END -namespace Client +NS_BEGIN(Client) +typedef struct tagFolderLoad { + _wstring pModelTag; + CModel* pLoadedModel; + filesystem::path pathModel; + + _bool bLoadTags; + vector<_wstring> pRigidBodyTags; + vector LoadedRigidBody; +}FOLDER_LOAD; + +typedef struct tagSpellInfo { - typedef struct tagFolderLoad { - _wstring pModelTag; - CModel* pLoadedModel; - filesystem::path pathModel; + _int iSpell_ID{}; + _wstring pSpell_Name; + _wstring pImage_Name; + _int iSpell_Type{}; + _wstring pType_Name; + _int iSkill_Type{}; + _float fSpell_Damage{}; + _float fSpell_CoolTime{}; + _float fDuration{}; + _int iAnimNum{}; + _wstring pSpellInfo; + _bool bSpell_Lock = false; + _bool bEquip_Spell = false; + _bool bUse_Skill = false; + _float fPreview{}; + _float fVidio{}; +}SPELL_INFO; - _bool bLoadTags; - vector<_wstring> pRigidBodyTags; - vector LoadedRigidBody; - }FOLDER_LOAD; +typedef struct DialogueChoice +{ + _int eType = {false}; + _wstring pText; + _int NextTypeID{}; +}DIALOGUECHOICEINFO; - typedef struct tagSpellInfo - { - _int iSpell_ID{}; - _wstring pSpell_Name; - _wstring pImage_Name; - _int iSpell_Type{}; - _wstring pType_Name; - _int iSkill_Type{}; - _float fSpell_Damage{}; - _float fSpell_CoolTime{}; - _float fDuration{}; - _int iAnimNum{}; - _wstring pSpellInfo; - _bool bSpell_Lock = false; - _bool bEquip_Spell = false; - _bool bUse_Skill = false; - _float fPreview{}; - _float fVidio{}; - }SPELL_INFO; +typedef struct DialogueInfo +{ + _int iLineID{}; + _bool bType = {false}; + _wstring pText; + _int NextTextID{}; + vector ChoiceInfo; +}CURRENTDIALOGUEINFO; - typedef struct DialogueChoice - { - _int eType = {false}; - _wstring pText; - _int NextTypeID{}; - }DIALOGUECHOICEINFO; +typedef struct NpcDialogue +{ + _wstring pNpcName; + _int iNpcID{}; + unordered_map<_int, CURRENTDIALOGUEINFO> Info; +}NPCDIALOGUEINFO; - typedef struct DialogueInfo - { - _int iLineID{}; - _bool bType = {false}; - _wstring pText; - _int NextTextID{}; - vector ChoiceInfo; - }CURRENTDIALOGUEINFO; +typedef struct tagLockOnInfo { + CUnit* pUnit = { nullptr }; + class CMapElement_Interactable* pInteractive = { nullptr }; + class CMapElement_Chest* pChest = { nullptr }; +}LOCKON_INFO; - typedef struct NpcDialogue - { - _wstring pNpcName; - _int iNpcID{}; - unordered_map<_int, CURRENTDIALOGUEINFO> Info; - }NPCDIALOGUEINFO; +typedef struct tegNPCInteractionInfo +{ + CGameObject* pOwner = { nullptr }; + _wstring pNPCName; + _wstring pName; + _float4 fNPCPosition{}; + _int iTextID{}; +}NPCINTERACTIONINFO; - typedef struct tagLockOnInfo { - CUnit* pUnit = { nullptr }; - class CMapElement_Interactable* pInteractive = { nullptr }; - class CMapElement_Chest* pChest = { nullptr }; - }LOCKON_INFO; +typedef struct tagUnitInfo +{ + _wstring pUnit_Name; + _float fCurrentHp{}; + _float fMaxHp{}; + _float fTargetHp{}; + _float fMelee{}; + _float fMagic{}; + _float fDefense{}; + _float fSpeed{}; + _float fAgility{}; + _int iLevel{}; + _float fExprince{}; + _float fMaxExprience{}; + _int iGold{}; +}UNITINFO; - typedef struct tegNPCInteractionInfo - { - CGameObject* pOwner = { nullptr }; - _wstring pNPCName; - _wstring pName; - _float4 fNPCPosition{}; - _int iTextID{}; - }NPCINTERACTIONINFO; +typedef struct tagDamageInfo +{ + _float4 vTarget_Pos{}; + _float fDamage{}; + DAMAGE_TYPE eType = DAMAGE_TYPE::NOMAL; +}DAMAGE_INFO; - typedef struct tagUnitInfo - { - _wstring pUnit_Name; - _float fCurrentHp{}; - _float fMaxHp{}; - _float fTargetHp{}; - _float fMelee{}; - _float fMagic{}; - _float fDefense{}; - _float fSpeed{}; - _float fAgility{}; - _int iLevel{}; - _float fExprince{}; - _float fMaxExprience{}; - _int iGold{}; - }UNITINFO; +typedef struct tagObjectiveInfo +{ + _bool bClear{}; + _int iTargetID{}; + _int iRequiredCount{}; + _int iCurrentCount{}; +}OBJECTIVEINFO; - typedef struct tagDamageInfo - { - _float4 vTarget_Pos{}; - _float fDamage{}; - DAMAGE_TYPE eType = DAMAGE_TYPE::NOMAL; - }DAMAGE_INFO; +typedef struct tagRewardsInfo +{ + _int iRewardType{}; + _int iRewardID{}; +}REWARDSINFO; - typedef struct tagObjectiveInfo - { - _bool bClear{}; - _int iTargetID{}; - _int iRequiredCount{}; - _int iCurrentCount{}; - }OBJECTIVEINFO; +typedef struct tagQuestInfo +{ + _int iQuestID{}; + _int iType{}; + _wstring pQuestName; + _wstring pQuestInfo; + vector ObjectiveInfo; + vector RewardsInfo; + _int iAcceptState; +}QUESTINFO; - typedef struct tagRewardsInfo - { - _int iRewardType{}; - _int iRewardID{}; - }REWARDSINFO; +typedef struct tagSpellLearnInfo +{ + _wstring pSpellName{}; + _wstring pImageName{}; + _int iSpellID{}; + _int iSpellType{}; + _float fSpellSize{}; + _float2 fStartPosition{}; + _float2 fEndPosition{}; + vector<_float4> Booster; + vector<_float4> Lines; +}SPELLLEARNINFO; - typedef struct tagQuestInfo - { - _int iQuestID{}; - _int iType{}; - _wstring pQuestName; - _wstring pQuestInfo; - vector ObjectiveInfo; - vector RewardsInfo; - _int iAcceptState; - }QUESTINFO; +typedef struct tagDialougeInfo +{ + _wstring pName; + _wstring pText; + _float fTime = 1.f; +}DIALOGUEINFO; - typedef struct tagSpellLearnInfo - { - _wstring pSpellName{}; - _wstring pImageName{}; - _int iSpellID{}; - _int iSpellType{}; - _float fSpellSize{}; - _float2 fStartPosition{}; - _float2 fEndPosition{}; - vector<_float4> Booster; - vector<_float4> Lines; - }SPELLLEARNINFO; +typedef struct tagEffectInfo +{ + _float4 vColor = { 0.f ,0.f ,0.f ,1.f }; - typedef struct tagDialougeInfo - { - _wstring pName; - _wstring pText; - _float fTime = 1.f; - }DIALOGUEINFO; + _float2 vDiffuseUVGainAmount = {}; + _float2 vMaskingUVGainAmount = {}; + _float2 vNoiseUVGainAmount = {}; - typedef struct tagEffectInfo - { - _float4 vColor = { 0.f ,0.f ,0.f ,1.f }; + _float2 vDistortionTime = {}; + _float2 vMaskDistortionUVGainAmount = {}; - _float2 vDiffuseUVGainAmount = {}; - _float2 vMaskingUVGainAmount = {}; - _float2 vNoiseUVGainAmount = {}; + _float2 vUVCutting = { 1.f ,1.f }; + _float2 vUVMaskCutting = { 1.f ,1.f }; - _float2 vDistortionTime = {}; - _float2 vMaskDistortionUVGainAmount = {}; + _int iMaskMoveLerpOption = { 0 }; + _int iDiffuseMoveLerpOption = { 0 }; + _int iNoiseMoveLerpOption = { 0 }; - _float2 vUVCutting = { 1.f ,1.f }; - _float2 vUVMaskCutting = { 1.f ,1.f }; + _int iMaskDistortionMoveLerpOption = { 0 }; + _int iDiffuseDistortionMoveLerpOption = { 0 }; - _int iMaskMoveLerpOption = { 0 }; - _int iDiffuseMoveLerpOption = { 0 }; - _int iNoiseMoveLerpOption = { 0 }; - - _int iMaskDistortionMoveLerpOption = { 0 }; - _int iDiffuseDistortionMoveLerpOption = { 0 }; - - _int iBlurWeight = { 0 }; + _int iBlurWeight = { 0 }; - _bool isDiffuse = {}; - _bool isMasking = {}; - _bool isDissolve = {}; - _bool isNoise = {}; - _bool isEmissive = {}; - _bool isDistortion = {}; - _bool isDiffuseUVMove = {}; - _bool isNoiseUVMove = {}; - _bool isMaskUVMove = {}; - _bool isBlur = {}; - _bool isBillboard = {}; + _bool isDiffuse = {}; + _bool isMasking = {}; + _bool isDissolve = {}; + _bool isNoise = {}; + _bool isEmissive = {}; + _bool isDistortion = {}; + _bool isDiffuseUVMove = {}; + _bool isNoiseUVMove = {}; + _bool isMaskUVMove = {}; + _bool isBlur = {}; + _bool isBillboard = {}; - _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f }; - _float fDiffuseAlpha = { 1.f }; - _float fBlurIntensity = {}; - _float fNoiseDistortionIntensity = {}; - _float fEmissiveStrength = { 0.f }; + _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f }; + _float fDiffuseAlpha = { 1.f }; + _float fBlurIntensity = {}; + _float fNoiseDistortionIntensity = {}; + _float fEmissiveStrength = { 0.f }; - LIGHT_DESC LightDesc = {}; - RENDER eRenderOrder = { RENDER::EFFECT }; + LIGHT_DESC LightDesc = {}; + RENDER eRenderOrder = { RENDER::EFFECT }; - _bool isReverseDissolve = {}; + _bool isReverseDissolve = {}; - EFFECT_TYPE eEffectType = { EFFECT_TYPE::EFFECT }; + EFFECT_TYPE eEffectType = { EFFECT_TYPE::EFFECT }; - _bool isEmissiveDissolve = { false }; + _bool isEmissiveDissolve = { false }; - _bool isMaskClampSample = { false }; - _bool isNoiseColor = { false }; - _bool isNoiseAlpha = { false }; - _bool isNomalDissolve = {}; + _bool isMaskClampSample = { false }; + _bool isNoiseColor = { false }; + _bool isNoiseAlpha = { false }; + _bool isNomalDissolve = {}; - _float fSoftenExp = { 1.31429f }; - _float fSoftStrength = {}; - _float fCoreBoost = {}; - _float fRadius = {}; + _float fSoftenExp = { 1.31429f }; + _float fSoftStrength = {}; + _float fCoreBoost = {}; + _float fRadius = {}; - _float fSoftMaskEdge = {}; - _float fSoftMask = {}; + _float fSoftMaskEdge = {}; + _float fSoftMask = {}; - _bool isEmissiveDissolveReverse = { false }; - _bool isOnlyBlur = { false }; + _bool isEmissiveDissolveReverse = { false }; + _bool isOnlyBlur = { false }; - SHADER_PASS_INSTANCE_MODEL eShaderPass = { SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP }; + SHADER_PASS_INSTANCE_MODEL eShaderPass = { SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP }; - _bool isBlurNoEmissive = {}; + _bool isBlurNoEmissive = {}; - _bool isMotionBlur = {}; + _bool isMotionBlur = {}; - _bool isNoise_G = {}; - _bool isNoise_B = {}; + _bool isNoise_G = {}; + _bool isNoise_B = {}; - _float fModelBlurIntensity = { 0.f }; + _float fModelBlurIntensity = { 0.f }; - _bool isBloom = {}; - _bool isBloomDissolve = {}; - _bool isBloomReverseDissolve = {}; - _float fBloomStrength = {}; - BLOOM_TYPE eBloomType = {}; + _bool isBloom = {}; + _bool isBloomDissolve = {}; + _bool isBloomReverseDissolve = {}; + _float fBloomStrength = {}; + BLOOM_TYPE eBloomType = {}; - _float fDissolveDelay = {}; - _float fReverseDissolveDelay = {}; - _float2 vDissolveUVGainAmount = {}; - _bool isDissolveMove = {}; + _float fDissolveDelay = {}; + _float fReverseDissolveDelay = {}; + _float2 vDissolveUVGainAmount = {}; + _bool isDissolveMove = {}; - _float3 vDissolveValue = {}; /* Soft Mask , Cut Ratio*/ + _float3 vDissolveValue = {}; /* Soft Mask , Cut Ratio*/ - _float fModelDistortIntensity = {}; - _float fPadding0 = {}; + _float fModelDistortIntensity = {}; + _float fPadding0 = {}; - _float fLightDeley = {}; - _float fLightIntensity = {}; - _float isLightTime = { 0.f }; - _bool isLightDissolve = {}; + _float fLightDeley = {}; + _float fLightIntensity = {}; + _float isLightTime = { 0.f }; + _bool isLightDissolve = {}; - _bool isDissolve_G = {}; + _bool isDissolve_G = {}; - _float4 vBlurColor = {}; - _float2 vUVNoiseCutting = { 1.f ,1.f }; + _float4 vBlurColor = {}; + _float2 vUVNoiseCutting = { 1.f ,1.f }; - _float fEmissiveColorCut = {}; + _float fEmissiveColorCut = {}; - _float fRimLightPower = {}; - _float fRimLightStrength = {}; + _float fRimLightPower = {}; + _float fRimLightStrength = {}; - _float4 vNoiseColor = {}; - _float4 vRimLightColor = {}; + _float4 vNoiseColor = {}; + _float4 vRimLightColor = {}; - _float2 vMaskOffset = {}; + _float2 vMaskOffset = {}; - _bool isDiffuse_R = {}; - _bool isDiffuse_G = {}; - _bool isDiffuse_B = {}; - _bool isBlurColor = {}; + _bool isDiffuse_R = {}; + _bool isDiffuse_G = {}; + _bool isDiffuse_B = {}; + _bool isBlurColor = {}; - _bool isBlurDissolve = {}; - _bool isNomalMap = {}; - _bool isNoDissolveSmoothStep = {}; - _bool isNonSoftEffect = {}; + _bool isBlurDissolve = {}; + _bool isNomalMap = {}; + _bool isNoDissolveSmoothStep = {}; + _bool isNonSoftEffect = {}; - _float2 vDissolveSmoothRange = { 0.1f , 0.1f }; - _float2 vPadding0 = {}; + _float2 vDissolveSmoothRange = { 0.1f , 0.1f }; + _float2 vPadding0 = {}; - _bool isRimLight = {}; - _bool isMask_G = {}; - _bool isMask_B = {}; - _bool isDissolve_B = {}; + _bool isRimLight = {}; + _bool isMask_G = {}; + _bool isMask_B = {}; + _bool isDissolve_B = {}; - _float4 vPadding1 = {}; - _float4 vPadding2 = {}; - _float4 vPadding3 = {}; - _float4 vPadding4 = {}; - _float4 vPadding5 = {}; - _float4 vPadding6 = {}; - }EFFECT_INFO; + _float4 vPadding1 = {}; + _float4 vPadding2 = {}; + _float4 vPadding3 = {}; + _float4 vPadding4 = {}; + _float4 vPadding5 = {}; + _float4 vPadding6 = {}; +}EFFECT_INFO; - typedef struct tagTrailInfo - { - EFFECT_TYPE eEffectType = { EFFECT_TYPE::TRAIL }; - /* 디퓨즈 */ - _bool isDiffuse = {}; - _float fDiffuseAlpha = { 1.f }; - _float4 vColor = { 0.f ,0.f ,0.f ,1.f }; +typedef struct tagTrailInfo +{ + EFFECT_TYPE eEffectType = { EFFECT_TYPE::TRAIL }; + /* 디퓨즈 */ + _bool isDiffuse = {}; + _float fDiffuseAlpha = { 1.f }; + _float4 vColor = { 0.f ,0.f ,0.f ,1.f }; - /* 마스크 */ - _bool isMask = {}; - _float fSoftMaskEdge = {}; - _float fSoftMask = {}; + /* 마스크 */ + _bool isMask = {}; + _float fSoftMaskEdge = {}; + _float fSoftMask = {}; - /* 노이즈 */ - _bool isNoise = {}; - _bool isNoiseColor = { false }; - _bool isNoiseAlpha = { false }; - _float fNoiseStrength = {}; + /* 노이즈 */ + _bool isNoise = {}; + _bool isNoiseColor = { false }; + _bool isNoiseAlpha = { false }; + _float fNoiseStrength = {}; - /* 디스 토션 */ - _bool isDistortion = {}; - _float2 vDistortionTime = {}; - _float2 vDiffuseDistortioUVAmount = {}; - _float2 vMaskDistortionUVAmount = {}; - _float fDistortionIntensity = {}; + /* 디스 토션 */ + _bool isDistortion = {}; + _float2 vDistortionTime = {}; + _float2 vDiffuseDistortioUVAmount = {}; + _float2 vMaskDistortionUVAmount = {}; + _float fDistortionIntensity = {}; - /* 이미시브 */ - _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f }; + /* 이미시브 */ + _float4 vEmissive = { 0.f ,0.f ,0.f ,0.f }; - _float fEmissiveStrength = { 0.f }; - _float fSoftenExp = { 1.31429f }; - _float fSoftStrength = {}; - _float fCoreBoost = {}; - _float fRadius = {}; + _float fEmissiveStrength = { 0.f }; + _float fSoftenExp = { 1.31429f }; + _float fSoftStrength = {}; + _float fCoreBoost = {}; + _float fRadius = {}; - /* 블러 */ - _bool isBlur = {}; - _bool isOnlyBlur = { false }; - _float fBlurIntensity = {}; - _int iBlurWeight = {}; + /* 블러 */ + _bool isBlur = {}; + _bool isOnlyBlur = { false }; + _float fBlurIntensity = {}; + _int iBlurWeight = {}; - /* 블룸 */ - _bool isBloom = {}; + /* 블룸 */ + _bool isBloom = {}; - _bool isBloomDissolve = {}; - _bool isBloomReverseDissolve = {}; + _bool isBloomDissolve = {}; + _bool isBloomReverseDissolve = {}; - _float fBloomStrength = {}; + _float fBloomStrength = {}; - BLOOM_TYPE eBloomType = {}; - _float2 vBloomTime = {}; + BLOOM_TYPE eBloomType = {}; + _float2 vBloomTime = {}; - _int iNumVertex = { 256 }; + _int iNumVertex = { 256 }; - RENDER eRenderOrder = { RENDER::EFFECT }; - SHADER_PASS_POSTEX eShaderPass = { SHADER_PASS_POSTEX::TRAIL }; + RENDER eRenderOrder = { RENDER::EFFECT }; + SHADER_PASS_POSTEX eShaderPass = { SHADER_PASS_POSTEX::TRAIL }; - _float fDamping = { 0.5f }; - _float fRopeLength = { 0.1f }; - _float fMass = { 0.5f }; + _float fDamping = { 0.5f }; + _float fRopeLength = { 0.1f }; + _float fMass = { 0.5f }; - _float2 vDissolveTime = {}; + _float2 vDissolveTime = {}; - _float fPadding0 = {}; - _float3 vPadding2 = {}; + _float fPadding0 = {}; + _float3 vPadding2 = {}; - _float fPadding1 = {}; - _float fPadding2 = {}; - _float fPadding3 = {}; + _float fPadding1 = {}; + _float fPadding2 = {}; + _float fPadding3 = {}; - _bool isDissolve = {}; - _bool isPadding1 = {}; - _bool isPadding2 = {}; + _bool isDissolve = {}; + _bool isPadding1 = {}; + _bool isPadding2 = {}; - }TRAIL_INFO; +}TRAIL_INFO; + +struct TimeLine { + _float2 m_vTimer = {}; + _uint m_eTypeTimeLine = {}; + list m_Sockets = {}; }; +NS_END diff --git a/Jusin154_Team3D/Client/Public/CutSceneInfo.h b/Jusin154_Team3D/Client/Public/CutSceneInfo.h index ac5cb50e3..4f7dceb3e 100644 --- a/Jusin154_Team3D/Client/Public/CutSceneInfo.h +++ b/Jusin154_Team3D/Client/Public/CutSceneInfo.h @@ -10,12 +10,6 @@ NS_END NS_BEGIN(Client) -struct TimeLine { - _float2 m_vTimer = {}; - _uint m_eTypeTimeLine = {}; - list m_Sockets = {}; -}; - class CCutSceneInfo final : public CBase { private: @@ -29,7 +23,7 @@ class CCutSceneInfo final : public CBase public: void Active_Event(_string& strKey); HRESULT DeActive_ActiveEvent(_string& strKey); - void Load_Events(LEVEL eLevel); + void Load_Events(pair<_string, TimeLine>& pairTimeLine); private: CGameInstance* m_pGameInstance = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 654c9123b..57ffc4fbb 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -102,6 +102,11 @@ DECLARE_SINGLETON(CInfoInstance) void Set_Broom_Booster_Timer(_float fTimer); _float Get_Broom_Booster_Timer(); #pragma endregion +#pragma region CutScene + void Active_Event(_string& strKey); + HRESULT DeActive_ActiveEvent(_string& strKey); + void Load_Events(pair< _string, struct TimeLine>& pairTimeLine); +#pragma endregion private: CGameInstance* m_pGameInstance = { nullptr }; ID3D11Device* m_pDevice = { nullptr }; @@ -110,6 +115,7 @@ DECLARE_SINGLETON(CInfoInstance) class CPlayerInfo* m_pPlayerInfo = { nullptr }; class CMonsterInfo* m_pMonsterInfo = { nullptr }; class CMapInfo* m_pMapInfo = { nullptr }; + class CCutSceneInfo* m_pCutSceneInfo = { nullptr }; class CSkill_Data* m_pSkillInfo = { nullptr }; class CQuest_Data* m_pQuestInfo= { nullptr }; class CInteractiveInfo* m_pInteractiveInfo = { nullptr }; diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj index 67cc7ddc9..2027d57d7 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj @@ -310,6 +310,7 @@ call Update_Lib.bat + NotUsing NotUsing @@ -551,6 +552,7 @@ call Update_Lib.bat + diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters index df4eb975a..611457454 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters @@ -319,6 +319,9 @@ {7eab7292-025e-40d7-aa71-73e7a3c71ea7} + + {bd29f336-b363-41e9-91cc-d1f295015afc} + @@ -609,6 +612,9 @@ 02.Element\02.Component\06.Model\Motion_Trail + + 00.System\01.Timer\TimeSocket + @@ -1265,6 +1271,9 @@ 02.Element\02.Component\06.Model\Motion_Trail + + 00.System\01.Timer\TimeSocket + diff --git a/Jusin154_Team3D/Client/Private/TimeSocket.cpp b/Jusin154_Team3D/Engine/Private/TimeSocket.cpp similarity index 100% rename from Jusin154_Team3D/Client/Private/TimeSocket.cpp rename to Jusin154_Team3D/Engine/Private/TimeSocket.cpp diff --git a/Jusin154_Team3D/Client/Public/TimeSocket.h b/Jusin154_Team3D/Engine/Public/TimeSocket.h similarity index 92% rename from Jusin154_Team3D/Client/Public/TimeSocket.h rename to Jusin154_Team3D/Engine/Public/TimeSocket.h index 6953d9be8..c2b320d26 100644 --- a/Jusin154_Team3D/Client/Public/TimeSocket.h +++ b/Jusin154_Team3D/Engine/Public/TimeSocket.h @@ -1,14 +1,8 @@ #pragma once -#include "Client_Define.h" #include "GameInstance.h" - NS_BEGIN(Engine) class CGameObject; -NS_END - - -NS_BEGIN(Client) typedef enum class typeTimeSocket_Param { TARGET, @@ -24,7 +18,7 @@ typedef enum class typeTimeSocket_Func { END }TIMESOCKET_FUNC; -class CTimeSocket final : public CBase +class ENGINE_DLL CTimeSocket final : public CBase { private: CTimeSocket(); From d1b471c0674256b7ca357440f316f4738e588f0e Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 9 Jan 2026 13:35:56 +0900 Subject: [PATCH 02/12] [add] Basic Cinemachine --- Jusin154_Team3D/Client/Default/Client.vcxproj | 2 + .../Client/Default/Client.vcxproj.filters | 9 + .../Client/Private/CamPosition_Shoulder.cpp | 18 +- .../Client/Private/Camera_Cinematic.cpp | 301 +++++++++++++++ .../Client/Private/Camera_Debug.cpp | 9 +- .../Client/Private/Camera_Gaze.cpp | 45 +++ .../Client/Private/CutSceneInfo.cpp | 48 ++- .../Client/Private/InfoInstance.cpp | 4 +- .../Client/Private/Level_Field.cpp | 326 ++++++++++++++++- .../Client/Private/Level_GamePlay.cpp | 22 +- Jusin154_Team3D/Client/Private/Loader.cpp | 9 +- Jusin154_Team3D/Client/Private/Player.cpp | 28 ++ Jusin154_Team3D/Client/Private/Ranrok.cpp | 28 ++ Jusin154_Team3D/Client/Private/Ride_Panel.cpp | 2 +- .../Private/SpellLearn_ChaserPointer.cpp | 2 +- .../Client/Private/SpellLearn_Overlay.cpp | 2 +- .../Client/Private/SpellLearn_Slot.cpp | 2 +- .../Client/Public/Camera_Cinematic.h | 76 ++++ Jusin154_Team3D/Client/Public/Camera_Gaze.h | 12 +- Jusin154_Team3D/Client/Public/Client_Macro.h | 1 + Jusin154_Team3D/Client/Public/CutSceneInfo.h | 13 +- Jusin154_Team3D/Client/Public/InfoInstance.h | 2 +- Jusin154_Team3D/Client/Public/Level_Field.h | 11 + Jusin154_Team3D/Client/Public/Player.h | 1 + Jusin154_Team3D/Client/Public/Ranrok.h | 1 + .../Data/CutScene/RanrokCutScene.xml | 342 ++++++++++++++++++ .../Editor/Private/CamPosition_Shoulder.cpp | 16 +- .../Editor/Private/LoadingWidget.cpp | 2 +- .../Editor/Private/Mission_Icon.cpp | 2 +- Jusin154_Team3D/Editor/Private/Ride_Panel.cpp | 2 +- .../Private/SpellLearn_ChaserPointer.cpp | 2 +- .../Editor/Private/SpellLearn_Overlay.cpp | 2 +- .../Editor/Private/SpellLearn_Slot.cpp | 2 +- .../Editor/Public/CamPosition_Shoulder.h | 4 +- Jusin154_Team3D/Engine/Private/Camera.cpp | 14 +- .../Engine/Private/Camera_Manager.cpp | 6 + .../Engine/Private/ElementObject.cpp | 2 +- .../Engine/Private/GameInstance.cpp | 4 + Jusin154_Team3D/Engine/Private/Model.cpp | 30 +- Jusin154_Team3D/Engine/Private/NPCStat.cpp | 2 +- .../Engine/Private/PanelObject.cpp | 2 +- Jusin154_Team3D/Engine/Private/TimeSocket.cpp | 88 +++-- Jusin154_Team3D/Engine/Private/Transform.cpp | 74 ++++ Jusin154_Team3D/Engine/Private/UIObject.cpp | 2 +- Jusin154_Team3D/Engine/Private/tinyxml2.cpp | 2 +- Jusin154_Team3D/Engine/Public/Camera.h | 8 +- .../Engine/Public/Camera_Manager.h | 1 + Jusin154_Team3D/Engine/Public/ElementObject.h | 2 +- Jusin154_Team3D/Engine/Public/Engine_Struct.h | 4 + Jusin154_Team3D/Engine/Public/GameInstance.h | 1 + Jusin154_Team3D/Engine/Public/Model.h | 2 +- Jusin154_Team3D/Engine/Public/MyTools.h | 49 +++ Jusin154_Team3D/Engine/Public/PanelObject.h | 2 +- .../PxVehiclePhysXConstraintStates.h | 4 +- Jusin154_Team3D/Engine/Public/TimeSocket.h | 127 +++++-- Jusin154_Team3D/Engine/Public/Transform.h | 3 + Jusin154_Team3D/Engine/Public/UIObject.h | 2 +- Jusin154_Team3D/Engine/Public/Unit.h | 1 + 58 files changed, 1620 insertions(+), 160 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp create mode 100644 Jusin154_Team3D/Client/Public/Camera_Cinematic.h create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/RanrokCutScene.xml diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 300e277cd..d9a9337f9 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -175,6 +175,7 @@ call Update_Resources.bat + @@ -463,6 +464,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 265498909..bb29d792a 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -884,6 +884,9 @@ 03.InfoInstance\04.CutSceneInfo + + 02.GameObjects\Cameras\Camera_Cinematic + @@ -1833,6 +1836,9 @@ {d07bd195-0cdf-4a47-8c50-e3a88361352f} + + {581e7b08-09ae-4e52-8e84-d6ac8cc94dc9} + @@ -2670,6 +2676,9 @@ 03.InfoInstance\04.CutSceneInfo + + 02.GameObjects\Cameras\Camera_Cinematic + diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index bd50d7874..b1da4dd04 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -165,7 +165,7 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta) } else if(m_bZoomIn) { - m_pBinded_Camera->Set_Fov(XMConvertToRadians(60.f),fTimeDelta, m_bZoomIn); + m_pBinded_Camera->Set_FovSlope(XMConvertToRadians(60.f),fTimeDelta, m_bZoomIn); } } @@ -292,8 +292,20 @@ _vector CCamPosition_Shoulder::Calc_BestPosition(_fvector vCastingPosition, _gve CMyTools::SortHitsByDistance(sweepHits); // 벽면에서 팔로우 타겟을 살짝 띄우는 오프셋 - _float fCameraSurfaceOffset = 0.05f; - _float fCameraMinDistance = 0.20f; + + static _float fCameraSurfaceOffset = 0.20f; // 높이면 카메라가 벽으로부터 좀 더 안정적으로 띄워지지만 벽에 바짝 붙은 플레이어를 감당불가 + static _float fCameraMinDistance = 0.71f; // 높이면 + +#ifdef _DEBUG + GUI::Begin("CAMERA"); + if (GUI::TreeNode("MinSurfaceOffset")) { + GUI::DragFloat("fCameraMinDistance", &fCameraMinDistance, 0.01f, 0.01f, 1.f); + GUI::DragFloat("fCameraSurfaceOffset", &fCameraSurfaceOffset, 0.01f, 0.01f, 1.f); + GUI::TreePop(); + } + GUI::End(); +#endif // _DEBUG + _float fDistance = { }; _float fFinalTargetDistance = fZeroSafeDistance; for (auto& hit : sweepHits) diff --git a/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp b/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp new file mode 100644 index 000000000..987f202b0 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp @@ -0,0 +1,301 @@ +#include "pch.h" +#include "Camera_Cinematic.h" +#include "InfoInstance.h" +#include "TimeSocket.h" +#include "Layer.h" + + +CCamera_Cinematic::CCamera_Cinematic(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CCamera(pDevice, pContext) +{ +} + +CCamera_Cinematic::CCamera_Cinematic(const CCamera_Cinematic& rhs) + : CCamera(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) +{ +} + +void CCamera_Cinematic::Priority_Update(_float fTimeDelta) +{ + if (false == m_bActive) { + return; + } + m_bActive = true; + __super::Bind_Matrices(); +} + +void CCamera_Cinematic::Update(_float fTimeDelta) +{ +#ifdef _DEBUG + Describe_Entity(); +#endif // _DEBUG + if (false == m_bActive) { + return; + } + Transition(fTimeDelta); + Update_LerpTimer(fTimeDelta); + +} +void CCamera_Cinematic::Late_Update(_float fTimeDelta) +{ + if (false == m_bActive) { + return; + } +} +HRESULT CCamera_Cinematic::Render() +{ + return S_OK; +} + +void CCamera_Cinematic::Update_LerpTimer(_float fTimeDelta) +{ + if (false == m_bActive) { + return; + } + Lerp_Translation(fTimeDelta); + Lerp_FovY(fTimeDelta); + if (true == m_bEnable_LookLerp) { + m_vLookLerpTime.x += fTimeDelta; + if (m_vLookLerpTime.y <= m_vLookLerpTime.x) { + m_vLookLerpTime.x = 0.f; + XMStoreFloat3(&m_vLookPos_Src, XMLoadFloat3(&m_vLookPos_Dest)); + XMStoreFloat3(&m_vLookPos_Dest, m_pLookTarget->Get_WorldPostion()); + } + } + + if (true == m_bEnable_FollowLerp) { + m_vFollowLerpTime.x += fTimeDelta; + if (m_vFollowLerpTime.y <= m_vFollowLerpTime.x) { + m_vFollowLerpTime.x = 0.f; + XMStoreFloat3(&m_vFollowPos_Src, m_pTransformCom->Get_State(STATE::POSITION)); + XMStoreFloat3(&m_vFollowPos_Dest, m_pFollowTarget->Get_WorldPostion()); + } + } + +} + +void CCamera_Cinematic::Set_Priority(_uint iPriority) +{ + m_iPriority = iPriority; +} + +void CCamera_Cinematic::Set_LookTarget(CGameObject* pTarget) +{ + SAFE_RELEASE(m_pLookTarget); + m_pLookTarget = pTarget; + SAFE_ADDREF(m_pLookTarget); +} + +void CCamera_Cinematic::Set_FollowTarget(CGameObject* pTarget) +{ + SAFE_RELEASE(m_pFollowTarget); + m_pFollowTarget = pTarget; + SAFE_ADDREF(m_pFollowTarget); +} + +void CCamera_Cinematic::Trigger(CTimeSocket& Socket) +{ + SOCKETCONTENTS* pContents = &Socket.m_Contents; + switch (pContents->eTypeFunc) + { + case TIMESOCKET_FUNC::BIND_CAMERA: + m_pGameInstance->Bind_Camera(NEXT_LEVEL, pContents->wstrKeyName, true); + break; + case TIMESOCKET_FUNC::TRANSLATION: + m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3((_float3*)&pContents->pxTransform.p), 1.f)); + m_pTransformCom->RotationQ(pContents->pxTransform.q); + Clear_Lerp_Translation(); + break; + case TIMESOCKET_FUNC::TRANSLATION_LERP: + { + Clear_Lerp_Translation(); + Start_Lerp_Translation(pContents->vParam_11.x, pContents->pxTransform); + } break; + case TIMESOCKET_FUNC::LOOK_AT: + { + Set_LookTarget(pContents->pOtherTarget); + }break; + case TIMESOCKET_FUNC::DONT_LOOK_AT: + { + Set_LookTarget(pContents->pOtherTarget); + }break; + case TIMESOCKET_FUNC::ZOOM_IN: + { + Set_Fov(XMConvertToRadians(pContents->vParam_11.x)); + }break; + case TIMESOCKET_FUNC::ZOOM_OUT: + { + Set_Fov(XMConvertToRadians(pContents->vParam_11.x)); + }break; + case TIMESOCKET_FUNC::ZOOM_LERP: + { + Start_Lerp_FovY(pContents->vParam_11.z, { pContents->vParam_11.x, pContents->vParam_11.y }); + Set_Fov(XMConvertToRadians(pContents->vParam_11.x)); + }break; + case TIMESOCKET_FUNC::END_CINEMATIC: + { + m_pGameInstance->Bind_Camera(CURRENT_LEVEL, Socket.m_Contents.wstrKeyName, true); + }break; + default: + break; + } +} + +HRESULT CCamera_Cinematic::Initialize_Prototype() +{ + return S_OK; +} +HRESULT CCamera_Cinematic::Initialize(void* pArg) +{ + + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + if (FAILED(Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} +HRESULT CCamera_Cinematic::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} +HRESULT CCamera_Cinematic::Bind_ShaderResources() +{ + return S_OK; +} +void CCamera_Cinematic::Lerp_Translation(_float fTimeDelta) +{ + if (true == m_bLerpTranslation) { + m_vLerpTranslationTimer.x += fTimeDelta; + if (m_vLerpTranslationTimer.y < m_vLerpTranslationTimer.x) { + m_vLerpTranslationTimer.x = m_vLerpTranslationTimer.y; + m_bLerpTranslation = false; + } + _float4x4 ResultMatrix = {}; + CMyTools::MatrixLerp(&m_vLerpTranslationStart, &m_vLerpTranslationEnd, &m_vLerpRotQStart, &m_vLerpRotQEnd, + ResultMatrix, m_vLerpTranslationTimer.x / m_vLerpTranslationTimer.y); + m_pTransformCom->Set_WorldMatrix(ResultMatrix); + } +} +void CCamera_Cinematic::Start_Lerp_Translation(_float fTimeMaximum, PSX::PxTransform pxTransform) +{ + _float3 vTrans = { pxTransform.p.x , pxTransform.p.y, pxTransform.p.z }; + _float4 vRotQ = { pxTransform.q.x, pxTransform.q.y, pxTransform.q.z, pxTransform.q.w }; + Start_Lerp_Translation(fTimeMaximum, vTrans, vRotQ); +} +void CCamera_Cinematic::Start_Lerp_Translation(_float fTimeMaximum, _float3& vTrans, _float4& vRotQ) +{ + m_bLerpTranslation = { fTimeMaximum != 0 }; + m_vLerpTranslationTimer = { 0.f, fTimeMaximum }; + m_pTransformCom->Compress_WorldMatrix(m_vLerpTranslationStart, m_vLerpRotQStart); + m_vLerpTranslationEnd = vTrans; + m_vLerpRotQEnd = vRotQ; +} +void CCamera_Cinematic::Clear_Lerp_Translation() +{ + m_bLerpTranslation = { false }; + m_vLerpTranslationTimer = {}; + m_vLerpTranslationStart = {}; + m_vLerpTranslationEnd = {}; + m_vLerpRotQStart = {}; + m_vLerpRotQEnd = {}; +} +void CCamera_Cinematic::Lerp_FovY(_float fTimeDelta) +{ + if (true == m_bLerpFovY) { + m_vLerpFovYTimer.x += fTimeDelta; + if (m_vLerpFovYTimer.y < m_vLerpFovYTimer.x) { + m_vLerpFovYTimer.x = m_vLerpFovYTimer.y; + m_bLerpFovY = false; + } + Set_Fov(XMConvertToRadians(CMyTools::Lerp_f1D(m_vFovYLerp.x, m_vFovYLerp.y, m_vLerpFovYTimer.x / m_vLerpFovYTimer.y))); + } +} +void CCamera_Cinematic::Start_Lerp_FovY(_float fTimeMaximum, _float2 vRange) +{ + m_bLerpFovY = true; + m_vFovYLerp = { vRange.x, vRange.y }; + m_vLerpFovYTimer = { 0.f, fTimeMaximum }; +} +void CCamera_Cinematic::Clear_Lerp_FovY() +{ + m_bLerpFovY = false; + m_vFovYLerp = { 60.f, 60.f }; + m_vLerpFovYTimer = { 0.f, 0.f }; +} +CCamera_Cinematic* CCamera_Cinematic::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CCamera_Cinematic* pInstance = new CCamera_Cinematic(pDevice, pContext); + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CCamera_Cinematic"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} +CGameObject* CCamera_Cinematic::Clone(void* pArg, CGameObject* pOwner) +{ + CCamera_Cinematic* pInstance = new CCamera_Cinematic(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CCamera_Cinematic"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} +void CCamera_Cinematic::Free() +{ + __super::Free(); +} + +#ifdef _DEBUG + +void CCamera_Cinematic::Describe_Entity() +{ + GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG); + if (GUI::CollapsingHeader("Camera_Cinematic_Describe")) { + if (GUI::SmallButton("Trigger_RanrokIntro")) { + _string strCutSceneName = "RanrokIntro"; + m_pInfoInstance->Active_Event(strCutSceneName); + } + m_pTransformCom->Describe_Entity(); + GUI::Text("LOOK_SRC %.2f, %.2f, %.2f", m_vLookPos_Src.x, m_vLookPos_Src.y, m_vLookPos_Src.z); + GUI::Text("LOOK_DST %.2f, %.2f, %.2f", m_vLookPos_Dest.x, m_vLookPos_Dest.y, m_vLookPos_Dest.z); + GUI::Text("FOLLOW_SRC %.2f, %.2f, %.2f", m_vFollowPos_Src.x, m_vFollowPos_Src.y, m_vFollowPos_Src.z); + GUI::Text("FOLLOW_DST %.2f, %.2f, %.2f", m_vFollowPos_Dest.x, m_vFollowPos_Dest.y, m_vFollowPos_Dest.z); + + GUI::DragFloat2("VerticalAngle", (_float*)&m_vAccRotDegree_VerticalLocks, 1.f, 0.f, 89.f); + GUI::Checkbox("TransitionLerp", &m_bEnable_TransitionLerp); + if (true == m_bEnable_TransitionLerp) { + GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vTransitionTime.x, m_vTransitionTime.y); + GUI::SliderFloat("TranslationTime", &m_vTransitionTime.y, 0.1f, 3.f, "%.1f"); + } + + GUI::Checkbox("LookLerp", &m_bEnable_LookLerp); + if (true == m_bEnable_LookLerp) { + GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vLookLerpTime.x, m_vLookLerpTime.y); + GUI::SliderFloat("LookTime", &m_vLookLerpTime.y, 0.1f, 3.f, "%.1f"); + } + + GUI::Checkbox("FollowLerp", &m_bEnable_FollowLerp); + if (true == m_bEnable_FollowLerp) { + GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vFollowLerpTime.x, m_vFollowLerpTime.y); + GUI::SliderFloat("FollowTime", &m_vFollowLerpTime.y, 0.1f, 3.f, "%.1f"); + } + + } + GUI::End(); +} + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp index 2a7cfea87..78e8930ea 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp @@ -28,9 +28,6 @@ void CCamera_Debug::Priority_Update(_float fTimeDelta) _float3 vCamPos = {}; _float3 vSetPos = {}; XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION)); -#ifdef _DEBUG - GUI::Text("Cam Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z); -#endif // _DEBUG if (m_pGameInstance->Key_Up(DIK_GRAVE)) { m_bMovable = !m_bMovable; @@ -198,7 +195,11 @@ void CCamera_Debug::Describe_Entity() GUI::InputFloat3("Pos", (float*)&vPosition); } } - + GUI::End(); + GUI::Begin("CAMERA"); + if (GUI::CollapsingHeader("DebugCamera")){ + m_pTransformCom->Describe_Entity(); + } GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp index 5b6d26d31..4dd9f2729 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp @@ -128,12 +128,57 @@ void CCamera_Gaze::Toggle_AIPriority() } } +void CCamera_Gaze::Set_LookTarget(CGameObject* pTarget) +{ + SAFE_RELEASE(m_pLookTarget); + m_pLookTarget = pTarget; + SAFE_ADDREF(m_pLookTarget); +} + +void CCamera_Gaze::Set_FollowTarget(CGameObject* pTarget) +{ + SAFE_RELEASE(m_pFollowTarget); + m_pFollowTarget = pTarget; + SAFE_ADDREF(m_pFollowTarget); +} void CCamera_Gaze::Late_Update(_float fTimeDelta) { if (false == m_bActive) { return; } } +void CCamera_Gaze::Trigger(CTimeSocket& Socket) +{ + SOCKETCONTENTS* pContents = &Socket.m_Contents; + switch (pContents->eTypeFunc) + { + case TIMESOCKET_FUNC::TRANSLATION: + + break; + case TIMESOCKET_FUNC::TRANSLATION_LERP: + { + + } break; + case TIMESOCKET_FUNC::SET_PITCHLIMIT: + { + Set_RotDegreeVerticalLock({ pContents->vParam_11.x , pContents->vParam_11.y }); + }break; + case TIMESOCKET_FUNC::ZOOM_IN: + { + Set_Fov(pContents->vParam_11.x); + }break; + case TIMESOCKET_FUNC::ZOOM_OUT: + { + Set_Fov(pContents->vParam_11.x); + }break; + case TIMESOCKET_FUNC::END_CINEMATIC: + { + m_pGameInstance->Bind_Camera(CURRENT_LEVEL, Socket.m_Contents.wstrKeyName, true); + }break; + default: + break; + } +} HRESULT CCamera_Gaze::Render() { return S_OK; diff --git a/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp b/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp index 6e616f1e1..07fc375cc 100644 --- a/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp +++ b/Jusin154_Team3D/Client/Private/CutSceneInfo.cpp @@ -13,21 +13,29 @@ CCutSceneInfo::CCutSceneInfo() void CCutSceneInfo::Update(_float fTimeDelta) { _float fRatio = 0.f; - for (map<_string, TimeLine>::iterator iter = m_funcActiveEvents.begin(); iter != m_funcActiveEvents.end();) { - list* pSockets = &iter->second.m_Sockets; - iter->second.m_vTimer.x += fTimeDelta; - fRatio = CMyTools::Saturate(iter->second.m_vTimer.x / iter->second.m_vTimer.y); - - for (list::iterator socketIter = pSockets->begin(); socketIter == pSockets->end();) { - if (false == (*socketIter)->Trigger(fRatio)) { - socketIter++; - break; + for (map<_string, TimeLine*>::iterator iter = m_funcActiveEvents.begin(); iter != m_funcActiveEvents.end();) { + list* pSockets = &iter->second->m_Sockets; + iter->second->m_vTimer.x += fTimeDelta; + fRatio = CMyTools::Saturate(iter->second->m_vTimer.x / iter->second->m_vTimer.y); + for (list::iterator socketIter = pSockets->begin(); socketIter != pSockets->end();) { + GUI::Begin("CutScene"); + if (GUI::TreeNode((*socketIter)->m_Contents.strEventName.c_str())) { + GUI::Text("fRatio : %.2f", fRatio); + GUI::TreePop(); } - else { + GUI::End(); + if ((*socketIter)->Trigger(fRatio)) + { + SAFE_RELEASE((*socketIter)); socketIter = pSockets->erase(socketIter); } + else + { + break; + } } if (pSockets->empty()) { + Safe_Delete((*iter).second); iter = m_funcActiveEvents.erase(iter); } else { @@ -45,7 +53,7 @@ void CCutSceneInfo::Change_Level() void CCutSceneInfo::Active_Event(_string& strKey) { - map<_string, TimeLine>::iterator iter = m_funcWaitEvents.find(strKey); + map<_string, TimeLine*>::iterator iter = m_funcWaitEvents.find(strKey); if (iter != m_funcWaitEvents.end()) { m_funcActiveEvents.emplace(iter->first, iter->second); m_funcWaitEvents.erase(iter); @@ -54,19 +62,20 @@ void CCutSceneInfo::Active_Event(_string& strKey) HRESULT CCutSceneInfo::DeActive_ActiveEvent(_string& strKey) { - map<_string, TimeLine>::iterator iter = m_funcActiveEvents.find(strKey); + map<_string, TimeLine*>::iterator iter = m_funcActiveEvents.find(strKey); if (iter != m_funcActiveEvents.end()) { - for (list::iterator socketIter = (*iter).second.m_Sockets.begin(); - socketIter == (*iter).second.m_Sockets.end(); ++iter) { + for (list::iterator socketIter = (*iter).second->m_Sockets.begin(); + socketIter != (*iter).second->m_Sockets.end(); ++socketIter) { SAFE_RELEASE((*socketIter)); } + Safe_Delete((*iter).second); m_funcActiveEvents.erase(iter); } return S_OK; } -void CCutSceneInfo::Load_Events(pair<_string, TimeLine>& pairTimeLine) +void CCutSceneInfo::Load_Events(pair<_string, TimeLine*>& pairTimeLine) { m_funcWaitEvents.emplace(pairTimeLine); } @@ -89,15 +98,16 @@ HRESULT CCutSceneInfo::Clear_ActiveEvents() { return Clear_Events(m_funcActiveEvents); } -HRESULT CCutSceneInfo::Clear_Events(map<_string, TimeLine>& Events) +HRESULT CCutSceneInfo::Clear_Events(map<_string, TimeLine*>& Events) { - map<_string, TimeLine>::iterator iter = Events.begin(); + map<_string, TimeLine*>::iterator iter = Events.begin(); for (; iter != Events.end();) { - for (list::iterator socketIter = (*iter).second.m_Sockets.begin(); - socketIter == (*iter).second.m_Sockets.end(); ++iter) { + for (list::iterator socketIter = (*iter).second->m_Sockets.begin(); + socketIter != (*iter).second->m_Sockets.end(); ++socketIter) { SAFE_RELEASE((*socketIter)); } + Safe_Delete((*iter).second); iter = Events.erase(iter); } return S_OK; diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index 4b412c385..1e0c41981 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -28,6 +28,7 @@ void CInfoInstance::Update(_float fTimeDelta) m_pMapInfo->Update(fTimeDelta); m_pSkillInfo->Update(fTimeDelta); m_pInteractiveInfo->Update(fTimeDelta); + m_pCutSceneInfo->Update(fTimeDelta); } void CInfoInstance::Change_Level() @@ -38,6 +39,7 @@ void CInfoInstance::Change_Level() m_pSkillInfo->Change_Level(); m_pInteractiveInfo->Change_Level(); UI_Event.clear(); + m_pCutSceneInfo->Change_Level(); } CStat* CInfoInstance::Get_PlayerStatPtr() @@ -405,7 +407,7 @@ HRESULT CInfoInstance::DeActive_ActiveEvent(_string& strKey) return m_pCutSceneInfo->DeActive_ActiveEvent(strKey); } -void CInfoInstance::Load_Events(pair<_string, TimeLine>& pairTimeLine) +void CInfoInstance::Load_Events(pair<_string, TimeLine*>& pairTimeLine) { m_pCutSceneInfo->Load_Events(pairTimeLine); } diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index 4820a3961..2316271b0 100644 --- a/Jusin154_Team3D/Client/Private/Level_Field.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -7,6 +7,8 @@ #include "EffectPool.h" #include "Light_Main.h" #include "Layer.h" +#include "Camera_Cinematic.h" +#include "TimeSocket.h" #include "Camera_Debug.h" #include "Terrain.h" #include "SkyBox.h" @@ -60,6 +62,9 @@ HRESULT CLevel_Field::Initialize(void* pArg) if (FAILED(Ready_Layer_Monster())) { return E_FAIL; } + if (FAILED(Ready_Layer_CutScene())) { + return E_FAIL; + } return S_OK; } @@ -72,6 +77,11 @@ HRESULT CLevel_Field::Initialize() void CLevel_Field::Update(_float fTimeDelta) { +#ifdef _DEBUG + Describe_Entity(); +#endif // _DEBUG + + if (m_pGameInstance->Key_Up(DIK_F1)) { //m_pGameInstance->Set_LevelToChange(); @@ -206,11 +216,34 @@ HRESULT CLevel_Field::Ready_Camera() m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, CAMERA_DEBUG); -#endif // _DEBUG - if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_DEBUG, true))) { return E_FAIL; } +#endif // _DEBUG + + { + CCamera_Cinematic::Camera_Cinematic_DESC Camera_Desc{}; + Camera_Desc.fSpeedPerSec = 5.f; + Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f); + Camera_Desc.fFovy = XMConvertToRadians(60.0f); + Camera_Desc.fNear = 0.1f; + Camera_Desc.fFar = 500.f; + Camera_Desc.pCameraKey = CAMERA_CINEMATIC; + Camera_Desc.iPriority = 65; + Camera_Desc.bEnableTransitionLerp = true; + Camera_Desc.bEnableLookLerp = true; + Camera_Desc.bEnableFollowLerp = true; + Camera_Desc.vTransitionTime.y = 1.f; + Camera_Desc.pFollowTarget = { nullptr }; + Camera_Desc.pLookTarget = { nullptr }; + + CCamera_Cinematic* pCamera = { nullptr }; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &Camera_Desc, nullptr, &pCamera))) { + return E_FAIL; + } + m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, CAMERA_CINEMATIC); + } + return S_OK; } @@ -291,6 +324,27 @@ HRESULT CLevel_Field::Reday_Layer_EffectPool() return S_OK; } +HRESULT CLevel_Field::Ready_Layer_CutScene() +{ + CMonster* pMonster = { nullptr }; + CCamera* pCamera = { nullptr }; + { + CLayer* pLayer = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_MONSTER); + if (nullptr != pLayer) { + pMonster = pLayer->Get_Object(); + } + } + { + pCamera = m_pGameInstance->Get_Camera(NEXT_LEVEL, CAMERA_CINEMATIC); + } + + if (nullptr == pMonster || nullptr == pCamera) { + return E_FAIL; + } + Load_CutSceneXML("../Bin/Resources/Data/CutScene/RanrokCutScene.xml", pCamera, pMonster); + return S_OK; +} + pair> CLevel_Field::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg) { CLevel_Field* pInstance = new CLevel_Field(pDevice, pContext, eLevelID); @@ -310,3 +364,271 @@ void CLevel_Field::Free() SAFE_RELEASE(m_pInfoInstance); } + +static _bool IsTrueText(const char* text) +{ + if (!text){ return false; } + return (strcmp(text, "true") == 0) || (strcmp(text, "1") == 0); +} + +static _bool TryReadFloatAttr(tinyxml2::XMLElement* element, const _char* attrName, _float& outValue) +{ + if (!element || !attrName) { + return false; + } + + const _char* text = element->Attribute(attrName); + if (!text || text[0] == '\0'){ + return false; + } + + return (element->QueryFloatAttribute(attrName, &outValue) == tinyxml2::XML_SUCCESS); +} + +static _bool TryReadUIntAttr(tinyxml2::XMLElement* element, const _char* attrName, _uint& outValue) +{ + if (!element || !attrName) return false; + + const _char* text = element->Attribute(attrName); + if (!text || text[0] == '\0') { + return false; + } + + return (element->QueryUnsignedAttribute(attrName, &outValue) == tinyxml2::XML_SUCCESS); +} + +static void ReadPxTransform(tinyxml2::XMLElement* transformNode, PSX::PxTransform& outTransform) +{ + outTransform.p = PSX::PxVec3(0.f, 0.f, 0.f); + outTransform.q = PSX::PxQuat(0.f, 0.f, 0.f, 1.f); + + if (!transformNode) { return; } + + tinyxml2::XMLElement* rotQNode = transformNode->FirstChildElement("RotQ"); + tinyxml2::XMLElement* transNode = transformNode->FirstChildElement("Trans"); + if (!rotQNode || !transNode) { + return; + } + + TryReadFloatAttr(rotQNode, "X", outTransform.q.x); + TryReadFloatAttr(rotQNode, "Y", outTransform.q.y); + TryReadFloatAttr(rotQNode, "Z", outTransform.q.z); + TryReadFloatAttr(rotQNode, "W", outTransform.q.w); + + TryReadFloatAttr(transNode, "X", outTransform.p.x); + TryReadFloatAttr(transNode, "Y", outTransform.p.y); + TryReadFloatAttr(transNode, "Z", outTransform.p.z); +} + +static void ReadFlags16(tinyxml2::XMLElement* flagsNode, _boolean& outFlags) +{ + memset(&outFlags, 0, sizeof(_boolean)); + + if (!flagsNode) { + return; + } + + for (tinyxml2::XMLElement* flagNode = flagsNode->FirstChildElement("Flag"); + flagNode; + flagNode = flagNode->NextSiblingElement("Flag")) + { + int flagId = -1; + if (flagNode->QueryIntAttribute("id", &flagId) != tinyxml2::XML_SUCCESS) { + continue; + } + + if (flagId < 0 || flagId >= 16) { + continue; + } + + outFlags.b[flagId] = IsTrueText(flagNode->GetText()); + } +} + +static void ReadUInt4(tinyxml2::XMLElement* param10Node, _uint4& outValue) +{ + outValue = {}; + + if (!param10Node) { + return; + } + tinyxml2::XMLElement* uintNode = param10Node->FirstChildElement("uint"); + if (!uintNode) return; + + _uint temp = 0; + if (TryReadUIntAttr(uintNode, "X", temp)) outValue.x = temp; + if (TryReadUIntAttr(uintNode, "Y", temp)) outValue.y = temp; + if (TryReadUIntAttr(uintNode, "Z", temp)) outValue.z = temp; + if (TryReadUIntAttr(uintNode, "W", temp)) outValue.w = temp; +} + +static void ReadFloat4(tinyxml2::XMLElement* param11Node, _float4& outValue) +{ + outValue = {}; + + if (!param11Node) { + return; + } + tinyxml2::XMLElement* floatNode = param11Node->FirstChildElement("float"); + if (!floatNode) { + return; + } + + TryReadFloatAttr(floatNode, "X", outValue.x); + TryReadFloatAttr(floatNode, "Y", outValue.y); + TryReadFloatAttr(floatNode, "Z", outValue.z); + TryReadFloatAttr(floatNode, "W", outValue.w); +} + +void CLevel_Field::Load_CutSceneXML(const string& path, CCamera* pCamera, CMonster* pMonster) +{ + tinyxml2::XMLDocument doc; + if (doc.LoadFile(path.c_str()) != tinyxml2::XML_SUCCESS){ + return; + } + + TimeLine* pTimeLine = new TimeLine(); + tinyxml2::XMLElement* pContentsNode = doc.FirstChildElement("RanrokIntro"); + if (!pContentsNode){ + return; + } + + pTimeLine->m_vTimer.y = 0.f; + pContentsNode->QueryFloatAttribute("fDuration", &pTimeLine->m_vTimer.y); + + pTimeLine->m_Sockets.clear(); + + for (tinyxml2::XMLElement* pSocketNode = pContentsNode->FirstChildElement("Socket"); + pSocketNode; pSocketNode = pSocketNode->NextSiblingElement("Socket")) + { + SOCKETCONTENTS SocketContents = {}; + + SocketContents .fRatio = 0.f; + _int fStartPosition = 0; + pSocketNode->QueryIntAttribute("fStartPosition", &fStartPosition); + SocketContents.fRatio = CMyTools::Saturate(fStartPosition / pTimeLine->m_vTimer.y); + // Info + tinyxml2::XMLElement* pInfoNode = pSocketNode->FirstChildElement("Info"); + if (pInfoNode != nullptr) + { + const _char* pEventNameText = pInfoNode->Attribute("strEventName"); + SocketContents.strEventName = pEventNameText ? pEventNameText : ""; + + SocketContents.eTypeParam = TIMESOCKET_PARAM::END; + if (const _char* pTypeText = pInfoNode->Attribute("eTypeParam")) + { + CTimeSocket::TryParse_TimeSocketParam(string_view(pTypeText), SocketContents.eTypeParam); + } + + SocketContents.eTypeFunc = TIMESOCKET_FUNC::END; + if (const _char* pFuncText = pInfoNode->Attribute("eTypeFunc")) + { + CTimeSocket::TryParse_TimeSocketFunc(string_view(pFuncText), SocketContents.eTypeFunc); + } + + SocketContents.pEventTarget = nullptr; + SocketContents.funcEvent = nullptr; + + if (const _char* pTargetText = pInfoNode->Attribute("pTarget")) + { + if (strcmp(pTargetText, "CAMERA_CINEMATIC") == 0) + { + CCamera* pEventTarget = pCamera; + SocketContents.pEventTarget = pEventTarget; + SocketContents.funcEvent = [pEventTarget](CTimeSocket& Socket) { pEventTarget->Trigger(Socket); }; + } + else if (strcmp(pTargetText, "CAMERA_SHOULDER") == 0) + { + CCamera* pEventTarget = m_pGameInstance->Get_Camera(NEXT_LEVEL, CAMERA_SHOULDER); + SocketContents.pEventTarget = pEventTarget; + SocketContents.funcEvent = [pEventTarget](CTimeSocket& Socket) { pEventTarget->Trigger(Socket); }; + } + else if (strcmp(pTargetText, "ACTOR_PLAYER") == 0) + { + CPlayer* pEventTarget = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_PLAYER)->Get_Object(); + SocketContents.pEventTarget = pEventTarget; + SocketContents.funcEvent = [pEventTarget](CTimeSocket& Socket) { pEventTarget->Trigger(Socket); }; + } + } + } + + // -------- Param_0 ---------- + tinyxml2::XMLElement* pParam0Node = pSocketNode->FirstChildElement("Param_0"); + if (nullptr != pParam0Node) + { + switch (SocketContents.eTypeParam) + { + case TIMESOCKET_PARAM::TARGET: + { + tinyxml2::XMLElement* pOtherTargetNode = pParam0Node->FirstChildElement("OtherTarget"); + if (!pOtherTargetNode) break; + + const _char* pLayerNameText = pOtherTargetNode->Attribute("Layer"); + const _char* pTypeIdText = pOtherTargetNode->Attribute("TypeID"); + + if (!pLayerNameText || !pTypeIdText) break; + if (pLayerNameText[0] == '\0' || pTypeIdText[0] == '\0') break; + + SocketContents.wstrLayerName = CMyTools::ToWstring(pLayerNameText); + SocketContents.wstrKeyName = CMyTools::ToWstring(pTypeIdText); + + if (string_view(pTypeIdText) == "Ranrok") + { + SocketContents.pOtherTarget = + m_pGameInstance->Get_Layer(NEXT_LEVEL, SocketContents.wstrLayerName)->Get_Object(); + } + else if (string_view(pTypeIdText) == "CAMERA_CINEMATIC") + { + SocketContents.pOtherTarget = pCamera; + } + else if (string_view(pTypeIdText) == "CAMERA_SHOULDER") + { + SocketContents.pOtherTarget = m_pGameInstance->Get_Camera(NEXT_LEVEL, CAMERA_SHOULDER); + } + + break; + } + + case TIMESOCKET_PARAM::TRANSFORM: + { + tinyxml2::XMLElement* pTransformNode = pParam0Node->FirstChildElement("Transform"); + ReadPxTransform(pTransformNode, SocketContents.pxTransform); + break; + } + case TIMESOCKET_PARAM::END: + default: + break; + } + } + + // -------- vFlags / Param_10 / Param_11 ---------- + ReadFlags16(pSocketNode->FirstChildElement("vFlags"), SocketContents.vFlags); + ReadUInt4(pSocketNode->FirstChildElement("Param_10"), SocketContents.vParam_10); + ReadFloat4(pSocketNode->FirstChildElement("Param_11"), SocketContents.vParam_11); + CTimeSocket* pSocket = CTimeSocket::Create(&SocketContents); + if (!pSocket) { + continue; + } + pTimeLine->m_Sockets.push_back(pSocket); + } + pTimeLine->m_Sockets.sort([](CTimeSocket* a, CTimeSocket* b) { + return a->m_Contents.fRatio < b->m_Contents.fRatio; + }); + pair<_string, TimeLine*> pairResult = { _string(pContentsNode->Name()), pTimeLine }; + m_pInfoInstance->Load_Events(pairResult); +} + +#ifdef _DEBUG +void CLevel_Field::Describe_Entity() +{ + GUI::Begin("CutScene"); + if (GUI::Button("ReadyCutScene")) { + Ready_Layer_CutScene(); + } + if (GUI::Button("DeActiveCutScene")) { + _string strDeActiveEvent = "RanrokIntro"; + m_pInfoInstance->DeActive_ActiveEvent(strDeActiveEvent); + } + GUI::End(); +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 49cd0d828..cc15acd36 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -302,8 +302,8 @@ HRESULT CLevel_GamePlay::Ready_Background() isReady_Hogwart = false; #endif // #ifdef 기무리 - isReady_Background = true; - isReady_Hogsmeade = true; + isReady_Background = false; + isReady_Hogsmeade = false; isReady_Hogwart = false; #endif // #ifdef 나 @@ -811,8 +811,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) isLoad_NPC = false; #endif // #ifdef 기무리 - isLoad_NPC = true; - isLoad_RandomNPC = true; + isLoad_NPC = false; + isLoad_RandomNPC = false; #endif // #ifdef 나 isLoad_RandomNPC = true; @@ -859,12 +859,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) } } } - } - CHuman_Duelist::DUELISTDESC DuelistDesc = {}; - DuelistDesc.vPos = _float4(-21.f, 0.f, -16.f, 1.f); - DuelistDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &DuelistDesc))) { - return E_FAIL; + CHuman_Duelist::DUELISTDESC DuelistDesc = {}; + DuelistDesc.vPos = _float4(-21.f, 0.f, -16.f, 1.f); + DuelistDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &DuelistDesc))) { + return E_FAIL; + } } @@ -911,7 +911,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster() isLoad_Monster = false; #endif // #ifdef 기무리 - isLoad_Monster = true; + isLoad_Monster = false; #endif // #ifdef 나 diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 52f42fee5..5d50436f8 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -10,6 +10,7 @@ #include "Broom.h" #include "Camera_Gaze.h" +#include "Camera_Cinematic.h" #include "CamPosition_Arm.h" #include "CamPosition_Shoulder.h" #include "CamPosition_Socket.h" @@ -417,10 +418,10 @@ HRESULT CLoader::Loading_For_GamePlay() isLoad_UI_SEQUANTIAL = false; #endif // #ifdef 기무리 - isLoad_Background = true; + isLoad_Background = false; isLoad_Hogwart = false; isLoad_UI_SEQUANTIAL = false; - isLoad_NPC = true; + isLoad_NPC = false; isLoad_Monster = true; #endif // #ifdef 나 @@ -3589,6 +3590,10 @@ HRESULT CLoader::Loading_For_GamePlay() if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamera_Gaze::Create(m_pDevice, m_pContext)))) return E_FAIL; + /* For.Prototype_GameObject_Camera_Cinematic */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamera_Cinematic::Create(m_pDevice, m_pContext)))) + return E_FAIL; + /* For.Prototype_GameObject_CamPosition_Player */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Socket::Create(m_pDevice, m_pContext)))) return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 251b0fff1..c9debecd9 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -14,6 +14,7 @@ #include "Layer.h" #include "MapElement_Interactable.h" #include "Monster.h" +#include "TimeSocket.h" #include "PlayerRobe.h" #include "RaceRing.h" #include "Wand.h" @@ -475,6 +476,33 @@ void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller) { } +void CPlayer::Trigger(CTimeSocket& Socket) +{ + SOCKETCONTENTS* pContents = &Socket.m_Contents; + switch (pContents->eTypeFunc) + { + case TIMESOCKET_FUNC::TRANSLATION: + { + _vector vNewPos = XMVectorSetW(XMLoadFloat3((_float3*)&pContents->pxTransform.p), 1.f); + m_pTransformCom->Set_State(STATE::POSITION, vNewPos); + m_pCharacter_Controller->Set_Position(vNewPos); + m_pTransformCom->RotationQ(pContents->pxTransform.q); + m_pTransformCom->RewindMomentum(); + } + break; + case TIMESOCKET_FUNC::TRANSLATION_LERP: + { + + } break; + case TIMESOCKET_FUNC::SET_ANIMSTATE: + { + + } break; + default: + break; + } +} + void CPlayer::Start_CameraShake(_float fTime, _float fIntense) { m_vCameraShakeTimer.x = 0.f; diff --git a/Jusin154_Team3D/Client/Private/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp index 610a11ed5..4c6de3160 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp @@ -10,6 +10,8 @@ #include "Layer.h" #include "TrailObject.h" #include "MapElement_Interactable.h" +#include "TimeSocket.h" +#include "Layer.h" #pragma region STATE @@ -275,6 +277,32 @@ HRESULT CRanrok::Render_Shadow(SHADOW eType) return S_OK; } +void CRanrok::Trigger(CTimeSocket& Socket) +{ + SOCKETCONTENTS* pContents = &Socket.m_Contents; + switch (pContents->eTypeFunc) + { + case TIMESOCKET_FUNC::TRANSLATION: + { + + }break; + case TIMESOCKET_FUNC::TRANSLATION_LERP: + { + + }break; + case TIMESOCKET_FUNC::SET_ANIMSTATE: + { + //m_pFSM->Set_State(FSMSTATE::CUTSCENE); + }break; + case TIMESOCKET_FUNC::SET_FSMSTATE: + { + //m_pModelCom->Set_AnimationIndex(); + }break; + default: + break; + } +} + HRESULT CRanrok::Render_MotionTrail(ID3D11ShaderResourceView* pSRV) { for (_uint i = ENUM_CLASS(RANROK_MESH_ORDER::WINGS); i < ENUM_CLASS(RANROK_MESH_ORDER::END); ++i) diff --git a/Jusin154_Team3D/Client/Private/Ride_Panel.cpp b/Jusin154_Team3D/Client/Private/Ride_Panel.cpp index 9c7a6276c..1840a9252 100644 --- a/Jusin154_Team3D/Client/Private/Ride_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Ride_Panel.cpp @@ -126,7 +126,7 @@ void CRide_Panel::Update(_float fTimeDelta) if (m_bHover == true) { - Start_Lerp(fTimeDelta); + Start_Lerp_Translation(fTimeDelta); } else { diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_ChaserPointer.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_ChaserPointer.cpp index 05a2bcc0a..d8cc07aa5 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_ChaserPointer.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_ChaserPointer.cpp @@ -167,7 +167,7 @@ void CSpellLearn_ChaserPointer::Line(_float fTime) { m_vLerp_Position = m_MoveLine[m_iCurrentLine]; - if (Start_Lerp(fTime) == true) + if (Start_Lerp_Translation(fTime) == true) { if (m_iCurrentLine < m_iLineIndex - 1) { diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Overlay.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Overlay.cpp index bff6981fc..02cb8fc25 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_Overlay.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Overlay.cpp @@ -127,7 +127,7 @@ void CSpellLearn_Overlay::Update(_float fTimeDelta) if (m_fSizeUp == true) { - if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true) + if (Start_Lerp_Translation(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true) { m_fSizeUp = false; } diff --git a/Jusin154_Team3D/Client/Private/SpellLearn_Slot.cpp b/Jusin154_Team3D/Client/Private/SpellLearn_Slot.cpp index 5fcebb92a..db036793d 100644 --- a/Jusin154_Team3D/Client/Private/SpellLearn_Slot.cpp +++ b/Jusin154_Team3D/Client/Private/SpellLearn_Slot.cpp @@ -97,7 +97,7 @@ void CSpellLearn_Slot::Update(_float fTimeDelta) if (m_fSizeUp == true) { - if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true) + if (Start_Lerp_Translation(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true) { m_fSizeUp = false; } diff --git a/Jusin154_Team3D/Client/Public/Camera_Cinematic.h b/Jusin154_Team3D/Client/Public/Camera_Cinematic.h new file mode 100644 index 000000000..15d4153ca --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Camera_Cinematic.h @@ -0,0 +1,76 @@ +#pragma once + +#include "Client_Define.h" +#include "Camera.h" + +NS_BEGIN(Client) + +class CCamera_Cinematic final : public CCamera +{ +public: + typedef struct tagCamera_Cinematic : public CCamera::CAMERA_DESC + { + }Camera_Cinematic_DESC; +private: + CCamera_Cinematic(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCamera_Cinematic(const CCamera_Cinematic& rhs); + virtual ~CCamera_Cinematic() = 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; + virtual void Trigger(CTimeSocket& Socket)override; + +public: + void Update_LerpTimer(_float fTimeDelta); + void Set_Priority(_uint iPriority); + void Set_LookTarget(CGameObject* pTarget); + void Set_FollowTarget(CGameObject* pTarget); + + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Bind_ShaderResources() override; + + void Lerp_Translation(_float fTimeDelta); + void Start_Lerp_Translation(_float fTimeMaximum, PSX::PxTransform pxTransform); + void Start_Lerp_Translation(_float fTimeMaximum, _float3& vTrans, _float4& vRotQ); + void Clear_Lerp_Translation(); + + + void Lerp_FovY(_float fTimeDelta); + void Start_Lerp_FovY(_float fTimeMaximum, _float2 vRange); + void Clear_Lerp_FovY(); + +private: + CInfoInstance* m_pInfoInstance = { nullptr }; + + _bool m_bLerpTranslation = { false }; + _float2 m_vLerpTranslationTimer = {}; + + _float3 m_vLerpTranslationStart = {}; + _float3 m_vLerpTranslationEnd = {}; + _float4 m_vLerpRotQStart = {}; + _float4 m_vLerpRotQEnd = {}; + + _bool m_bLerpFovY = { false }; + _float2 m_vFovYLerp = { 60.f, 60.f }; + _float2 m_vLerpFovYTimer = { }; + +public: + static CCamera_Cinematic* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + virtual void Free() override; + + +#ifdef _DEBUG + void Describe_Entity() override; + +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Camera_Gaze.h b/Jusin154_Team3D/Client/Public/Camera_Gaze.h index e1f890778..3c0ea2ae3 100644 --- a/Jusin154_Team3D/Client/Public/Camera_Gaze.h +++ b/Jusin154_Team3D/Client/Public/Camera_Gaze.h @@ -2,6 +2,7 @@ #include "Client_Define.h" #include "Camera.h" +#include "TimeSocket.h" NS_BEGIN(Client) @@ -19,14 +20,17 @@ class CCamera_Gaze final : public CCamera public: virtual void Priority_Update(_float fTimeDelta) override; virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + virtual void Trigger(class CTimeSocket& Socket)override; + virtual HRESULT Render() override; void Update_LerpTimer(_float fTimeDelta); void Enable_FollowLerp(); void Enable_LookLerp(); - void Sync_Follow(_bool bSink); + void Sync_Follow(_bool bSync); void Toggle_Priority(); void Toggle_AIPriority(); - virtual void Late_Update(_float fTimeDelta) override; - virtual HRESULT Render() override; + void Set_LookTarget(CGameObject* pTarget); + void Set_FollowTarget(CGameObject* pTarget); private: virtual HRESULT Initialize_Prototype() override; @@ -36,7 +40,7 @@ class CCamera_Gaze final : public CCamera _bool m_bSyncFollow = { false }; private: CInfoInstance* m_pInfoInstance = { nullptr }; - + public: static CCamera_Gaze* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Client_Macro.h b/Jusin154_Team3D/Client/Public/Client_Macro.h index eff67e7d3..d3fde4fa2 100644 --- a/Jusin154_Team3D/Client/Public/Client_Macro.h +++ b/Jusin154_Team3D/Client/Public/Client_Macro.h @@ -34,6 +34,7 @@ namespace Client { #define CAMERA_SHOULDER TEXT("CAMERA_SHOULDER") #define CAMERA_AI TEXT("CAMERA_AI") #define CAMERA_MODEL TEXT("CAMERA_MODEL") +#define CAMERA_CINEMATIC TEXT("CAMERA_CINEMATIC") #pragma endregion #pragma region COMPONENT diff --git a/Jusin154_Team3D/Client/Public/CutSceneInfo.h b/Jusin154_Team3D/Client/Public/CutSceneInfo.h index 4f7dceb3e..2e56d96ac 100644 --- a/Jusin154_Team3D/Client/Public/CutSceneInfo.h +++ b/Jusin154_Team3D/Client/Public/CutSceneInfo.h @@ -23,7 +23,7 @@ class CCutSceneInfo final : public CBase public: void Active_Event(_string& strKey); HRESULT DeActive_ActiveEvent(_string& strKey); - void Load_Events(pair<_string, TimeLine>& pairTimeLine); + void Load_Events(pair<_string, TimeLine*>& pairTimeLine); private: CGameInstance* m_pGameInstance = { nullptr }; @@ -31,13 +31,16 @@ class CCutSceneInfo final : public CBase ID3D11Device* m_pDevice = { nullptr }; ID3D11DeviceContext* m_pContext = { nullptr }; - map<_string, TimeLine> m_funcActiveEvents = {}; - map<_string, TimeLine> m_funcWaitEvents = {}; + map<_string, TimeLine*> m_funcActiveEvents = {}; + map<_string, TimeLine*> m_funcWaitEvents = {}; private: HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); - HRESULT Clear_ActiveEvents(); - HRESULT Clear_Events(map<_string, TimeLine>&Events); +#ifdef _DEBUG +public: +#endif // _DEBUG + HRESULT Clear_ActiveEvents(); + HRESULT Clear_Events(map<_string, TimeLine*>&Events); HRESULT Clear_AllEvents(); diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 57ffc4fbb..a6b385d62 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -105,7 +105,7 @@ DECLARE_SINGLETON(CInfoInstance) #pragma region CutScene void Active_Event(_string& strKey); HRESULT DeActive_ActiveEvent(_string& strKey); - void Load_Events(pair< _string, struct TimeLine>& pairTimeLine); + void Load_Events(pair< _string, struct TimeLine*>& pairTimeLine); #pragma endregion private: CGameInstance* m_pGameInstance = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Level_Field.h b/Jusin154_Team3D/Client/Public/Level_Field.h index 978ec5d8b..26dc28a85 100644 --- a/Jusin154_Team3D/Client/Public/Level_Field.h +++ b/Jusin154_Team3D/Client/Public/Level_Field.h @@ -3,6 +3,10 @@ #include "Client_Define.h" #include "Level.h" +NS_BEGIN(Engine) +class CCamera; +NS_END + NS_BEGIN(Client) class CLevel_Field final : public CLevel @@ -35,10 +39,17 @@ class CLevel_Field final : public CLevel HRESULT Ready_Layer_Effect(const _wstring& strLayerTag); HRESULT Ready_Layer_Monster(); HRESULT Reday_Layer_EffectPool(); + HRESULT Ready_Layer_CutScene(); public: static pair> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg); virtual void Free() override; + + void Load_CutSceneXML(const string& path, CCamera* pCamera, class CMonster* pMonster); + +#ifdef _DEBUG + virtual void Describe_Entity(); +#endif // _DEBUG }; NS_END diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h index f93dfd709..1f89d59ac 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -27,6 +27,7 @@ class CPlayer final : public CUnit virtual HRESULT Render_Shadow(SHADOW eType) override; virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override; virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override; + virtual void Trigger(class CTimeSocket& Socket)override; _bool Get_Aim() { return m_bAim; } void Set_SpellHit(_bool bHit) { m_bSpellHit = bHit; } void Set_Shield(_bool bShield) { m_bShield = bShield; } diff --git a/Jusin154_Team3D/Client/Public/Ranrok.h b/Jusin154_Team3D/Client/Public/Ranrok.h index 7a4dbe679..b4efcdc18 100644 --- a/Jusin154_Team3D/Client/Public/Ranrok.h +++ b/Jusin154_Team3D/Client/Public/Ranrok.h @@ -50,6 +50,7 @@ class CRanrok final : public CMonster virtual HRESULT Render() override; virtual HRESULT Render_OutLine() override; virtual HRESULT Render_Shadow(SHADOW eType) override; + virtual void Trigger(CTimeSocket& Socket)override; HRESULT Render_MotionTrail(ID3D11ShaderResourceView* pSRV); virtual _vector Get_LockOnPos() override; virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/RanrokCutScene.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/RanrokCutScene.xml new file mode 100644 index 000000000..15253a742 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/RanrokCutScene.xml @@ -0,0 +1,342 @@ + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp index 9eea44ab3..aacbd8c8d 100644 --- a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp @@ -111,8 +111,8 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta) if (m_pGameInstance->Key_Up(DIK_P)) { m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio; m_vShoulderStartRatio.x *= -1.f; - m_bLerp = true; - m_vLerpTimer.x = 0.f; + m_bLerpTranslation = true; + m_vLerpTranslationTimer.x = 0.f; } } @@ -121,12 +121,12 @@ void CCamPosition_Shoulder::Late_Update(_float fTimeDelta) if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) { return; } - if (true == m_bLerp) { - m_vLerpTimer.x += fTimeDelta; - XMStoreFloat3(&m_vShoulderPosRatio, XMVectorLerp(XMLoadFloat3(&m_vShoulderStartRatio), XMLoadFloat3(&m_vShoulderOtherRatio), m_vLerpTimer.x / m_vLerpTimer.y)); - if (m_vLerpTimer.x > m_vLerpTimer.y) { - m_bLerp = false; - m_vLerpTimer.x = 0.f; + if (true == m_bLerpTranslation) { + m_vLerpTranslationTimer.x += fTimeDelta; + XMStoreFloat3(&m_vShoulderPosRatio, XMVectorLerp(XMLoadFloat3(&m_vShoulderStartRatio), XMLoadFloat3(&m_vShoulderOtherRatio), m_vLerpTranslationTimer.x / m_vLerpTranslationTimer.y)); + if (m_vLerpTranslationTimer.x > m_vLerpTranslationTimer.y) { + m_bLerpTranslation = false; + m_vLerpTranslationTimer.x = 0.f; m_vShoulderPosRatio = m_vShoulderOtherRatio; } diff --git a/Jusin154_Team3D/Editor/Private/LoadingWidget.cpp b/Jusin154_Team3D/Editor/Private/LoadingWidget.cpp index 9adb078a0..e203437b0 100644 --- a/Jusin154_Team3D/Editor/Private/LoadingWidget.cpp +++ b/Jusin154_Team3D/Editor/Private/LoadingWidget.cpp @@ -90,7 +90,7 @@ void CLoadingWidget::Update(_float fTimeDelta) } if (m_bLerpOn == true) { - Start_Lerp(m_fMoveSpeed); + Start_Lerp_Translation(m_fMoveSpeed); } if (m_bLerpOff == true) diff --git a/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp b/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp index 4c8f7af6e..baf3037f8 100644 --- a/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp +++ b/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp @@ -101,7 +101,7 @@ void CMission_Icon::Update(_float fTimeDelta) } if (m_bLerpOn == true) { - Start_Lerp(m_fMoveSpeed); + Start_Lerp_Translation(m_fMoveSpeed); } if (m_bLerpOff == true) diff --git a/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp index 0e4a565ad..193ac237e 100644 --- a/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Ride_Panel.cpp @@ -111,7 +111,7 @@ void CRide_Panel::Update(_float fTimeDelta) if (m_bHover == true) { - Start_Lerp(fTimeDelta); + Start_Lerp_Translation(fTimeDelta); } else { diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_ChaserPointer.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_ChaserPointer.cpp index 5c760c82f..157ede96e 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn_ChaserPointer.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_ChaserPointer.cpp @@ -165,7 +165,7 @@ void CSpellLearn_ChaserPointer::Line(_float fTime) { m_vLerp_Position = m_MoveLine[m_iCurrentLine]; - if (Start_Lerp(fTime) == true) + if (Start_Lerp_Translation(fTime) == true) { if (m_iCurrentLine < m_iLineIndex - 1) { diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Overlay.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Overlay.cpp index 7c04ff286..591a9e3c1 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn_Overlay.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Overlay.cpp @@ -125,7 +125,7 @@ void CSpellLearn_Overlay::Update(_float fTimeDelta) if (m_fSizeUp == true) { - if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true) + if (Start_Lerp_Translation(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true) { m_fSizeUp = false; } diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Slot.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Slot.cpp index f7d879eaf..5c30daa21 100644 --- a/Jusin154_Team3D/Editor/Private/SpellLearn_Slot.cpp +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Slot.cpp @@ -95,7 +95,7 @@ void CSpellLearn_Slot::Update(_float fTimeDelta) if (m_fSizeUp == true) { - if (Start_Lerp(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true) + if (Start_Lerp_Translation(fTimeDelta * m_fTimeMult * m_fMoveSpeed) == true) { m_fSizeUp = false; } diff --git a/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h b/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h index a5b431472..14cbd0a93 100644 --- a/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h +++ b/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h @@ -46,8 +46,8 @@ class CCamPosition_Shoulder final : public CCamPosition _float3 m_vShoulderStartRatio = { 1.f, 2.f, -1.f }; _float3 m_vShoulderOtherRatio = { 1.f, 2.f, -1.f }; - _bool m_bLerp = { false }; - _float2 m_vLerpTimer = { 0.f, 1.f }; + _bool m_bLerpTranslation = { false }; + _float2 m_vLerpTranslationTimer = { 0.f, 1.f }; _float2 m_vAccRotDegrees = { 0.f, 0.f }; _float2 m_vAccRealDegrees = { 0.f, 0.f }; diff --git a/Jusin154_Team3D/Engine/Private/Camera.cpp b/Jusin154_Team3D/Engine/Private/Camera.cpp index 96886d17a..664d55f04 100644 --- a/Jusin154_Team3D/Engine/Private/Camera.cpp +++ b/Jusin154_Team3D/Engine/Private/Camera.cpp @@ -139,6 +139,13 @@ void CCamera::EnableTransition(_float fTransitionTime) m_vTransitionTime.y = fTransitionTime; } +void CCamera::DisableTransition() +{ + m_bIsCurrentTransition = false; + m_vTransitionTime.x = 0.f; + m_vTransitionTime.y = 1.f; +} + void CCamera::Set_RotDegreeVerticalLock(_float2 vVerticalLock) { m_vAccRotDegree_VerticalLocks = vVerticalLock; @@ -168,7 +175,7 @@ void CCamera::ZoomIn(_float fTimeDelta) } -void CCamera::Set_Fov(_float fFovy, _float fTimeDelta,_bool& bZoomIn) +void CCamera::Set_FovSlope(_float fFovy, _float fTimeDelta,_bool& bZoomIn) { if (fFovy > m_fFovy) { @@ -192,6 +199,11 @@ void CCamera::Set_Fov(_float fFovy, _float fTimeDelta,_bool& bZoomIn) } } +void CCamera::Set_Fov(_float fFovy) +{ + m_fFovy = fFovy; +} + _float CCamera::Get_Fov() { return m_fFovy; diff --git a/Jusin154_Team3D/Engine/Private/Camera_Manager.cpp b/Jusin154_Team3D/Engine/Private/Camera_Manager.cpp index 77fd7a9e3..fca41334d 100644 --- a/Jusin154_Team3D/Engine/Private/Camera_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/Camera_Manager.cpp @@ -58,6 +58,12 @@ HRESULT CCamera_Manager::Bind_Camera(_uint iLevel, const _wstring& wstrCameraKey return S_OK; } +CCamera* CCamera_Manager::Get_Camera(_uint iLevel, const _wstring& strCameraKey) +{ + CCamera* pOut = Find_Camera(iLevel, strCameraKey); + return pOut; +} + HRESULT CCamera_Manager::IsBinded_Camera(const _wstring& wstrCameraKey) { if (m_wstrCurrentCameraKey == wstrCameraKey) { diff --git a/Jusin154_Team3D/Engine/Private/ElementObject.cpp b/Jusin154_Team3D/Engine/Private/ElementObject.cpp index f06ff23ee..4dfbfdeb8 100644 --- a/Jusin154_Team3D/Engine/Private/ElementObject.cpp +++ b/Jusin154_Team3D/Engine/Private/ElementObject.cpp @@ -137,7 +137,7 @@ _float CElementObject::Get_Nine_Slice_Bottom() return m_vNine_Slice.w; } -_bool CElementObject::Start_Lerp(_float fTimeDelta) +_bool CElementObject::Start_Lerp_Translation(_float fTimeDelta) { _vector Pos = XMLoadFloat4(&m_fCurrent_Position); diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index 8950b472d..eb3b004cb 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -984,6 +984,10 @@ HRESULT CGameInstance::Add_Camera(_uint iLevel, CCamera* pCamera, const _wstring { return m_pCamera_Manager->Add_Camera(iLevel, pCamera, strCameraKey); } +CCamera* CGameInstance::Get_Camera(_uint iLevel, const _wstring& strCameraKey) +{ + return m_pCamera_Manager->Get_Camera(iLevel, strCameraKey); +} HRESULT CGameInstance::Bind_Camera(_uint iLevel, const _wstring& strCameraKey, _bool bIgnorePriority) { return m_pCamera_Manager->Bind_Camera(iLevel, strCameraKey, bIgnorePriority); diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index 3294aeaf5..62844e783 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -219,9 +219,9 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) if (m_iPreAnimIndex >= 0 && m_iPreAnimIndex != m_iCurrentAnimIndex) { m_fBlendTime += fTimeDelta; - m_fRatio = (m_fBlendTime / m_fBlendDuration); - if (m_fRatio > 1.f) { - m_fRatio = 1.f; + fRatio = (m_fBlendTime / m_fBlendDuration); + if (fRatio > 1.f) { + fRatio = 1.f; } CAnimation* pCurAnim = m_Animations[m_iCurrentAnimIndex]; @@ -229,9 +229,9 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) m_bIsFinishedAnim = pCurAnim->Update_TransformationMatrices(m_Bones, m_bIsLoop, fTimeDelta, true, m_iBoneMask, m_OutScale,m_OutRotation, m_OutTranslation,m_iRootBoneIndex); - pCurAnim->InterpAnim(pPreAnim, m_Bones, m_fRatio); + pCurAnim->InterpAnim(pPreAnim, m_Bones, fRatio); - if (m_fRatio >= 1.f) + if (fRatio >= 1.f) { m_iPreAnimIndex = m_iCurrentAnimIndex; m_fBlendTime = 0.f; @@ -263,7 +263,7 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) if (m_bRatio) { - Update_RootBone(m_fAmount * m_fRatio); + Update_RootBone(m_fAmount * fRatio); } else { @@ -290,9 +290,9 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform) if (m_bQueuedAnim) { - if (m_fRatio >= 1.f) + if (fRatio >= 1.f) { - m_fRatio = 1.f; + fRatio = 1.f; m_iPreAnimIndex = m_iCurrentAnimIndex; m_fBlendTime = 0.f; @@ -315,8 +315,8 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) if (m_iPreAnimIndex >= 0 && m_iPreAnimIndex != m_iCurrentAnimIndex) { m_fBlendTime += fTimeDelta; - m_fRatio = (m_fBlendTime / m_fBlendDuration); - if (m_fRatio > 1.f) m_fRatio = 1.f; + fRatio = (m_fBlendTime / m_fBlendDuration); + if (fRatio > 1.f) fRatio = 1.f; m_fSecondBlendTime += fTimeDelta; m_fSecondRatio = (m_fSecondBlendTime / m_fSecondBlendDuration); @@ -333,7 +333,7 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) m_Animations[m_iCurrSecondAnimIndex]->InterpSecondAnim(m_Animations[m_iCurrentAnimIndex], m_iBoneMask, m_Bones, m_fSecondRatio* 5.f); - if (m_fRatio >= 1.f) + if (fRatio >= 1.f) { m_iPreAnimIndex = m_iCurrentAnimIndex; m_fBlendTime = 0.f; @@ -387,7 +387,7 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) } if (m_bRatio) { - Update_RootBone(m_fAmount * m_fRatio); + Update_RootBone(m_fAmount * fRatio); } else { @@ -441,7 +441,7 @@ _bool CModel::Play_Dual_Anim(_float fTimeDelta, CTransform* pTransform) _bool CModel::IsBlending() const { return m_iPreAnimIndex != m_iCurrentAnimIndex && - m_fRatio < 1.f; + fRatio < 1.f; } @@ -476,7 +476,7 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop, _float fAmount, _boo } m_fBlendTime = 0.f; - m_fRatio = 0.f; + fRatio = 0.f; m_bRootBone = bRootBone; m_iCurrentAnimIndex = iIndex; m_bIsLoop = isLoop; @@ -2083,7 +2083,7 @@ void CModel::ComputeLocal(_uint AnimIndex, _uint MeshIndex) pDesc->CurrentAnimIndex = m_iCurrentAnimIndex; pDesc->PrevAnimIndex = m_iPreAnimIndex; pDesc->PrevTime = m_Animations[m_iPreAnimIndex]->Get_CurrentTrackPosition(); - pDesc->BlendRatio = m_fRatio; + pDesc->BlendRatio = fRatio; pDesc->RootBoneIndex = m_iRootBoneIndex; pDesc->PlayHeadBone = m_bHeadBone; diff --git a/Jusin154_Team3D/Engine/Private/NPCStat.cpp b/Jusin154_Team3D/Engine/Private/NPCStat.cpp index 8eb63279b..38fb97ad4 100644 --- a/Jusin154_Team3D/Engine/Private/NPCStat.cpp +++ b/Jusin154_Team3D/Engine/Private/NPCStat.cpp @@ -19,7 +19,7 @@ HRESULT CNPCStat::Initialize_Prototype(tinyxml2::XMLNode* pChild) pElement->QueryIntAttribute("ID", &m_NpcInfo.iID); m_NpcInfo.pNpc_Name = CMyTools::ToWstring(pElement->Attribute("Name")); m_NpcInfo.pName = CMyTools::ToWstring(pElement->Attribute("NpcName")); - pElement->QueryIntAttribute("TAG", &m_NpcInfo.iNpcType); + pElement->QueryIntAttribute("ZOOM_IN", &m_NpcInfo.iNpcType); pElement->QueryFloatAttribute("SizeX", &m_NpcInfo.fFontPos); return S_OK; } diff --git a/Jusin154_Team3D/Engine/Private/PanelObject.cpp b/Jusin154_Team3D/Engine/Private/PanelObject.cpp index 258e22c95..1cf136457 100644 --- a/Jusin154_Team3D/Engine/Private/PanelObject.cpp +++ b/Jusin154_Team3D/Engine/Private/PanelObject.cpp @@ -162,7 +162,7 @@ void CPanelObject::Function_Callback(wstring Name, void* pArg) } } -_bool CPanelObject::Start_Lerp(_float fTimeDelta) +_bool CPanelObject::Start_Lerp_Translation(_float fTimeDelta) { _vector Pos = XMLoadFloat4(&m_fCurrent_Position); diff --git a/Jusin154_Team3D/Engine/Private/TimeSocket.cpp b/Jusin154_Team3D/Engine/Private/TimeSocket.cpp index adf5699fd..cfd501a0e 100644 --- a/Jusin154_Team3D/Engine/Private/TimeSocket.cpp +++ b/Jusin154_Team3D/Engine/Private/TimeSocket.cpp @@ -9,65 +9,77 @@ CTimeSocket::CTimeSocket() _bool CTimeSocket::Trigger(_float fRatio) { _bool bResult = false; - if (m_fRatio <= fRatio) { + if (m_Contents.fRatio <= fRatio) { bResult = true; - m_funcEvent(*this); - - Finalize(); + m_Contents.funcEvent(*this); } return bResult; } - -HRESULT CTimeSocket::Initialize(CGameObject* pTarget, _string& strTag) +HRESULT CTimeSocket::Initialize(void* pArg) { - m_pEventTarget = pTarget; - SAFE_ADDREF(m_pEventTarget); - m_strEventName = strTag; - m_eTypeParam = TIMESOCKET_PARAM::END; - return S_OK; -} + SOCKETCONTENTS* pDesc = static_cast(pArg); -HRESULT CTimeSocket::Initialize(CGameObject* pTarget, _string& strTag, PSX::PxTransform& pxTransform) -{ - m_pEventTarget = pTarget; - SAFE_ADDREF(m_pEventTarget); - m_strEventName = strTag; - m_pxTransform = pxTransform; - m_eTypeParam = TIMESOCKET_PARAM::TRANSFORM; - return S_OK; -} + m_Contents.fRatio = pDesc->fRatio; + m_Contents.bTriggerred = pDesc->bTriggerred; + m_Contents.pEventTarget = pDesc->pEventTarget; + m_Contents.strEventName = pDesc->strEventName; + m_Contents.wstrLayerName = pDesc->wstrLayerName; + m_Contents.wstrKeyName = pDesc->wstrKeyName; + m_Contents.eTypeParam = pDesc->eTypeParam; + m_Contents.eTypeFunc = pDesc->eTypeFunc; + m_Contents.vFlags = pDesc->vFlags; + m_Contents.vParam_10 = pDesc->vParam_10; + m_Contents.vParam_11 = pDesc->vParam_11; + m_Contents.funcEvent = pDesc->funcEvent; -HRESULT CTimeSocket::Initialize(CGameObject* pTarget, _string& strTag, CGameObject* pOther) -{ - m_pEventTarget = pTarget; - SAFE_ADDREF(m_pEventTarget); - m_strEventName = strTag; - m_pOtherTarget = pOther; - SAFE_ADDREF(m_pOtherTarget); - m_eTypeParam = TIMESOCKET_PARAM::TARGET; - return S_OK; + switch (m_Contents.eTypeParam) + { + case TIMESOCKET_PARAM::TARGET: + m_Contents.pOtherTarget = pDesc->pOtherTarget; + break; + case TIMESOCKET_PARAM::TRANSFORM: + m_Contents.pxTransform = pDesc->pxTransform; + break; + case TIMESOCKET_PARAM::NOT_USE: + m_Contents.pOtherTarget = nullptr; + break; + default: + m_Contents.pOtherTarget = nullptr; + break; + } + + SAFE_ADDREF(m_Contents.pEventTarget); + if (m_Contents.eTypeParam == TIMESOCKET_PARAM::TARGET){ + SAFE_ADDREF(m_Contents.pOtherTarget); + } + + return S_OK; } void CTimeSocket::Finalize() { - switch (m_eTypeParam) + switch (m_Contents.eTypeParam) { case TIMESOCKET_PARAM::TARGET: - SAFE_RELEASE(m_pOtherTarget); - break; - case TIMESOCKET_PARAM::TRANSFORM: - m_pxTransform = {}; + SAFE_RELEASE(m_Contents.pOtherTarget); break; default: break; } - SAFE_RELEASE(m_pEventTarget); + SAFE_RELEASE(m_Contents.pEventTarget); } -CTimeSocket* CTimeSocket::Create() +CTimeSocket* CTimeSocket::Create(void* pArg) { - return new CTimeSocket(); + CTimeSocket* pInstance = new CTimeSocket(); + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Created : CTimeSocket"); + SAFE_RELEASE(pInstance); + } + + return pInstance; } void CTimeSocket::Free() diff --git a/Jusin154_Team3D/Engine/Private/Transform.cpp b/Jusin154_Team3D/Engine/Private/Transform.cpp index 4c1f10a3a..d95985a45 100644 --- a/Jusin154_Team3D/Engine/Private/Transform.cpp +++ b/Jusin154_Team3D/Engine/Private/Transform.cpp @@ -94,6 +94,15 @@ void CTransform::Set_WorldMatrix(PSX::PxTransform dstMatrix) XMMatrixAffineTransformation(XMLoadFloat3(&vScale), XMVectorZero(), XMLoadFloat4((_float4*)&dstMatrix.q), XMLoadFloat3((_float3*)&dstMatrix.p))); } +void CTransform::Compress_WorldMatrix(_float3& vTrans, _float4& vRotQ) +{ + vTrans.x = m_WorldMatrix.m[3][0]; + vTrans.y = m_WorldMatrix.m[3][1]; + vTrans.z = m_WorldMatrix.m[3][2]; + + XMStoreFloat4(&vRotQ, Get_QuarternionVector()); +} + HRESULT CTransform::Initialize_Prototype() { XMStoreFloat4x4(&m_WorldMatrix, XMMatrixIdentity()); @@ -418,6 +427,42 @@ void CTransform::Rotation(_fvector vRPY) Set_State(STATE::LOOK, vLook); } +void CTransform::RotationQ(_fvector vRotQ) +{ + _float3 vScale = Get_Scale(); + _vector vRight = XMVectorSet(1.f, 0.f, 0.f, 0.f) * vScale.x; + _vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f) * vScale.y; + _vector vLook = XMVectorSet(0.f, 0.f, 1.f, 0.f) * vScale.z; + + _matrix RotationMatrix = XMMatrixRotationQuaternion(vRotQ); + + vRight = XMVector3TransformNormal(vRight, RotationMatrix); + vUp = XMVector3TransformNormal(vUp, RotationMatrix); + vLook = XMVector3TransformNormal(vLook, RotationMatrix); + + Set_State(STATE::RIGHT, vRight); + Set_State(STATE::UP, vUp); + Set_State(STATE::LOOK, vLook); +} + +void CTransform::RotationQ(PSX::PxQuat vRotQ) +{ + _float3 vScale = Get_Scale(); + _vector vRight = XMVectorSet(1.f, 0.f, 0.f, 0.f) * vScale.x; + _vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f) * vScale.y; + _vector vLook = XMVectorSet(0.f, 0.f, 1.f, 0.f) * vScale.z; + + _matrix RotationMatrix = XMMatrixRotationQuaternion(XMVectorSet(vRotQ.x, vRotQ.y, vRotQ.z, vRotQ.w)); + + vRight = XMVector3TransformNormal(vRight, RotationMatrix); + vUp = XMVector3TransformNormal(vUp, RotationMatrix); + vLook = XMVector3TransformNormal(vLook, RotationMatrix); + + Set_State(STATE::RIGHT, vRight); + Set_State(STATE::UP, vUp); + Set_State(STATE::LOOK, vLook); +} + void CTransform::LookAt(_fvector vAt) { _float3 vScale = Get_Scale(); @@ -555,6 +600,35 @@ void CTransform::Free() void CTransform::Describe_Entity() { +#ifdef 기무리 + if (GUI::TreeNode("NuriDebug")) { + { + _vector vScale, vRotQ, vTrans; + XMMatrixDecompose(&vScale, &vRotQ, &vTrans, XMLoadFloat4x4(&m_WorldMatrix)); + _float4 scale, rotQ, trans; + XMStoreFloat4(&scale, vScale); + XMStoreFloat4(&rotQ, vRotQ); + XMStoreFloat4(&trans, vTrans); + if (GUI::SmallButton("Copy")) { + _char buf[512] = {}; + sprintf_s( + buf, sizeof(buf), + "\n" + "\t\n" + "\t\n" + "", + rotQ.x, rotQ.y, rotQ.z, rotQ.w, + trans.x, trans.y, trans.z + ); + GUI::SetClipboardText(buf); + } + GUI::Text("vScale : %.1f\t%.1f\t%.1f", scale.x, scale.y, scale.z); + GUI::Text("vRotQ : %.2f\t%.2f\t%.2f\t%.2f", rotQ.x, rotQ.y, rotQ.z, rotQ.w); + GUI::Text("vTrans : %.1f\t%.1f\t%.1f", trans.x, trans.y, trans.z); + } + GUI::TreePop(); + } +#endif // 기무리 if (GUI::TreeNode("Transform")) { GUI::Text("----- Gizmo ----"); _float3 vMove = {}; diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp index ebb28b9da..a57ffec1f 100644 --- a/Jusin154_Team3D/Engine/Private/UIObject.cpp +++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp @@ -370,7 +370,7 @@ void CUIObject::Lerp_PosY(_float PosY) m_fLerpY = PosY; } -_bool CUIObject::Start_Lerp(_float fTimeDelta) +_bool CUIObject::Start_Lerp_Translation(_float fTimeDelta) { return false; } diff --git a/Jusin154_Team3D/Engine/Private/tinyxml2.cpp b/Jusin154_Team3D/Engine/Private/tinyxml2.cpp index c237340e2..d05ae3efb 100644 --- a/Jusin154_Team3D/Engine/Private/tinyxml2.cpp +++ b/Jusin154_Team3D/Engine/Private/tinyxml2.cpp @@ -1,4 +1,4 @@ -/* +/* Original code by Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied diff --git a/Jusin154_Team3D/Engine/Public/Camera.h b/Jusin154_Team3D/Engine/Public/Camera.h index c22ee96cf..a6acf7155 100644 --- a/Jusin154_Team3D/Engine/Public/Camera.h +++ b/Jusin154_Team3D/Engine/Public/Camera.h @@ -40,7 +40,10 @@ class ENGINE_DLL CCamera abstract : public CGameObject virtual void Late_Update(_float fTimeDelta) override; virtual HRESULT Render() override; virtual HRESULT Ready_Components(void* pArg)override; + virtual void Trigger(class CTimeSocket& Socket) {}; virtual void EnableTransition(_float fTransitionTime); + virtual void DisableTransition(); + void Set_RotDegreeVerticalLock(_float2 vVerticalLock); _float2 Get_RotDegreeVerticalLock(); @@ -49,9 +52,12 @@ class ENGINE_DLL CCamera abstract : public CGameObject _bool IsImportantThan(CCamera* pOther) const; const _float* Get_CurrentFar(); void ZoomIn(_float fTimeDelta); - void Set_Fov(_float fFovy,_float fTimeDelta, _bool& bZoomIn); + void Set_FovSlope(_float fFovy,_float fTimeDelta, _bool& bZoomIn); + + void Set_Fov(_float fFovy); _float Get_Fov(); + protected: _float m_fFovy = {}; _float m_fAspect = {}; diff --git a/Jusin154_Team3D/Engine/Public/Camera_Manager.h b/Jusin154_Team3D/Engine/Public/Camera_Manager.h index e599912ee..3d2ab50a7 100644 --- a/Jusin154_Team3D/Engine/Public/Camera_Manager.h +++ b/Jusin154_Team3D/Engine/Public/Camera_Manager.h @@ -15,6 +15,7 @@ class CCamera_Manager final : public CBase HRESULT Release_Camera(_uint iLevel, const _wstring& wstrCameraKey); HRESULT Add_Camera(_uint iLevel, CCamera* pCamera, const _wstring& wstrCameraKey); HRESULT Bind_Camera(_uint iLevel, const _wstring& wstrCameraKey, _bool bIgnorePriority); + class CCamera* Get_Camera(_uint iLevel, const _wstring& strCameraKey); HRESULT IsBinded_Camera(const _wstring& wstrCameraKey); _vector Get_CameraLook(); _float Get_CameraFov(); diff --git a/Jusin154_Team3D/Engine/Public/ElementObject.h b/Jusin154_Team3D/Engine/Public/ElementObject.h index 3e4d70450..c88564c54 100644 --- a/Jusin154_Team3D/Engine/Public/ElementObject.h +++ b/Jusin154_Team3D/Engine/Public/ElementObject.h @@ -30,7 +30,7 @@ class ENGINE_DLL CElementObject abstract : public CUIObject virtual _float Get_Nine_Slice_Top() override; virtual _float Get_Nine_Slice_Bottom() override; - virtual _bool Start_Lerp(_float fTimeDelta) override; + virtual _bool Start_Lerp_Translation(_float fTimeDelta) override; virtual _bool Start_Lerp_Speed(_float fTimeDelta, _float2 MousePoint) override; virtual _bool Set_Trgger(); virtual void Reset_Pos(_float fTimeDelta)override; diff --git a/Jusin154_Team3D/Engine/Public/Engine_Struct.h b/Jusin154_Team3D/Engine/Public/Engine_Struct.h index a4c17238a..7933e1aa1 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Struct.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Struct.h @@ -619,4 +619,8 @@ typedef struct tagPrevVPMatrices { _float4x4 PrevProjMatrix; }PREVVPMATRICES; +typedef struct tagBoolean { + _bool b[16] = {}; +}_boolean; + NS_END diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index 09abcda1b..21b7bebd4 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -199,6 +199,7 @@ class ENGINE_DLL CGameInstance final : public CBase HRESULT Release_Camera(_uint iLevel, const _wstring& wstrCameraKey); HRESULT Add_Camera(_uint iLevel, class CCamera* pCamera, const _wstring& strCameraKey); HRESULT Bind_Camera(_uint iLevel, const _wstring& strCameraKey, _bool bIgnorePriority); + class CCamera* Get_Camera(_uint iLevel, const _wstring& strCameraKey); HRESULT IsBinded_Camera(const _wstring& strCameraKey); _vector Get_CameraLook(); _float Get_CameraFov(); diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index a26897e21..f2217cb3a 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -214,7 +214,7 @@ class ENGINE_DLL CModel final : public CComponent _matrix m_DeltaAnimationMatrix = {}; // 루트본의 델타애니메이션 class CTransform* m_pTransform = { nullptr }; // 모델 대상의 트랜스폼 - _float m_fRatio = {}; + _float fRatio = {}; _int m_iCurrSecondAnimIndex = { -1 }; _int m_iBoneIndex[ENUM_CLASS(BLEND_BONE::END)] = { -1,-1,-1,-1,-1,-1,-1,-1 }; vector> m_BoneMask; diff --git a/Jusin154_Team3D/Engine/Public/MyTools.h b/Jusin154_Team3D/Engine/Public/MyTools.h index 89bf81ac7..18173e55c 100644 --- a/Jusin154_Team3D/Engine/Public/MyTools.h +++ b/Jusin154_Team3D/Engine/Public/MyTools.h @@ -155,6 +155,30 @@ class CMyTools { XMStoreFloat4x4(&matOut, (XMMatrixAffineTransformation(vTargetScale, XMVectorZero(), vTargetRotq, vTargetTrans))); } + + inline static void MatrixLerp( + _In_ _float3* pTransOrigin, // Origin -> 0 + _In_ _float3* pTransDest, + _In_ _float4* pRotQOrigin, + _In_ _float4* pRotQDest, + _Out_ _float4x4& matOut, _float fRatio) { + fRatio = Saturate(fRatio); + + _vector vOriginRotQ = XMVectorSet(pRotQOrigin->x, pRotQOrigin->y, pRotQOrigin->z, pRotQOrigin->w); + _vector vOriginTrans = XMVectorSet(pTransOrigin->x, pTransOrigin->y, pTransOrigin->z, 0.f); + + _vector vDestRotQ = XMVectorSet(pRotQDest->x, pRotQDest->y, pRotQDest->z, pRotQDest->w); + _vector vDestTrans = XMVectorSet(pTransDest->x, pTransDest->y, pTransDest->z, 0.f); + + if (XMVectorGetX(XMVector4Dot(vOriginRotQ, vDestRotQ)) < 0.f){ + vDestRotQ = XMVectorNegate(vDestRotQ); + } + + _vector vLerpRotQ = XMQuaternionSlerp(vOriginRotQ, vDestRotQ, fRatio); + _vector vLerpTrans = XMVectorLerp(vOriginTrans, vDestTrans, fRatio); + + XMStoreFloat4x4(&matOut, XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), vLerpRotQ, vLerpTrans)); + } // 비슷하면 1 직교하면 0 완전 반대방향일수록 -1 inline static _float DirectionCompare(_vector a, _vector b) @@ -337,6 +361,31 @@ class CMyTools { return (Alphabet - 'A'); } + + template + inline static _bool TryParseEnum( string_view text, const pair(&table)[N], ENUM& outValue) + { + for (size_t i = 0; i < N; ++i) + { + if (table[i].first == text) + { + outValue = table[i].second; + return true; + } + } + return false; + } + + template + inline static string_view EnumToString( ENUM value, const pair(&table)[N], string_view fallback = "UNKNOWN") + { + for (size_t i = 0; i < N; ++i) + { + if (table[i].second == value) + return table[i].first; + } + return fallback; + } #ifdef _DEBUG inline static _bool DescribePxTransform(PSX::PxTransform& pxTransform, size_t iID) diff --git a/Jusin154_Team3D/Engine/Public/PanelObject.h b/Jusin154_Team3D/Engine/Public/PanelObject.h index d1b1aefc1..d49e14c04 100644 --- a/Jusin154_Team3D/Engine/Public/PanelObject.h +++ b/Jusin154_Team3D/Engine/Public/PanelObject.h @@ -34,7 +34,7 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject virtual void Add_Function(wstring Name, function Evnet) override; virtual void Function_Callback(wstring Name, void* pArg = nullptr) override; - virtual _bool Start_Lerp(_float fTimeDelta) override; + virtual _bool Start_Lerp_Translation(_float fTimeDelta) override; virtual void Reset_Pos(_float fTimeDelta)override; protected: diff --git a/Jusin154_Team3D/Engine/Public/PhysX/vehicle2/physxConstraints/PxVehiclePhysXConstraintStates.h b/Jusin154_Team3D/Engine/Public/PhysX/vehicle2/physxConstraints/PxVehiclePhysXConstraintStates.h index 3b825b5df..84a5d06d6 100644 --- a/Jusin154_Team3D/Engine/Public/PhysX/vehicle2/physxConstraints/PxVehiclePhysXConstraintStates.h +++ b/Jusin154_Team3D/Engine/Public/PhysX/vehicle2/physxConstraints/PxVehiclePhysXConstraintStates.h @@ -1,4 +1,4 @@ -// Redistribution and use in source and binary forms, with or without +// Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright @@ -127,7 +127,7 @@ struct PxVehiclePhysXConstraintState } }; -//TAG:solverprepshader +//ZOOM_IN:solverprepshader PX_FORCE_INLINE PxU32 vehicleConstraintSolverPrep (Px1DConstraint* constraints, PxVec3p& body0WorldOffset, diff --git a/Jusin154_Team3D/Engine/Public/TimeSocket.h b/Jusin154_Team3D/Engine/Public/TimeSocket.h index c2b320d26..bf66c54ee 100644 --- a/Jusin154_Team3D/Engine/Public/TimeSocket.h +++ b/Jusin154_Team3D/Engine/Public/TimeSocket.h @@ -3,51 +3,134 @@ NS_BEGIN(Engine) class CGameObject; +class CTimeSocket; typedef enum class typeTimeSocket_Param { + NOT_USE, TARGET, TRANSFORM, END }TIMESOCKET_PARAM; +static constexpr pair g_SocketParamTypeTable[ENUM_CLASS(TIMESOCKET_PARAM::END) + 1] = +{ + {"NOT_USE", TIMESOCKET_PARAM::NOT_USE}, + {"TARGET", TIMESOCKET_PARAM::TARGET}, + {"TRANSFORM", TIMESOCKET_PARAM::TRANSFORM}, + {"END", TIMESOCKET_PARAM::END}, +}; + typedef enum class typeTimeSocket_Func { - TRIGGER, - POSITION, - TAG, - TARGETTING, + // COMMON + TRANSLATION, + TRANSLATION_LERP, + TOGGLE_FLAGS, + + // CAMERA + BIND_CAMERA, + ZOOM_IN, + ZOOM_OUT, + ZOOM_LERP, + FADE_IN, + FADE_OUT, + END_CINEMATIC, + SET_PITCHLIMIT, + LOOK_AT, + DONT_LOOK_AT, + FOLLOW, + DONT_FOLLOW, + SHAKE, + + // CHARACTER + SET_ANIMSTATE, + SET_FSMSTATE, + + // EFFECT + + // SOUND + + // TRIGGER END }TIMESOCKET_FUNC; +static constexpr pair g_SocketFuncTypeTable[ENUM_CLASS(TIMESOCKET_FUNC::END) + 1] = +{ + {"TRANSLATION", TIMESOCKET_FUNC::TRANSLATION}, + {"TRANSLATION_LERP", TIMESOCKET_FUNC::TRANSLATION_LERP}, + {"TOGGLE_FLAGS", TIMESOCKET_FUNC::TOGGLE_FLAGS}, + + {"BIND_CAMERA", TIMESOCKET_FUNC::BIND_CAMERA}, + {"ZOOM_IN", TIMESOCKET_FUNC::ZOOM_IN}, + {"ZOOM_OUT", TIMESOCKET_FUNC::ZOOM_OUT}, + {"ZOOM_LERP", TIMESOCKET_FUNC::ZOOM_LERP}, + {"FADE_IN", TIMESOCKET_FUNC::FADE_IN}, + {"FADE_OUT", TIMESOCKET_FUNC::FADE_OUT}, + {"END_CINEMATIC", TIMESOCKET_FUNC::END_CINEMATIC}, + {"SET_PITCHLIMIT", TIMESOCKET_FUNC::SET_PITCHLIMIT}, + {"LOOK_AT", TIMESOCKET_FUNC::LOOK_AT}, + {"DONT_LOOK_AT", TIMESOCKET_FUNC::DONT_LOOK_AT}, + {"FOLLOW", TIMESOCKET_FUNC::FOLLOW}, + {"DONT_FOLLOW", TIMESOCKET_FUNC::DONT_FOLLOW}, + + {"SET_ANIMSTATE", TIMESOCKET_FUNC::SET_ANIMSTATE}, + {"SET_FSMSTATE", TIMESOCKET_FUNC::SET_FSMSTATE}, + + {"END", TIMESOCKET_FUNC::END}, +}; + +typedef struct tagSocketContents { + _float fRatio = { 0.f }; + _bool bTriggerred = { false }; + CGameObject* pEventTarget = { nullptr }; + _string strEventName = {}; + _wstring wstrLayerName = {}; + _wstring wstrKeyName = {}; + TIMESOCKET_PARAM eTypeParam = {}; + TIMESOCKET_FUNC eTypeFunc = {}; + union { + CGameObject* pOtherTarget = { nullptr }; + PSX::PxTransform pxTransform; + }; + _boolean vFlags = {}; + _uint4 vParam_10 = {}; + _float4 vParam_11 = {}; + function funcEvent = { nullptr }; +}SOCKETCONTENTS; + class ENGINE_DLL CTimeSocket final : public CBase { private: CTimeSocket(); virtual ~CTimeSocket() = default; public: - _float m_fRatio = { 0.f }; - _bool m_bTriggerred = { false }; - CGameObject* m_pEventTarget = { nullptr }; - _string m_strEventName = {}; - TIMESOCKET_PARAM m_eTypeParam = {}; - union { - CGameObject* m_pOtherTarget = { nullptr }; - PSX::PxTransform m_pxTransform; - }; - + SOCKETCONTENTS m_Contents = {}; virtual _bool Trigger(_float fRatio); -public: - HRESULT Initialize(CGameObject* pTarget, _string& strTag); - HRESULT Initialize(CGameObject* pTarget, _string& strTag, PSX::PxTransform& pxTransform); - HRESULT Initialize(CGameObject* pTarget, _string& strTag, CGameObject* pOther); + inline static _bool TryParse_TimeSocketParam(string_view text, TIMESOCKET_PARAM& outValue) + { + return CMyTools::TryParseEnum(text, g_SocketParamTypeTable, outValue); + } + + inline static string_view ToString_TimeSocketParam(TIMESOCKET_PARAM value) + { + return CMyTools::EnumToString(value, g_SocketParamTypeTable, "UNKNOWN_PARAM"); + } + + inline static _bool TryParse_TimeSocketFunc(string_view text, TIMESOCKET_FUNC& outValue) + { + return CMyTools::TryParseEnum(text, g_SocketFuncTypeTable, outValue); + } + + inline static string_view ToString_TimeSocketFunc(TIMESOCKET_FUNC value) + { + return CMyTools::EnumToString(value, g_SocketFuncTypeTable, "UNKNOWN_FUNC"); + } public: - static CTimeSocket* Create(); + static CTimeSocket* Create(void* pArg); virtual void Free() override; - -private: - function m_funcEvent = { nullptr }; private: + HRESULT Initialize(void* pArg); void Finalize(); }; diff --git a/Jusin154_Team3D/Engine/Public/Transform.h b/Jusin154_Team3D/Engine/Public/Transform.h index 91cd1f269..bcb69fea0 100644 --- a/Jusin154_Team3D/Engine/Public/Transform.h +++ b/Jusin154_Team3D/Engine/Public/Transform.h @@ -28,6 +28,7 @@ class ENGINE_DLL CTransform final : void Set_WorldMatrix(_float4x4& dstMatrix) { memcpy_s(&m_WorldMatrix, sizeof(_float4x4), &dstMatrix, sizeof(_float4x4)); } void Set_WorldMatrix(_fmatrix& dstMatrix) { XMStoreFloat4x4(&m_WorldMatrix, dstMatrix); } void Set_WorldMatrix(PSX::PxTransform dstMatrix); + void Compress_WorldMatrix(_float3& vTrans, _float4& vRotQ); _float Get_Speed() const { return m_fSpeedPerSec; } _float Get_RotationSpeed() const { return m_fRotationPerSec; } _float Get_Radius() const { return m_fRadius; } @@ -77,6 +78,8 @@ class ENGINE_DLL CTransform final : void Rotation(_float fRadianX, _float fRadianY, _float fRadianZ); void Rotation(_float3& vRadian); void Rotation(_fvector vRPY); + void RotationQ(_fvector vRotQ); + void RotationQ(PSX::PxQuat vRotQ); // Up, Down 벡터를 바라보게 하면 터짐, w에 1 있어야함 void LookAt(_fvector vAt); diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h index 56a728363..ab627ee6b 100644 --- a/Jusin154_Team3D/Engine/Public/UIObject.h +++ b/Jusin154_Team3D/Engine/Public/UIObject.h @@ -156,7 +156,7 @@ typedef struct tagSpellLearnInfo virtual void Lerp_PosX(_float PosX); virtual void Lerp_PosY(_float PosY); - virtual _bool Start_Lerp(_float fTimeDelta); + virtual _bool Start_Lerp_Translation(_float fTimeDelta); virtual _bool Start_Lerp_Speed(_float fTimeDelta, _float2 Mouse_Point); virtual void Reset_Pos(_float fTimeDelta); virtual void Start_Size_Lerp(_float fTimeDelta); diff --git a/Jusin154_Team3D/Engine/Public/Unit.h b/Jusin154_Team3D/Engine/Public/Unit.h index cc11e348c..203419e88 100644 --- a/Jusin154_Team3D/Engine/Public/Unit.h +++ b/Jusin154_Team3D/Engine/Public/Unit.h @@ -32,6 +32,7 @@ class ENGINE_DLL CUnit abstract : public CContainerObject virtual void Priority_Update(_float fTimeDelta) override; virtual void Update(_float fTimeDelta) override; virtual void Late_Update(_float fTimeDelta) override; + virtual void Trigger(class CTimeSocket& Socket) {}; _wstring& Get_PrototypeTag() { return m_strModelPrototypeTag; } _bool IsAI() { return m_bAI; } From 4d40624184eb0beb24f08727f7d98b8143c6f49c Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Fri, 9 Jan 2026 14:08:25 +0900 Subject: [PATCH 03/12] =?UTF-8?q?[Add]=20=EB=9E=80=EB=A1=9D=20=ED=94=84?= =?UTF-8?q?=EB=A1=AD=20=EB=9D=BD=EC=98=A8=20[Add]=20=EB=9E=80=EB=A1=9D=20?= =?UTF-8?q?=ED=94=84=EB=A1=AD=20=EC=A1=B4=EC=9E=AC=EC=8B=9C=20=EB=9D=BD?= =?UTF-8?q?=EC=98=A8=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Default/Client.vcxproj | 2 + .../Client/Default/Client.vcxproj.filters | 24 ++- Jusin154_Team3D/Client/Private/Accio.cpp | 4 +- .../Client/Private/Avadakedavra.cpp | 4 +- Jusin154_Team3D/Client/Private/Bombard.cpp | 4 +- .../Client/Private/BuildingContainer.cpp | 4 +- Jusin154_Team3D/Client/Private/Decendo.cpp | 4 +- Jusin154_Team3D/Client/Private/EffectInfo.cpp | 172 ++++++++++++++++++ .../Client/Private/Effect_Container.cpp | 16 +- .../Client/Private/InfoInstance.cpp | 26 +++ .../Client/Private/Level_Field.cpp | 5 +- .../Client/Private/Level_GamePlay.cpp | 17 +- Jusin154_Team3D/Client/Private/Levioso.cpp | 9 +- Jusin154_Team3D/Client/Private/Lightning.cpp | 4 +- Jusin154_Team3D/Client/Private/NomalJap.cpp | 4 +- Jusin154_Team3D/Client/Private/Player.cpp | 5 + Jusin154_Team3D/Client/Private/Ranrok.cpp | 60 ++++-- .../Client/Private/Ranrok_Prop.cpp | 13 +- .../Client/Private/Ranrok_States.cpp | 4 +- Jusin154_Team3D/Client/Private/Stupefy.cpp | 4 +- .../Client/Private/Transformation.cpp | 9 +- Jusin154_Team3D/Client/Private/UI_Manager.cpp | 2 +- Jusin154_Team3D/Client/Public/Client_Struct.h | 1 + Jusin154_Team3D/Client/Public/EffectInfo.h | 47 +++++ .../Client/Public/Effect_Container.h | 2 +- Jusin154_Team3D/Client/Public/InfoInstance.h | 9 + Jusin154_Team3D/Client/Public/Ranrok.h | 13 +- Jusin154_Team3D/Client/Public/Ranrok_Prop.h | 1 + .../Bin/Resources/Data/AnimList/Ranrok.xml | 18 +- 29 files changed, 413 insertions(+), 74 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/EffectInfo.cpp create mode 100644 Jusin154_Team3D/Client/Public/EffectInfo.h diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 1564a2e4a..9a4e4d6f2 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -183,6 +183,7 @@ call Update_Resources.bat + @@ -476,6 +477,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 52ea0ed91..ac19d5181 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -863,11 +863,9 @@ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_DeadImpact - - 02.GameObjects\NPC\Hostile\Human_Duelist - - - + + 02.GameObjects\NPC\Hostile\Human_Duelist + 02.GameObjects\Effect\Effects\NomalJap\Duelist_NormalJap @@ -898,6 +896,12 @@ 02.GameObjects\UI\Dialogue_Canvas + + 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Prop + + + 03.InfoInstance\05.EffectInfo + @@ -1666,7 +1670,7 @@ {95a34fdb-ac6d-4312-8d28-1931f95c4f4c} - + {09b5e5b3-c1fe-4399-b2d3-96d652255bb5} @@ -1865,6 +1869,9 @@ {89dba592-166f-49b8-9894-07c20a3eaca9} + + {ee5c9922-7c5c-45a2-a53d-7df30172fbaf} + @@ -2686,7 +2693,7 @@ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Prop - + 02.GameObjects\Effect\Effects\NomalJap\Duelist_NormalJap @@ -2717,6 +2724,9 @@ 02.GameObjects\UI\Dialogue_Canvas\Dialogue_Panel + + 03.InfoInstance\05.EffectInfo + diff --git a/Jusin154_Team3D/Client/Private/Accio.cpp b/Jusin154_Team3D/Client/Private/Accio.cpp index 2e1355d8e..d3cca9579 100644 --- a/Jusin154_Team3D/Client/Private/Accio.cpp +++ b/Jusin154_Team3D/Client/Private/Accio.cpp @@ -207,9 +207,9 @@ HRESULT CAccio::Pre_Setting(CGameObject* pObject, void* pArg) m_pInfoInstance->Get_LockOnInfo(m_Info); - if (nullptr != m_Info.pUnit) { + if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) { - XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos()); + XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info)); XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); } diff --git a/Jusin154_Team3D/Client/Private/Avadakedavra.cpp b/Jusin154_Team3D/Client/Private/Avadakedavra.cpp index 80e3b6977..80bf40157 100644 --- a/Jusin154_Team3D/Client/Private/Avadakedavra.cpp +++ b/Jusin154_Team3D/Client/Private/Avadakedavra.cpp @@ -115,9 +115,9 @@ HRESULT CAvadakedavra::Pre_Setting(CGameObject* pObject, void* pArg) m_pInfoInstance->Get_LockOnInfo(m_Info); - if (nullptr != m_Info.pUnit) { + if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) { - XMStoreFloat4(&m_vTargetPos, Get_UnitPos(m_Info)); + XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info)); XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); } diff --git a/Jusin154_Team3D/Client/Private/Bombard.cpp b/Jusin154_Team3D/Client/Private/Bombard.cpp index a4a25c5e6..49c57d782 100644 --- a/Jusin154_Team3D/Client/Private/Bombard.cpp +++ b/Jusin154_Team3D/Client/Private/Bombard.cpp @@ -141,9 +141,9 @@ HRESULT CBombard::Pre_Setting(CGameObject* pObject, void* pArg) { /* 대상 위치 지정 */ m_pInfoInstance->Get_LockOnInfo(m_Info); - if (nullptr != m_Info.pUnit) { + if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) { - XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos()); + XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info)); XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); } diff --git a/Jusin154_Team3D/Client/Private/BuildingContainer.cpp b/Jusin154_Team3D/Client/Private/BuildingContainer.cpp index 91b0e0eef..279b1666d 100644 --- a/Jusin154_Team3D/Client/Private/BuildingContainer.cpp +++ b/Jusin154_Team3D/Client/Private/BuildingContainer.cpp @@ -25,7 +25,7 @@ void CBuildingContainer::Update(_float fTimeDelta) { __super::Update(fTimeDelta); - m_fCamDepth = XMVectorGetX(XMVector3LengthSq(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMVectorSetW(XMLoadFloat3(&m_vExtentWorldPosition), 1.f))); + m_fCamDepth = XMVectorGetX(XMVector3Length(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMVectorSetW(XMLoadFloat3(&m_vExtentWorldPosition), 1.f))) - m_fRadius; for (auto& pCollisiton : m_ColiisonPartObjects){ pCollisiton->Update(fTimeDelta); @@ -35,7 +35,7 @@ void CBuildingContainer::Update(_float fTimeDelta) void CBuildingContainer::Late_Update(_float fTimeDelta) { if (m_pGameInstance->IsIn_WorldFrustum(XMVectorSetW(XMLoadFloat3(&m_vExtentWorldPosition), 1.f), m_fRadius)) { - if (m_fCamDepth > 3000.f) + if (m_fCamDepth > 100.f) { if (m_pOcclusionQueryCom->isDraw()) __super::Late_Update(fTimeDelta); diff --git a/Jusin154_Team3D/Client/Private/Decendo.cpp b/Jusin154_Team3D/Client/Private/Decendo.cpp index 28d0bed87..4ea08497c 100644 --- a/Jusin154_Team3D/Client/Private/Decendo.cpp +++ b/Jusin154_Team3D/Client/Private/Decendo.cpp @@ -163,9 +163,9 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject, void* pArg) { /* 대상 위치 지정 */ m_pInfoInstance->Get_LockOnInfo(m_Info); - if (nullptr != m_Info.pUnit) { + if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) { - XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos()); + XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info)); XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); } diff --git a/Jusin154_Team3D/Client/Private/EffectInfo.cpp b/Jusin154_Team3D/Client/Private/EffectInfo.cpp new file mode 100644 index 000000000..41b28f264 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/EffectInfo.cpp @@ -0,0 +1,172 @@ +#include "pch.h" +#include "EffectInfo.h" +#include "Effect_Container.h" +#include "GameInstance.h" +#include "InfoInstance.h" +#include "Layer.h" +#include "Player.h" + +CEffectInfo::CEffectInfo() +{ +} + +void CEffectInfo::Update(_float fTimeDelta) +{ + Refresh_LockOnEffects(); + Refresh_ActiveEffects(); +} +void CEffectInfo::Change_Level() +{ + SAFE_RELEASE(m_pLockOnEffect); + for (CEffect_Container* pEffect : m_ActiveEffects) { + SAFE_RELEASE(pEffect); + } m_ActiveEffects.clear(); + +} + +HRESULT CEffectInfo::Regist_ActiveEffect(CEffect_Container* _pEffect) +{ + for (CEffect_Container* pEffect : m_ActiveEffects) { + if (pEffect == _pEffect) { + return E_ACCESSDENIED; + } + } m_ActiveEffects.push_back(_pEffect); + SAFE_ADDREF(_pEffect); + return S_OK; +} + +HRESULT CEffectInfo::Deregist_ActiveEffect(CEffect_Container* _pEffect) +{ + for (list::iterator iter = m_ActiveEffects.begin(); iter != m_ActiveEffects.end();) { + if (*iter == _pEffect) { + SAFE_RELEASE(*iter); + iter = m_ActiveEffects.erase(iter); + break; + } + else { + ++iter; + } + } + return E_FAIL; +} + +Client::CEffect_Container* CEffectInfo::Get_LockOnEffect() +{ + return m_pLockOnEffect; +} + +HRESULT CEffectInfo::Refresh_LockOnEffects() +{ + SAFE_RELEASE(m_pLockOnEffect); + _vector vCameraLook = m_pGameInstance->Get_CameraLook(); + _vector vCameraPos = m_pGameInstance->Get_CamXMPosition(); + _float fMaxDot = { 0.f }; + + _vector vEffectPos; + _vector vToEffectDir; + _bool Aim = false; + _float fFovy = 0.f; + if (m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER) != nullptr) + { + Aim = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER)->Get_Object()->Get_Aim(); + } + if (Aim) + { + fFovy = max(m_pGameInstance->Get_CameraFov() - XMConvertToRadians(50.f), XMConvertToRadians(5.f)); + } + else { + fFovy = max(m_pGameInstance->Get_CameraFov() - XMConvertToRadians(30.f), XMConvertToRadians(20.f)); + } + + { + for (list::iterator iter = m_ActiveEffects.begin(); iter != m_ActiveEffects.end(); ++iter) + { + CEffect_Container* pEffect = (*iter); + if (!pEffect->Get_Visible()) + continue; + vEffectPos = pEffect->Get_WorldPostion(); + vToEffectDir = vEffectPos - vCameraPos; + if (40.f <= XMVectorGetX(XMVector4Length(vToEffectDir))) { + continue; + } + _float fDotResult = CMyTools::DirectionCompare(vCameraLook, vToEffectDir); + if (fDotResult <= cosf(fFovy)) { + continue; + } + + if (nullptr == m_pLockOnEffect) { + m_pLockOnEffect = pEffect; + fMaxDot = fDotResult; + continue; + } + + if (fMaxDot < fDotResult) { + m_pLockOnEffect = pEffect; + fMaxDot = fDotResult; + } + + + } + + } + if (nullptr != m_pLockOnEffect) { + SAFE_ADDREF(m_pLockOnEffect); + } + return S_OK; +} + +HRESULT CEffectInfo::Refresh_ActiveEffects() +{ + list::iterator iter = m_ActiveEffects.begin(); + for (; iter != m_ActiveEffects.end();) { + if (true == (*iter)->isDead()) { + SAFE_RELEASE(*iter); + iter = m_ActiveEffects.erase(iter); + } + else { + ++iter; + } + } + return S_OK; +} + +HRESULT CEffectInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + m_pGameInstance = CGameInstance::GetInstance(); + m_pInfoInstance = CInfoInstance::GetInstance(); + m_pDevice = pDevice; + m_pContext = pContex; + + SAFE_ADDREF(m_pGameInstance); + SAFE_ADDREF(m_pInfoInstance); + SAFE_ADDREF(m_pDevice); + SAFE_ADDREF(m_pContext); + + return S_OK; +} + +CEffectInfo* CEffectInfo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + CEffectInfo* pInstance = new CEffectInfo(); + + if (FAILED(pInstance->Initialize(pDevice, pContex))) { + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CEffectInfo::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pLockOnEffect); + for (CEffect_Container* pEffect : m_ActiveEffects) { + SAFE_RELEASE(pEffect); + } m_ActiveEffects.clear(); + + SAFE_RELEASE(m_pGameInstance); + SAFE_RELEASE(m_pInfoInstance); + SAFE_RELEASE(m_pDevice); + SAFE_RELEASE(m_pContext); +} diff --git a/Jusin154_Team3D/Client/Private/Effect_Container.cpp b/Jusin154_Team3D/Client/Private/Effect_Container.cpp index d968052b4..9ecb1ab1c 100644 --- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp @@ -766,6 +766,12 @@ ON_COLLISION_INFO CEffect_Container::SweepTarget(_fvector StartPos, _fvector End } } break; + case PXOBJECT::RANROK_PROP: + { + pUserData->pOwner->OnCollision(this, &tagCollInfo); + m_bHit = true; + } + break; } break; case PHYSX_KIND::CCTActor: @@ -1057,9 +1063,15 @@ ON_COLLISION_INFO CEffect_Container::MonsterRayCast(_fvector StartPos, _fvector return tagCollInfo; } -_vector CEffect_Container::Get_UnitPos(LOCKON_INFO Info) +_vector CEffect_Container::Get_LockOnPos(LOCKON_INFO Info) { - return Info.pUnit->Get_Component()->Get_Position(); + if (Info.pEffect) { + return Info.pEffect->Get_WorldPostion(); + } + if (Info.pUnit) { + return Info.pUnit->Get_Component()->Get_Position(); + } + return XMVectorZero(); } diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index 162bf3c9b..462cfdbde 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -5,6 +5,7 @@ #include "MonsterInfo.h" #include "PlayerInfo.h" #include "InteractiveInfo.h" +#include "EffectInfo.h" #include "Skill_Data.h" #include "Quest_Data.h" #include "Damage_Font.h" @@ -27,6 +28,7 @@ void CInfoInstance::Update(_float fTimeDelta) m_pMapInfo->Update(fTimeDelta); m_pSkillInfo->Update(fTimeDelta); m_pInteractiveInfo->Update(fTimeDelta); + m_pEffectInfo->Update(fTimeDelta); } void CInfoInstance::Change_Level() @@ -36,6 +38,7 @@ void CInfoInstance::Change_Level() m_pMapInfo->Change_Level(); m_pSkillInfo->Change_Level(); m_pInteractiveInfo->Change_Level(); + m_pEffectInfo->Change_Level(); } CStat* CInfoInstance::Get_PlayerStatPtr() @@ -111,6 +114,7 @@ void CInfoInstance::Get_LockOnInfo(LOCKON_INFO& Info) } Info.pUnit = m_pMonsterInfo->Get_LockOnUnit(); Info.pInteractive = m_pInteractiveInfo->Get_LockOnUnit(); + Info.pEffect = m_pEffectInfo->Get_LockOnEffect(); } void CInfoInstance::Set_SearchLockOnFlag(_bool bLockOn) @@ -169,6 +173,23 @@ HRESULT CInfoInstance::Load_DADA_INT() } #pragma endregion +#pragma region EFFECT_INFO + +HRESULT CInfoInstance::Regist_ActiveEffect(CEffect_Container* pEffect) +{ + return m_pEffectInfo->Regist_ActiveEffect(pEffect); +} + +HRESULT CInfoInstance::Deregist_ActiveEffect(CEffect_Container* pEffect) +{ + if (nullptr == s_pInstance || nullptr == m_pEffectInfo) { + return S_OK; // 게임 종료 된 상태 + } + return m_pEffectInfo->Deregist_ActiveEffect(pEffect); +} +#pragma endregion + + #pragma region SPELL_INFO HRESULT CInfoInstance::Load_SpellInfo(const _char* pFilePath) { @@ -448,6 +469,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic if (nullptr == m_pInteractiveInfo) { return E_FAIL; } + m_pEffectInfo = CEffectInfo::Create(pDevice, pContext); + if (nullptr == m_pEffectInfo) { + return E_FAIL; + } m_pSpellLearn_Data = CSpellLearn_Data::Create(pDevice, pContext); if (nullptr == m_pSpellLearn_Data) { return E_FAIL; @@ -543,6 +568,7 @@ void CInfoInstance::Release_Information() SAFE_RELEASE(m_pSkillInfo); SAFE_RELEASE(m_pQuestInfo); SAFE_RELEASE(m_pInteractiveInfo); + SAFE_RELEASE(m_pEffectInfo); SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); SAFE_RELEASE(m_pGameInstance); diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp index 003e5cb18..e2a19c5eb 100644 --- a/Jusin154_Team3D/Client/Private/Level_Field.cpp +++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp @@ -291,7 +291,10 @@ HRESULT CLevel_Field::Ready_Layer_Effect(const _wstring& strLayerTag) HRESULT CLevel_Field::Ready_Layer_Monster() { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { + CRanrok::RANROKDESC RanrokDesc = {}; + RanrokDesc.vPos = _float4(75.550f, 33.734f, 164.013f, 1.f); + RanrokDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &RanrokDesc))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 2d8fd06d8..ead8c2553 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -907,7 +907,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) #endif // #ifdef Bin isLoad_NPC = true; - isLoad_RandomNPC = true; + isLoad_RandomNPC = false; #endif // Bin #endif // _DEBUG @@ -949,7 +949,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) } CHuman_Duelist::DUELISTDESC DuelistDesc = {}; - DuelistDesc.vPos = _float4(-21.f, 0.f, -14.f, 1.f); + DuelistDesc.vPos = _float4(1007.032f, 1.085f, 1008.370f, 1.f); DuelistDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &DuelistDesc))) { return E_FAIL; @@ -1009,21 +1009,21 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster() #endif // Bin #endif // _DEBUG if (true == isLoad_Monster) { - for (_uint i = 0; i < 1; ++i) + for (_uint i = 0; i < 0; ++i) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; } } - for (_uint i = 0; i < 1; ++i) + for (_uint i = 0; i < 0; ++i) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; } } - for (_uint i = 0; i < 1; ++i) + for (_uint i = 0; i < 0; ++i) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; @@ -1035,9 +1035,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster() return E_FAIL; } - /*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { + CRanrok::RANROKDESC RanrokDesc = {}; + RanrokDesc.vPos = _float4(-44.704f, 6.860f, 16.071f, 1.f); + RanrokDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER,&RanrokDesc))) { return E_FAIL; - }*/ + } diff --git a/Jusin154_Team3D/Client/Private/Levioso.cpp b/Jusin154_Team3D/Client/Private/Levioso.cpp index 3b989c051..4119b3388 100644 --- a/Jusin154_Team3D/Client/Private/Levioso.cpp +++ b/Jusin154_Team3D/Client/Private/Levioso.cpp @@ -108,11 +108,6 @@ void CLevioso::Late_Update(_float fTimeDelta) _vector vDir = XMLoadFloat4(&m_vEndPos) - XMLoadFloat4(&m_vStartPos); - if (true == m_pGameInstance->SphereCast(0.25f, XMLoadFloat4(&m_vStartPos), XMVector3Normalize(vDir), XMVectorGetX(XMVector3Length(vDir)) - , PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC | PSX::PxQueryFlag::eSTATIC, m_Hitbuffer)) - { - - } if (false == m_bHit) { _vector vStartPos = XMLoadFloat4(&m_vStartPos); @@ -164,9 +159,9 @@ HRESULT CLevioso::Pre_Setting(CGameObject* pObject, void* pArg) m_pInfoInstance->Get_LockOnInfo(m_Info); - if (nullptr != m_Info.pUnit) { + if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) { - XMStoreFloat4(&m_vTargetPos, Get_UnitPos(m_Info)); + XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info)); XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); } diff --git a/Jusin154_Team3D/Client/Private/Lightning.cpp b/Jusin154_Team3D/Client/Private/Lightning.cpp index 9bf3348a8..00fde485b 100644 --- a/Jusin154_Team3D/Client/Private/Lightning.cpp +++ b/Jusin154_Team3D/Client/Private/Lightning.cpp @@ -122,9 +122,9 @@ HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg) { /* 대상 위치 지정 */ m_pInfoInstance->Get_LockOnInfo(m_Info); - if (nullptr != m_Info.pUnit) { + if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) { - XMStoreFloat4(&m_vTargetPos, Get_UnitPos(m_Info)); + XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info)); XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); } diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp index 8fb32d708..8962e3cc5 100644 --- a/Jusin154_Team3D/Client/Private/NomalJap.cpp +++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp @@ -174,8 +174,8 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg) { /* 대상 위치 지정 */ m_bHit = false; m_pInfoInstance->Get_LockOnInfo(m_Info); - if (nullptr != m_Info.pUnit) { - XMStoreFloat4(&m_vTargetPos, Get_UnitPos(m_Info)); + if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) { + XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info)); if (XMVectorGetX(XMVector3Length(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))) >= 35.f) { //거리가 일정 이상이라면 그냥 정면으로 발사 XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f); diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 9f367d8e3..775944be2 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -795,6 +795,11 @@ void CPlayer::ReLockOnTarget() m_LockOnInfo.pInteractive = nullptr; } } + if (nullptr != m_LockOnInfo.pEffect) { + if (false == m_LockOnInfo.pEffect->Get_Visible()) { + m_LockOnInfo.pEffect = nullptr; + } + } //m_pLockOnMonster->Get_State } diff --git a/Jusin154_Team3D/Client/Private/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp index 28759a633..3f06fa38a 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp @@ -68,25 +68,27 @@ HRESULT CRanrok::Initialize(void* pArg) m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object(); SAFE_ADDREF(m_pEffectPool); - if (NEXT_LEVEL == ENUM_CLASS(LEVEL::FIELD)) - { - m_pCharacter_Controller->Set_Position(XMVectorSet(75.550f, 33.734f, 164.013f, 1.f)); - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(75.550f, 33.734f, 164.013f, 1.f)); - } - else { + RANROKDESC* pDesc = static_cast(pArg); + + _vector vPos = XMLoadFloat4(&pDesc->vPos); + m_pTransformCom->Set_State(STATE::POSITION, vPos); + m_pCharacter_Controller->Set_Position(vPos); + m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ)); - m_pCharacter_Controller->Set_Position(XMVectorSet(-44.704f, 6.860f, 16.071f, 1.f)); - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-44.704f, 6.860f, 16.071f, 1.f)); - } m_pModelCom->Set_DisableRootMotionScale(true); - return S_OK; } void CRanrok::Priority_Update(_float fTimeDelta) { + if (m_bFireBurst) { + m_pInfoInstance->Deregist_ActiveMonster(this); + } + else { + m_pInfoInstance->Regist_ActiveMonster(this); + } __super::Priority_Update(fTimeDelta); } @@ -189,12 +191,38 @@ void CRanrok::Update(_float fTimeDelta) #pragma region CREATE PROP - m_vCreatePropTime.x += fTimeDelta; + m_vCreatePropTime.x += fTimeDelta; - if (m_vCreatePropTime.x >= m_vCreatePropTime.y) + if (m_vCreatePropTime.x >= m_vCreatePropTime.y) + { + CEffect_Container* pEffect = nullptr; + m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_PROP, this,nullptr,&pEffect); + m_vCreatePropTime.x = 0.f; + + m_pRanrok_Props.push_back(pEffect); + } + + + _bool bAllHidden = true; + + for (auto& Props : m_pRanrok_Props) { - m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_PROP, this); - m_vCreatePropTime.x = 0.f; + if (Props->Get_Visible()) + { + bAllHidden = false; + break; + } + } + if (m_pRanrok_Props.size() == 0) { + bAllHidden = false; + } + + if (bAllHidden) + { + m_bFireBurst = false; + } + else { + m_bFireBurst = true; } #pragma endregion @@ -907,6 +935,10 @@ void CRanrok::Free() m_pCallBack_HitReport->Finalize(); } + for (auto& Props : m_pRanrok_Props) { + SAFE_RELEASE(Props); + } + m_pRanrok_Props.clear(); SAFE_RELEASE(m_pMotionTrailCom); SAFE_RELEASE(m_pCharacter_Controller); SAFE_RELEASE(m_pRigidBody); diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp index 00074da26..b512de6fe 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp @@ -60,6 +60,8 @@ HRESULT CRanrok_Prop::Initialize(void* pArg) m_fDuration = 10000.f; + m_pInfoInstance->Regist_ActiveEffect(this); + return S_OK; } @@ -141,7 +143,7 @@ HRESULT CRanrok_Prop::Pre_Setting(CGameObject* pObject, void* pArg) CEffectParts* pAppear_PT = Get_PartObject("Appear_PT"); CEffectParts* pSpline = Get_PartObject("Spline"); - + m_pTransformCom->Set_State(STATE::POSITION, vPos); m_pSphere->Set_Visible(true); m_pSphereLay->Set_Visible(true); m_pRing->Set_Visible(true); @@ -273,9 +275,8 @@ void CRanrok_Prop::OnCollision(CGameObject* pOther, void* pDesc) pBroken_PT->Set_Visible(true); pBroken_PT2->Set_Visible(true); - m_fDuration = 5.f; + m_fDuration = 2.f; m_fAccTime = 0.f; - } @@ -288,7 +289,11 @@ void CRanrok_Prop::Free() SAFE_RELEASE(m_pSphere); SAFE_RELEASE(m_pSphereLay); - SAFE_RELEASE(m_pInfoInstance); + if (nullptr != m_pInfoInstance) { + CInfoInstance* pInfo = m_pInfoInstance; + m_pInfoInstance = nullptr; + pInfo->Deregist_ActiveEffect(this); + } SAFE_RELEASE(m_pRing); SAFE_RELEASE(m_pSphereHitLay); diff --git a/Jusin154_Team3D/Client/Private/Ranrok_States.cpp b/Jusin154_Team3D/Client/Private/Ranrok_States.cpp index 437d2bedb..dda513b3b 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok_States.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok_States.cpp @@ -438,7 +438,7 @@ void CRanrok::Behavior_FireBreathExit() { m_pFSM->Disable_State(FSMSTATE::FIREBREATH); m_pModelCom->Set_HeadAimWeight(0.f); - //m_pModelCom->Play_HeadBone(false); + m_pModelCom->Play_HeadBone(false); m_fHeadAimWeight = 0.f; } @@ -552,7 +552,7 @@ void CRanrok::Behavior_FireSweepExit() { m_pFSM->Disable_State(FSMSTATE::FIRESWEEP); m_pModelCom->Set_HeadAimWeight(0.f); - //m_pModelCom->Play_HeadBone(false); + m_pModelCom->Play_HeadBone(false); m_fHeadAimWeight = 0.f; } diff --git a/Jusin154_Team3D/Client/Private/Stupefy.cpp b/Jusin154_Team3D/Client/Private/Stupefy.cpp index a6fb4f0cd..e8e7656b8 100644 --- a/Jusin154_Team3D/Client/Private/Stupefy.cpp +++ b/Jusin154_Team3D/Client/Private/Stupefy.cpp @@ -166,9 +166,9 @@ HRESULT CStupefy::Pre_Setting(CGameObject* pObject, void* pArg) { /* 대상 위치 지정 */ m_pInfoInstance->Get_LockOnInfo(m_Info); - if (nullptr != m_Info.pUnit) { + if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) { - XMStoreFloat4(&m_vTargetPos,Get_UnitPos(m_Info)); + XMStoreFloat4(&m_vTargetPos,Get_LockOnPos(m_Info)); XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); } diff --git a/Jusin154_Team3D/Client/Private/Transformation.cpp b/Jusin154_Team3D/Client/Private/Transformation.cpp index a96b2e1e5..5f91c5a19 100644 --- a/Jusin154_Team3D/Client/Private/Transformation.cpp +++ b/Jusin154_Team3D/Client/Private/Transformation.cpp @@ -130,9 +130,9 @@ HRESULT CTransformation::Pre_Setting(CGameObject* pObject, void* pArg) { /* 대상 위치 지정 */ m_pInfoInstance->Get_LockOnInfo(m_Info); - if (nullptr != m_Info.pUnit) { + if (nullptr != m_Info.pUnit || nullptr != m_Info.pEffect) { - XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos()); + XMStoreFloat4(&m_vTargetPos, Get_LockOnPos(m_Info)); XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); } @@ -223,6 +223,11 @@ void CTransformation::OnCollision(CGameObject* pOther, void* pDesc) PHYSX_USERDATA* pUserData = static_cast(pCCT->Get_Actor()->userData); switch (pUserData->eKind) { + case PHYSX_KIND::BODY_DYNAMIC: + { + return; + } + break; case PHYSX_KIND::CCTActor: { switch (PXOBJECT(pUserData->iSubKind)) diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp index 2df6cb8bc..7b77b206e 100644 --- a/Jusin154_Team3D/Client/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp @@ -304,7 +304,7 @@ void CUI_Manager::Update(_float fTimeDelta) } } - if (m_pGameInstance->Key_Down(DIK_I)) + if (m_pGameInstance->Key_Down(DIK_J)) { Change_Map(); } diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index 0b5e00c3b..ce5a47cbf 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -64,6 +64,7 @@ namespace Client CUnit* pUnit = { nullptr }; class CMapElement_Interactable* pInteractive = { nullptr }; class CMapElement_Chest* pChest = { nullptr }; + class CEffect_Container* pEffect = { nullptr }; }LOCKON_INFO; typedef struct tegNPCInteractionInfo diff --git a/Jusin154_Team3D/Client/Public/EffectInfo.h b/Jusin154_Team3D/Client/Public/EffectInfo.h new file mode 100644 index 000000000..ec0fe9f18 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/EffectInfo.h @@ -0,0 +1,47 @@ +#pragma once + +#include "Client_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CEffect_Container; +class CTransform; +NS_END + +NS_BEGIN(Client) + +class CEffectInfo final : public CBase +{ +private: + CEffectInfo(); + ~CEffectInfo() = default; +public: + void Update(_float fTimeDelta); + void Change_Level(); + + HRESULT Regist_ActiveEffect(CEffect_Container* _pEffect); + HRESULT Deregist_ActiveEffect(CEffect_Container* _pEffect); + + CEffect_Container* Get_LockOnEffect(); +private: + CGameInstance* m_pGameInstance = { nullptr }; + class CInfoInstance* m_pInfoInstance = { nullptr }; + ID3D11Device* m_pDevice = { nullptr }; + ID3D11DeviceContext* m_pContext = { nullptr }; + + class CEffect_Container* m_pLockOnEffect = { nullptr }; + list m_ActiveEffects= {}; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + HRESULT Refresh_LockOnEffects(); + HRESULT Refresh_ActiveEffects(); + + +public: + static CEffectInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Effect_Container.h b/Jusin154_Team3D/Client/Public/Effect_Container.h index 40c82e6ee..05c8a70c5 100644 --- a/Jusin154_Team3D/Client/Public/Effect_Container.h +++ b/Jusin154_Team3D/Client/Public/Effect_Container.h @@ -80,7 +80,7 @@ class CEffect_Container abstract : public CContainerObject ON_COLLISION_INFO SweepTarget(_fvector StartPos, _fvector EndPos, _float fRadius, _bool isTerrainCollision = false); ON_COLLISION_INFO MonsterSweepTarget(_fvector StartPos, _fvector EndPos, _float fRadius, _bool isTerrainCollision = false); ON_COLLISION_INFO MonsterRayCast(_fvector StartPos, _fvector vDir, _float fLength, _uint iMaxHitCapacity); - _vector Get_UnitPos(LOCKON_INFO Info); + _vector Get_LockOnPos(LOCKON_INFO Info); protected: _float4 m_vStartPos = {}; diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 8a8014438..ff3f95986 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -103,6 +103,14 @@ DECLARE_SINGLETON(CInfoInstance) void Set_Broom_Booster_Timer(_float fTimer); _float Get_Broom_Booster_Timer(); #pragma endregion +#pragma region Effect + + HRESULT Regist_ActiveEffect(CEffect_Container* pEffect); + + HRESULT Deregist_ActiveEffect(CEffect_Container* pEffect); + +#pragma endregion + private: CGameInstance* m_pGameInstance = { nullptr }; ID3D11Device* m_pDevice = { nullptr }; @@ -111,6 +119,7 @@ DECLARE_SINGLETON(CInfoInstance) class CPlayerInfo* m_pPlayerInfo = { nullptr }; class CMonsterInfo* m_pMonsterInfo = { nullptr }; class CMapInfo* m_pMapInfo = { nullptr }; + class CEffectInfo* m_pEffectInfo = { nullptr }; class CSkill_Data* m_pSkillInfo = { nullptr }; class CQuest_Data* m_pQuestInfo= { nullptr }; class CInteractiveInfo* m_pInteractiveInfo = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Ranrok.h b/Jusin154_Team3D/Client/Public/Ranrok.h index 021775d78..a5fb53746 100644 --- a/Jusin154_Team3D/Client/Public/Ranrok.h +++ b/Jusin154_Team3D/Client/Public/Ranrok.h @@ -32,6 +32,11 @@ class CRanrok final : public CMonster END }; public: + typedef struct tagRanrokInitDesc { + _float4 vPos; + _float4 vRotQ; + }RANROKDESC; + enum class RANROK_PHASE { PHASE_AIR, @@ -95,11 +100,10 @@ class CRanrok final : public CMonster _int m_ePhase = ENUM_CLASS(RANROK_PHASE::PHASE_AIR); _float m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::END)] = {}; - _float m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::END)] = { 40.f,40.f ,8.f,40.f,40.f,40.f}; + _float m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::END)] = { 40.f,40.f ,8.f,40.f,40.f,40.f }; _float m_fTuckedTime = {}; - _bool m_bFireBurst = { false }; - _bool m_bTucked = {false}; + _bool m_bTucked = { false }; _bool m_bHoverDash = { false }; vector> m_Points; @@ -115,10 +119,13 @@ class CRanrok final : public CMonster _float m_fPrevHpRatio = {}; _int m_iBreathRand = {}; _bool m_bMotionTrail = {}; + _bool m_bFireBurst = {true}; + _int m_iPropSize = {}; _float2 m_vCaptureTimer = { 0.f, 0.1f }; class CEffect_Container* m_pRanrok_Point = { nullptr }; + vector m_pRanrok_Props; _float m_fTuckedSpeed = { 90.f }; diff --git a/Jusin154_Team3D/Client/Public/Ranrok_Prop.h b/Jusin154_Team3D/Client/Public/Ranrok_Prop.h index f1fe0e72a..e75da92ec 100644 --- a/Jusin154_Team3D/Client/Public/Ranrok_Prop.h +++ b/Jusin154_Team3D/Client/Public/Ranrok_Prop.h @@ -23,6 +23,7 @@ class CRanrok_Prop final : public CEffect_Container public: virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override; + private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Ranrok.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Ranrok.xml index daf1c7bab..1277384b9 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Ranrok.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Ranrok.xml @@ -52,22 +52,26 @@ - + - + - + + + - + - + - + - + + + From 8a1616c2095fd9aa0b395180bdf834a585db03ee Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Fri, 9 Jan 2026 14:41:28 +0900 Subject: [PATCH 04/12] =?UTF-8?q?=EB=A6=AD=20=EC=9E=A1=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Private/Ranrok.cpp | 1 + Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp | 7 +------ Jusin154_Team3D/Editor/Private/Ranrok_Prop.cpp | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp index 3f06fa38a..82838ca26 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp @@ -200,6 +200,7 @@ void CRanrok::Update(_float fTimeDelta) m_vCreatePropTime.x = 0.f; m_pRanrok_Props.push_back(pEffect); + SAFE_ADDREF(pEffect); } diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp index b512de6fe..bf7f6e734 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp @@ -289,14 +289,9 @@ void CRanrok_Prop::Free() SAFE_RELEASE(m_pSphere); SAFE_RELEASE(m_pSphereLay); - if (nullptr != m_pInfoInstance) { - CInfoInstance* pInfo = m_pInfoInstance; - m_pInfoInstance = nullptr; - pInfo->Deregist_ActiveEffect(this); - } SAFE_RELEASE(m_pRing); SAFE_RELEASE(m_pSphereHitLay); - + SAFE_RELEASE(m_pInfoInstance); SAFE_RELEASE(m_pRigidBody); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Editor/Private/Ranrok_Prop.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_Prop.cpp index 784ab8102..1af34c0be 100644 --- a/Jusin154_Team3D/Editor/Private/Ranrok_Prop.cpp +++ b/Jusin154_Team3D/Editor/Private/Ranrok_Prop.cpp @@ -283,7 +283,6 @@ void CRanrok_Prop::Free() SAFE_RELEASE(m_pSphere); SAFE_RELEASE(m_pSphereLay); - SAFE_RELEASE(m_pInfoInstance); SAFE_RELEASE(m_pRing); SAFE_RELEASE(m_pSphereHitLay); From a5549c3099407f3e3c6c8f1ac8fa53301911a98e Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Fri, 9 Jan 2026 14:43:09 +0900 Subject: [PATCH 05/12] COMMIT --- .../Client/Private/Avadakedavra.cpp | 2 +- Jusin154_Team3D/Client/Private/NomalJap.cpp | 19 +++++++++--------- Jusin154_Team3D/Client/Public/NomalJap.h | 7 ++++--- .../Data/Effect/Avadakedavra/Ray_G.bin | 2 +- .../Data/Effect/Avadakedavra/Wand_Light.bin | 2 +- .../Data/Effect/Jap/Circle_Particle_Red.bin | 3 --- .../Bin/Resources/Data/Effect/Jap/JapFire.bin | 3 +++ .../Bin/Resources/Data/Effect/Jap/JapHit1.bin | 4 ++-- .../Bin/Resources/Data/Effect/Jap/JapPT0.bin | 2 +- .../Data/Effect/Jap/JapProjCircle.bin | 4 ++-- .../Resources/Data/Effect/Jap/JapProjSide.bin | 4 ++-- .../Resources/Data/Effect/Jap/JapTrail.trail | Bin 444 -> 0 bytes .../Data/Effect/JapSideEffect/Red_Trail.trail | Bin 400 -> 400 bytes .../Effect/JapSideEffect/WandParticle1.bin | 2 +- .../Effect/JapSideEffect/Wand_Light_R.bin | 2 +- .../Effect/JapSideEffect/Wand_Red_Long.bin | 2 +- .../Resources/Data/Effect/NPCJap/JapFire.bin | 3 +++ .../Resources/Data/Effect/NPCJap/JapHit0.bin | 3 +++ .../Resources/Data/Effect/NPCJap/JapHit1.bin | 3 +++ .../Resources/Data/Effect/NPCJap/JapPT0.bin | 3 +++ .../Data/Effect/NPCJap/JapProjCircle.bin | 3 +++ .../Data/Effect/NPCJap/JapProjSide.bin | 3 +++ .../Bin/Resources/Data/Effect/Package/Jap.bin | 4 ++-- .../Resources/Data/Effect/Package/NPCJap.bin | 3 +++ Jusin154_Team3D/Editor/Private/Loader.cpp | 2 +- Jusin154_Team3D/Editor/Private/NomalJap.cpp | 18 +++++++++-------- Jusin154_Team3D/Editor/Public/NomalJap.h | 5 +++-- 27 files changed, 67 insertions(+), 41 deletions(-) delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/Circle_Particle_Red.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapFire.bin delete mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapTrail.trail create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJap/JapFire.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJap/JapHit0.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJap/JapHit1.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJap/JapPT0.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJap/JapProjCircle.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJap/JapProjSide.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/NPCJap.bin diff --git a/Jusin154_Team3D/Client/Private/Avadakedavra.cpp b/Jusin154_Team3D/Client/Private/Avadakedavra.cpp index 80e3b6977..8fdf772f6 100644 --- a/Jusin154_Team3D/Client/Private/Avadakedavra.cpp +++ b/Jusin154_Team3D/Client/Private/Avadakedavra.cpp @@ -123,7 +123,7 @@ HRESULT CAvadakedavra::Pre_Setting(CGameObject* pObject, void* pArg) } else { // 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정 - XMStoreFloat4(&m_vTargetPos, vWandPos + vDirection * m_fLinearSpeed * 0.5f); + XMStoreFloat4(&m_vTargetPos, vWandPos + vDirection * m_fLinearSpeed * 2.f); } } diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp index 8fb32d708..8a2e37945 100644 --- a/Jusin154_Team3D/Client/Private/NomalJap.cpp +++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp @@ -51,9 +51,12 @@ HRESULT CNomalJap::Initialize(void* pArg) m_pProjectile_Side = Get_PartObject("JapProjSide"); m_pProjectile = Get_PartObject("JapProjCircle"); + m_pJapFire = Get_PartObject("JapFire"); SAFE_ADDREF(m_pProjectile); SAFE_ADDREF(m_pProjectile_Side); + SAFE_ADDREF(m_pJapFire); + m_fDuration = 1.7f; assert(m_fDuration > 0.f); @@ -87,6 +90,7 @@ void CNomalJap::Update(_float fTimeDelta) // 선속도 m_pProjectile_Side->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); m_pProjectile->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); + m_pJapFire->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); //Up벡터 방향으로 파이만큼 이동 @@ -97,6 +101,7 @@ void CNomalJap::Update(_float fTimeDelta) m_pProjectile_Side->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fAccRotateTime) * m_fRotateAmount); m_pProjectile->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fAccRotateTime) * m_fRotateAmount); + m_pJapFire->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fAccRotateTime) * m_fRotateAmount); // 내 라이트 방향으로 좌우무빙 하도록 해보자 @@ -108,6 +113,7 @@ void CNomalJap::Update(_float fTimeDelta) m_pProjectile_Side->Get_Component()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount); m_pProjectile->Get_Component()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount); + m_pJapFire->Get_Component()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount); XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion()); @@ -128,7 +134,6 @@ void CNomalJap::Late_Update(_float fTimeDelta) OnCollision(this, &CollisionInfo); } - Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta); __super::Late_Update(fTimeDelta); } @@ -148,14 +153,12 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg) /* 초기 객체 위치 초기화 */ m_pProjectile->Get_Component()->Set_State(STATE::POSITION, vStartPos); m_pProjectile_Side->Get_Component()->Set_State(STATE::POSITION, vStartPos); + m_pJapFire->Get_Component()->Set_State(STATE::POSITION, vStartPos); /* 초기 객체 비지블 */ m_pProjectile->Set_Visible(true); m_pProjectile_Side->Set_Visible(true); - - /*트레일 초기화 */ - Get_PartObject()->Set_Visible(true); - Get_PartObject()->Get_Component()->Reset_Trail(); + m_pJapFire->Set_Visible(true); _uint iIndex = *static_cast<_uint*>(pArg); @@ -305,10 +308,8 @@ void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc) m_pProjectile_Side->Set_Visible(false); m_pProjectile->Set_Visible(false); - Get_PartObject("Circle_Particle_Red")->Set_Visible(false); + m_pJapFire->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -9999.f, 0.f, 1.f)); - Get_PartObject()->Set_Visible(false); - Get_PartObject()->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f)); } m_bHitShield = false; } @@ -319,7 +320,7 @@ void CNomalJap::Free() Safe_Release(m_pProjectile); Safe_Release(m_pProjectile_Side); - + Safe_Release(m_pJapFire); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Public/NomalJap.h b/Jusin154_Team3D/Client/Public/NomalJap.h index f35e408ca..b14c0adda 100644 --- a/Jusin154_Team3D/Client/Public/NomalJap.h +++ b/Jusin154_Team3D/Client/Public/NomalJap.h @@ -39,9 +39,10 @@ class CNomalJap final : public CEffect_Container , _float4(95.f , 0.f , 0.f , 0.f) , _float4(105.f , 250.f , 35.f , 60.f) }; - class CPartObject* m_pProjectile = {}; - class CPartObject* m_pProjectile_Side = {}; - + class CPartObject* m_pProjectile = { nullptr }; + class CPartObject* m_pProjectile_Side = { nullptr }; + class CPartObject* m_pJapFire = { nullptr }; + _float3 m_vRotateUp = {}; _float m_fAccMoveTime = {}; _float m_fAccRotateTime = {}; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin index e01291a4d..0ba78626b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8d7c407ee23c30331c42ff10fad8a38741b282f4ef0880d7acac8734cab8ab7 +oid sha256:ba19724cd428b4806e260d20154e6c2d72ae57c848160cc73c501562ed762902 size 1300 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Wand_Light.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Wand_Light.bin index e25478faa..bd5eba508 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Wand_Light.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Wand_Light.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:793ff7c5fde69a91b01b1d77ea428b1e17bd522313898a0599cdf54812ec2274 +oid sha256:fa010a163e72a609b740f3897b945d0558594f6d97a65d720c46312ac3e4f0f3 size 1241 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/Circle_Particle_Red.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/Circle_Particle_Red.bin deleted file mode 100644 index 6945b7aae..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/Circle_Particle_Red.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a5a33a2544d9b6676a1e8b60773dc9fa771b492a1400f056a66d2fdabf28ca30 -size 1163 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapFire.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapFire.bin new file mode 100644 index 000000000..ae86555be --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapFire.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4efecd1551fc1c3694a535e3ce1623c66a8542f89d153c6df6c5679d51606b3f +size 1194 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin index 5dc4f5018..b52e4abc7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d09fa6144794fe138c85badb897593a89a0b5f53729b06a407f70eb7f3efebb6 -size 1213 +oid sha256:4bf8fd3dd16d4a8e021afef9d78a7e019008e86be6e953cb4a34842ded5f4468 +size 1188 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin index c5073c0a6..595b3045d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c8e58f580b2b2477c99438d13a986354dd663194ac0b801d00cd508de5cdc22 +oid sha256:d653bb77fbf77aced1de7c36ea726c3978c9f86599da9fe03eed55ad98afdc4f size 1163 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjCircle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjCircle.bin index 5dee67523..6c67757e0 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjCircle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjCircle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a13405461fa08241f95dfe78084be873e0e56b85c10393804054c5f572b1bf0e -size 1248 +oid sha256:468db2885ece2f11f06e935d188c478bc18cadc622e31f4e640f259270ada3a3 +size 1195 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjSide.bin index 4dfd594a1..d7d484120 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjSide.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapProjSide.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9168b3d57908e617f91a43bd24293883def9677008d6b9e3ad5c63bdef31b930 -size 1166 +oid sha256:039070156dfe15aa4886ff09d242d8d3b3de7be4075a787e0d3b246643450bcc +size 1158 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapTrail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapTrail.trail deleted file mode 100644 index 2699b3bafd23675cfb1b413b4b20bffd8d639b88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 444 zcmY#qfPjFa{F3~V%7WDRkkpEj(jp)o?-mj7mI-9J7bT`-rskCx#k(*V;8Y(5R2~9X z>y(<9>yclSS(Tqxl9)q@MpXhfdgf)vhi4WS#2bLz2Lfl$_}D@}Q^mKFEGXll?4}G<5eJ$z8$iN6u0~8Am4MkB4(E%Yttc>hA6M5}G7-U|x zNT0oC48L7k+A*LW28NjaLw1Zn3xP~9ALszExlBNT X-Sx!<4nTEaH6XFhjt;wtU*-S+mir#S delta 86 zcmbQhJb`(_3ZJuQd~6w@0Lb18Vlsk=vuDpTFf`bMaC=*u9SDE?P+-Rh6z96GY("JapProjSide"); m_pProjectile = Get_PartObject("JapProjCircle"); + m_pJapFire = Get_PartObject("JapFire"); SAFE_ADDREF(m_pProjectile); SAFE_ADDREF(m_pProjectile_Side); + SAFE_ADDREF(m_pJapFire); m_fDuration = 1.7f; assert(m_fDuration > 0.f); @@ -85,6 +87,7 @@ void CNomalJap::Update(_float fTimeDelta) // 선속도 m_pProjectile_Side->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); m_pProjectile->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); + m_pJapFire->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); //Up벡터 방향으로 파이만큼 이동 @@ -95,6 +98,7 @@ void CNomalJap::Update(_float fTimeDelta) m_pProjectile_Side->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fAccRotateTime) * m_fRotateAmount); m_pProjectile->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fAccRotateTime) * m_fRotateAmount); + m_pJapFire->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fAccRotateTime) * m_fRotateAmount); // 내 라이트 방향으로 좌우무빙 하도록 해보자 @@ -106,6 +110,7 @@ void CNomalJap::Update(_float fTimeDelta) m_pProjectile_Side->Get_Component()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount); m_pProjectile->Get_Component()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount); + m_pJapFire->Get_Component()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount); XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion()); @@ -130,8 +135,6 @@ void CNomalJap::Late_Update(_float fTimeDelta) _vector vEndPos = m_pProjectile->Get_WorldPostion(); SweepTarget(vStartPos, vEndPos, 0.002f); } - Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta); - __super::Late_Update(fTimeDelta); } @@ -150,14 +153,13 @@ HRESULT CNomalJap::Pre_Setting(CGameObject* pObject, void* pArg) /* 초기 객체 위치 초기화 */ m_pProjectile->Get_Component()->Set_State(STATE::POSITION, vStartPos); m_pProjectile_Side->Get_Component()->Set_State(STATE::POSITION, vStartPos); + m_pJapFire->Get_Component()->Set_State(STATE::POSITION, vStartPos); /* 초기 객체 비지블 */ m_pProjectile->Set_Visible(true); m_pProjectile_Side->Set_Visible(true); + m_pJapFire->Set_Visible(true); - /*트레일 초기화 */ - Get_PartObject()->Set_Visible(true); - Get_PartObject()->Get_Component()->Reset_Trail(); _uint iIndex = *static_cast<_uint*>(pArg); @@ -297,10 +299,9 @@ void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc) m_pProjectile_Side->Set_Visible(false); m_pProjectile->Set_Visible(false); - Get_PartObject("Circle_Particle_Red")->Set_Visible(false); + m_pJapFire->Set_Visible(false); + - Get_PartObject()->Set_Visible(false); - Get_PartObject()->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f)); dynamic_cast(m_pOwner->Get_Owner())->Start_CameraShake(0.2f, 1.f); } @@ -310,6 +311,7 @@ void CNomalJap::Free() Safe_Release(m_pProjectile); Safe_Release(m_pProjectile_Side); + SAFE_RELEASE(m_pJapFire); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Editor/Public/NomalJap.h b/Jusin154_Team3D/Editor/Public/NomalJap.h index 9500cb71f..b759ac736 100644 --- a/Jusin154_Team3D/Editor/Public/NomalJap.h +++ b/Jusin154_Team3D/Editor/Public/NomalJap.h @@ -40,8 +40,9 @@ class CNomalJap final : public CEffect_Container , _float4(35.f , 0.f , 0.f , 0.f) , _float4(45.f , 250.f , 35.f , 60.f) }; - class CPartObject* m_pProjectile = {}; - class CPartObject* m_pProjectile_Side = {}; + class CPartObject* m_pProjectile = { nullptr }; + class CPartObject* m_pProjectile_Side = { nullptr }; + class CEditEffect* m_pJapFire = { nullptr }; _float3 m_vRotateUp = {}; _float m_fAccMoveTime = {}; From ca24438ee48e936cb6d5e58855fac87736047503 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 9 Jan 2026 14:43:42 +0900 Subject: [PATCH 06/12] [merge commit] --- Jusin154_Team3D/Client/Private/Level_GamePlay.cpp | 12 ++++++------ Jusin154_Team3D/Client/Private/Loader.cpp | 8 ++++---- Jusin154_Team3D/Engine/Public/Model.h | 1 + 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 18ad23144..eb53ed589 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -310,9 +310,9 @@ HRESULT CLevel_GamePlay::Ready_Background() isReady_Hogwart = false; #endif // #ifdef 기무리 - isReady_Background = false; - isReady_Hogsmeade = false; - isReady_Hogwart = false; + isReady_Background = true; + isReady_Hogsmeade = true; + isReady_Hogwart = true; #endif // #ifdef 나 isReady_Background = true; @@ -899,8 +899,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) isLoad_NPC = false; #endif // #ifdef 기무리 - isLoad_NPC = false; - isLoad_RandomNPC = false; + isLoad_NPC = true; + isLoad_RandomNPC = true; #endif // #ifdef 나 isLoad_RandomNPC = true; @@ -998,7 +998,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster() isLoad_Monster = true; #endif // #ifdef 기무리 - isLoad_Monster = false; + isLoad_Monster = true; #endif // #ifdef 나 diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 0477383d9..5a7b55d47 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -423,10 +423,10 @@ HRESULT CLoader::Loading_For_GamePlay() isLoad_UI_SEQUANTIAL = false; #endif // #ifdef 기무리 - isLoad_Background = false; - isLoad_Hogwart = false; - isLoad_UI_SEQUANTIAL = false; - isLoad_NPC = false; + isLoad_Background = true; + isLoad_Hogwart = true; + isLoad_UI_SEQUANTIAL = true; + isLoad_NPC = true; isLoad_Monster = true; #endif // #ifdef 나 diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index 0bd423c10..3269564bc 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -247,6 +247,7 @@ class ENGINE_DLL CModel final : public CComponent _bool m_bIsSecondFinishedAnim = { false }; _bool m_bIsSecondLoop = { false }; _bool m_bRatio = { false }; + _float m_fRatio = { 0.f }; _bool m_bRootBone = {}; _float4x4 m_RootMatrix = {}; _bool m_bDisableRootMotionScale = {false}; From dfd3f9441ab2acfce185328ec0285b5354b1ed9c Mon Sep 17 00:00:00 2001 From: kimnuri Date: Fri, 9 Jan 2026 15:03:04 +0900 Subject: [PATCH 07/12] =?UTF-8?q?[add]=20=EC=8B=9C=EB=84=A4=EB=A7=88?= =?UTF-8?q?=ED=8B=B1=20=EB=94=94=EB=B2=84=EA=B7=B8=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp b/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp index 987f202b0..bda5fccbe 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Cinematic.cpp @@ -18,6 +18,14 @@ CCamera_Cinematic::CCamera_Cinematic(const CCamera_Cinematic& rhs) void CCamera_Cinematic::Priority_Update(_float fTimeDelta) { +#ifdef _DEBUG + if (m_pGameInstance->Key_Pressing(DIK_HOME)) { + if (m_pGameInstance->Key_Up(DIK_END)) { + _string strCutSceneName = "RanrokIntro"; + m_pInfoInstance->Active_Event(strCutSceneName); + } + } +#endif // _DEBUG if (false == m_bActive) { return; } From c464de556e19632b60193e6b217c8bbfd732bce8 Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Fri, 9 Jan 2026 15:03:42 +0900 Subject: [PATCH 08/12] =?UTF-8?q?=EB=A6=AD=20=EC=A7=84=EC=A7=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Private/Level_GamePlay.cpp | 4 ++-- Jusin154_Team3D/Client/Private/Ranrok.cpp | 1 - Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp | 5 +++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index ead8c2553..86175a627 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -907,7 +907,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) #endif // #ifdef Bin isLoad_NPC = true; - isLoad_RandomNPC = false; + isLoad_RandomNPC = true; #endif // Bin #endif // _DEBUG @@ -949,7 +949,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) } CHuman_Duelist::DUELISTDESC DuelistDesc = {}; - DuelistDesc.vPos = _float4(1007.032f, 1.085f, 1008.370f, 1.f); + DuelistDesc.vPos = _float4(1003.f, 5.f, 1005.f, 1.f); DuelistDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &DuelistDesc))) { return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp index 82838ca26..3f06fa38a 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp @@ -200,7 +200,6 @@ void CRanrok::Update(_float fTimeDelta) m_vCreatePropTime.x = 0.f; m_pRanrok_Props.push_back(pEffect); - SAFE_ADDREF(pEffect); } diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp index bf7f6e734..f3ae36c38 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp @@ -289,6 +289,11 @@ void CRanrok_Prop::Free() SAFE_RELEASE(m_pSphere); SAFE_RELEASE(m_pSphereLay); + + if (nullptr != m_pInfoInstance) { + CInfoInstance* pInfo = m_pInfoInstance; + pInfo->Deregist_ActiveEffect(this); + } SAFE_RELEASE(m_pRing); SAFE_RELEASE(m_pSphereHitLay); SAFE_RELEASE(m_pInfoInstance); From c00e5a8a3246856d861181ce278252f3fcb1b5b0 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Fri, 9 Jan 2026 15:07:22 +0900 Subject: [PATCH 09/12] commit --- .../Client/Default/Client.vcxproj.filters | 3 +++ .../Client/Private/Duelist_NormalJap.cpp | 22 ++++++++++-------- .../Client/Public/Duelist_NormalJap.h | 1 + .../Data/Effect/NPCJapSide/WandParticle1.bin | 3 +++ .../Data/Effect/NPCJapSide/Wand_Light_Y.bin | 3 +++ .../Effect/NPCJapSide/Wand_Yellow_Long.bin | 3 +++ .../Data/Effect/NPCJapSide/Yellow_Trail.trail | Bin 0 -> 400 bytes .../Data/Effect/Package/NPCJapSide.bin | 3 +++ 8 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/WandParticle1.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Wand_Light_Y.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Wand_Yellow_Long.bin create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Yellow_Trail.trail create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/NPCJapSide.bin diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index ac19d5181..b861038c2 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -1872,6 +1872,9 @@ {ee5c9922-7c5c-45a2-a53d-7df30172fbaf} + + {f2ddb6fa-89b6-4322-912e-61e0ce79278c} + diff --git a/Jusin154_Team3D/Client/Private/Duelist_NormalJap.cpp b/Jusin154_Team3D/Client/Private/Duelist_NormalJap.cpp index 7bb28d635..5ba1b2ff9 100644 --- a/Jusin154_Team3D/Client/Private/Duelist_NormalJap.cpp +++ b/Jusin154_Team3D/Client/Private/Duelist_NormalJap.cpp @@ -24,7 +24,7 @@ CDuelist_NormalJap::CDuelist_NormalJap(const CDuelist_NormalJap& rhs) HRESULT CDuelist_NormalJap::Initialize_Prototype() { - if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Jap"))) { + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/NPCJap"))) { return E_FAIL; } @@ -46,15 +46,17 @@ HRESULT CDuelist_NormalJap::Initialize(void* pArg) m_iSkillType = ENUM_CLASS(SKILL_TYPE::DUELIST_JAP); - m_wstrEffectName = L"Nomal_Jap"; + m_wstrEffectName = L"NPCJap"; m_pProjectile_Side = Get_PartObject("JapProjSide"); m_pProjectile = Get_PartObject("JapProjCircle"); + m_pJapFire = Get_PartObject("JapFire"); SAFE_ADDREF(m_pProjectile); SAFE_ADDREF(m_pProjectile_Side); + SAFE_ADDREF(m_pJapFire); m_fDuration = 1.7f; assert(m_fDuration > 0.f); @@ -88,6 +90,7 @@ void CDuelist_NormalJap::Update(_float fTimeDelta) // 선속도 m_pProjectile_Side->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); m_pProjectile->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); + m_pJapFire->Get_Component()->Translation(vDirection * m_fLinearSpeed * fTimeDelta); //Up벡터 방향으로 파이만큼 이동 @@ -98,6 +101,7 @@ void CDuelist_NormalJap::Update(_float fTimeDelta) m_pProjectile_Side->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fAccRotateTime) * m_fRotateAmount); m_pProjectile->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fAccRotateTime) * m_fRotateAmount); + m_pJapFire->Get_Component()->Translation(XMLoadFloat3(&m_vRotateUp) * sinf(m_fAccRotateTime) * m_fRotateAmount); // 내 라이트 방향으로 좌우무빙 하도록 해보자 @@ -109,6 +113,7 @@ void CDuelist_NormalJap::Update(_float fTimeDelta) m_pProjectile_Side->Get_Component()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount); m_pProjectile->Get_Component()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount); + m_pJapFire->Get_Component()->Translation(XMLoadFloat3(&m_vRotateRight) * sinf(m_fAccZigZagTime) * m_fZigZagAmount); XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion()); @@ -128,7 +133,6 @@ void CDuelist_NormalJap::Late_Update(_float fTimeDelta) OnCollision(this, &CollisionInfo); } - Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta); __super::Late_Update(fTimeDelta); } @@ -148,14 +152,12 @@ HRESULT CDuelist_NormalJap::Pre_Setting(CGameObject* pObject, void* pArg) /* 초기 객체 위치 초기화 */ m_pProjectile->Get_Component()->Set_State(STATE::POSITION, vStartPos); m_pProjectile_Side->Get_Component()->Set_State(STATE::POSITION, vStartPos); + m_pJapFire->Get_Component()->Set_State(STATE::POSITION, vStartPos); /* 초기 객체 비지블 */ m_pProjectile->Set_Visible(true); m_pProjectile_Side->Set_Visible(true); - - /*트레일 초기화 */ - Get_PartObject()->Set_Visible(true); - Get_PartObject()->Get_Component()->Reset_Trail(); + m_pJapFire->Set_Visible(true); _uint iIndex = *static_cast<_uint*>(pArg); @@ -310,11 +312,10 @@ void CDuelist_NormalJap::OnCollision(CGameObject* pOther, void* pDesc) m_pProjectile_Side->Set_Visible(false); m_pProjectile->Set_Visible(false); - Get_PartObject("Circle_Particle_Red")->Set_Visible(false); - Get_PartObject()->Set_Visible(false); - Get_PartObject()->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f)); + m_pJapFire->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -9999.f, 0.f, 1.f)); } + m_bHitShield = false; } @@ -324,6 +325,7 @@ void CDuelist_NormalJap::Free() Safe_Release(m_pProjectile); Safe_Release(m_pProjectile_Side); + SAFE_RELEASE(m_pJapFire); } #ifdef _DEBUG diff --git a/Jusin154_Team3D/Client/Public/Duelist_NormalJap.h b/Jusin154_Team3D/Client/Public/Duelist_NormalJap.h index 281ffbe6f..ff538a6d7 100644 --- a/Jusin154_Team3D/Client/Public/Duelist_NormalJap.h +++ b/Jusin154_Team3D/Client/Public/Duelist_NormalJap.h @@ -41,6 +41,7 @@ class CDuelist_NormalJap final : public CEffect_Container class CPartObject* m_pProjectile = {}; class CPartObject* m_pProjectile_Side = {}; + class CPartObject* m_pJapFire = { nullptr }; _float3 m_vRotateUp = {}; _float m_fAccMoveTime = {}; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/WandParticle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/WandParticle1.bin new file mode 100644 index 000000000..e9008ac2b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/WandParticle1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f49efc114edf1ad7f84544c2aae1c6369aec77ea05e66bc9698fde8dac1b4da +size 1208 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Wand_Light_Y.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Wand_Light_Y.bin new file mode 100644 index 000000000..aaf350e28 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Wand_Light_Y.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23aec13d5cee1fac4eb140c7877f62a105f703478a543caa7064a1150d5fa456 +size 1145 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Wand_Yellow_Long.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Wand_Yellow_Long.bin new file mode 100644 index 000000000..bfc746bc0 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Wand_Yellow_Long.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2904ede05f1f9c4dd11085081a57afa79b7a57f563a487585dbcd74ab93a8cfc +size 1169 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Yellow_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/NPCJapSide/Yellow_Trail.trail new file mode 100644 index 0000000000000000000000000000000000000000..7b7c76103cef0016c7921d12feb8b29914533297 GIT binary patch literal 400 zcmZQzfB;1(9Z-~Cl3!9;kQyJ7T2WG3lo}uA77-s3?_89aoL%f1@4{d}K&5+8VoGLe zUWrp`Vy;JiQD#+sUP)pO2^zyvi%K$+fm)n%5_1cH8bM&z%$c@Oi$UzYAT}e2ID7Ui z14Dy72p{d&x1ZOz!tUdT0y{>aIM;P$yX%V!9DwS;YCvM!cUObeg0w;aNG}7!;jb_3 mVCEobs1hWK5ojSq9xQma`GA)l6Oug0QS3lIE3z2z?6Uw*7h4hl literal 0 HcmV?d00001 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/NPCJapSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/NPCJapSide.bin new file mode 100644 index 000000000..b9e4caa62 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/NPCJapSide.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0db1cd5cd9023a273267a9ef0de7f7f7390c500346cdfe18d6894111dedb0b69 +size 271 From 019421ddd2aef20f16ac0852d7cf44c3092f4de9 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Fri, 9 Jan 2026 15:11:42 +0900 Subject: [PATCH 10/12] commit --- Jusin154_Team3D/Client/Private/Level_GamePlay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 86175a627..2582c1206 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -895,8 +895,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) isLoad_RandomNPC = false; #endif // gimch #ifdef 진우 - isLoad_RandomNPC = false; - isLoad_NPC = false; + isLoad_RandomNPC = true; + isLoad_NPC = true; #endif // #ifdef 기무리 isLoad_NPC = true; From 4d1daa5eb7f23ee86d6c48208d80ae798e3081bb Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Fri, 9 Jan 2026 15:35:40 +0900 Subject: [PATCH 11/12] commit --- Jusin154_Team3D/Client/Default/Client.vcxproj | 2 + .../Client/Default/Client.vcxproj.filters | 6 + .../Client/Private/Duelist_JapSide.cpp | 224 ++++++++++++++++++ .../Client/Private/Human_Duelist_States.cpp | 2 +- Jusin154_Team3D/Client/Private/Loader.cpp | 5 + Jusin154_Team3D/Client/Private/Player.cpp | 1 + Jusin154_Team3D/Client/Public/Client_Enum.h | 2 +- .../Client/Public/Duelist_JapSide.h | 54 +++++ .../Data/Effect/Avadakedavra/Ray_G.bin | 2 +- 9 files changed, 295 insertions(+), 3 deletions(-) create mode 100644 Jusin154_Team3D/Client/Private/Duelist_JapSide.cpp create mode 100644 Jusin154_Team3D/Client/Public/Duelist_JapSide.h diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 9a4e4d6f2..69616d59c 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -189,6 +189,7 @@ call Update_Resources.bat + @@ -485,6 +486,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index b861038c2..5b7ea45ed 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -902,6 +902,9 @@ 03.InfoInstance\05.EffectInfo + + 02.GameObjects\Effect\Effects\NomalJap\Duelist_JapSide + @@ -2730,6 +2733,9 @@ 03.InfoInstance\05.EffectInfo + + 02.GameObjects\Effect\Effects\NomalJap\Duelist_JapSide + diff --git a/Jusin154_Team3D/Client/Private/Duelist_JapSide.cpp b/Jusin154_Team3D/Client/Private/Duelist_JapSide.cpp new file mode 100644 index 000000000..db4ac2f7b --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Duelist_JapSide.cpp @@ -0,0 +1,224 @@ +#include "pch.h" +#include "Duelist_JapSide.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Player.h" +#include "Wand.h" +#include "TrailObject.h" + + +CDuelist_JapSide::CDuelist_JapSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CDuelist_JapSide::CDuelist_JapSide(const CDuelist_JapSide& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CDuelist_JapSide::Initialize_Prototype() +{ + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/NPCJapSide"))) + return E_FAIL; + + return S_OK; +} + +HRESULT CDuelist_JapSide::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"NPCJapSide"; + + + m_pWandParticle = Get_PartObject("WandParticle1"); + m_pWandLight = Get_PartObject("Wand_Yellow_Long"); + m_pWandLight_R = Get_PartObject("Wand_Light_Y"); + m_pWandTrail = Get_PartObject(); + + SAFE_ADDREF(m_pWandLight); + SAFE_ADDREF(m_pWandTrail); + SAFE_ADDREF(m_pWandParticle); + SAFE_ADDREF(m_pWandLight_R); + + m_Events.emplace(0.6f, [&]() { + + // 파티클 제어 + m_isParticleEnd = true; + m_pWandParticle->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f)); + + + // 트레일 제어 + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_isTrailEnd = true; + + XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix()); + m_pWandLight_R->Set_Visible(false); + + }); + + m_fDuration = 2.f; + + return S_OK; +} + +void CDuelist_JapSide::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CDuelist_JapSide::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + m_pWandLight_R->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + + // 파티클생성이 막히면 실행되지 않음 + if (m_isParticleEnd == false) + m_pWandParticle->Get_Component()->Set_WorldMatrix(pWand->Get_WorldMatrix()); + + // 트레일이 종료되면 위치를 고정함 + _matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix(); + m_pWandTrail->Trail_Update(TrailMat, fTimeDelta); + +} + +void CDuelist_JapSide::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CDuelist_JapSide::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return E_FAIL; + + m_pWandParticle->Set_Visible(true); + m_isParticleEnd = false; // 파티클이 일정시간이 되면 나오지 않게 하려고 + + m_pWandLight->Set_Visible(true); + m_pWandLight_R->Set_Visible(true); + + /*트레일 초기화 */ + m_pWandTrail->Set_Visible(true); + m_isTrailEnd = false; + m_pWandTrail->Get_Component()->Reset_Trail(); + + /*_vector pPos = pPlayer->Get_WandPos().r[3];*/ + + m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + m_pWandLight_R->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + return S_OK; +} + +HRESULT CDuelist_JapSide::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CDuelist_JapSide::Ready_Child() +{ + return S_OK; +} + +CDuelist_JapSide* CDuelist_JapSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CDuelist_JapSide* pInstance = new CDuelist_JapSide(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CDuelist_JapSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CDuelist_JapSide::Clone(void* pArg, CGameObject* pOwner) +{ + CDuelist_JapSide* pInstance = new CDuelist_JapSide(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CDuelist_JapSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CDuelist_JapSide::OnCollision(CGameObject* pOther, void* pDesc) +{ + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CDuelist_JapSide::Free() +{ + __super::Free(); + + + Safe_Release(m_pWandLight); + Safe_Release(m_pWandTrail); + Safe_Release(m_pWandParticle); + Safe_Release(m_pWandLight_R); + +} +#ifdef _DEBUG + +void CDuelist_JapSide::Describe_Entity() +{ + +} + +#endif // _DEBUG + +HRESULT CDuelist_JapSide::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp b/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp index 676f43382..876011eb1 100644 --- a/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp +++ b/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp @@ -147,7 +147,7 @@ void CHuman_Duelist::Behavior_LightAttackEnter() fRatio); Add_Event(pairAnimInfo.first, - [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE, Get_PartObject()); }, + [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::DUELIST_JAPSIDE, Get_PartObject()); }, 0.0f); m_fSkillCoolTime[ENUM_CLASS(SKILL::LIGHT_ATTACK)] = m_fMaxSkillCoolTime[ENUM_CLASS(SKILL::LIGHT_ATTACK)]; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index efdfb76ca..067cb1cdc 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -198,6 +198,7 @@ #include "EffectPool.h" #include "Levioso.h" #include "Duelist_Levioso.h" +#include "Duelist_JapSide.h" #include "Lumos.h" #include "Accio.h" #include "Blink.h" @@ -2526,6 +2527,10 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDuelist_JapSide::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CLumos::Create(m_pDevice, m_pContext)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 775944be2..2235bf758 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -104,6 +104,7 @@ HRESULT CPlayer::Initialize(void* pArg) } #ifdef _DEBUG + m_BasicEffect = make_unique(m_pDevice); m_BasicEffect->SetVertexColorEnabled(true); m_BasicEffect->SetView(m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW)); diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 06d0ae797..a17d5ea5b 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -86,7 +86,7 @@ namespace Client RANROK_GROUNDPULSE, RANROK_SWIPE , RANROK_DEAD_SPLASH, RANROK_DEAD_IMPACT, RANROK_PROP, /*듀얼리스트*/ - DUELIST_JAP, DUELIST_LEVIOSO, DUELIST_PROTEGO, + DUELIST_JAP, DUELIST_JAPSIDE , DUELIST_LEVIOSO, DUELIST_PROTEGO, END }; diff --git a/Jusin154_Team3D/Client/Public/Duelist_JapSide.h b/Jusin154_Team3D/Client/Public/Duelist_JapSide.h new file mode 100644 index 000000000..47d15d1f3 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Duelist_JapSide.h @@ -0,0 +1,54 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CDuelist_JapSide final : public CEffect_Container +{ +private: + CDuelist_JapSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CDuelist_JapSide(const CDuelist_JapSide& rhs); + virtual ~CDuelist_JapSide() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + +public: + virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + + _bool m_isParticleEnd = {}; + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + + class CEffectParts* m_pWandLight_R = { nullptr }; + class CEffectParts* m_pWandLight = { nullptr }; + class CTrailObject* m_pWandTrail = { nullptr }; + class CEffectParts* m_pWandParticle = { nullptr }; + +public: + static CDuelist_JapSide* 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 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin index 0ba78626b..327dbedf2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba19724cd428b4806e260d20154e6c2d72ae57c848160cc73c501562ed762902 +oid sha256:a35312dd934635834bb771836a539b7952bc761950ca653efee45683530962ff size 1300 From 7c7b322e64bdf35c7d3d2bc5a7c540708a96d8b8 Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Fri, 9 Jan 2026 16:18:57 +0900 Subject: [PATCH 12/12] =?UTF-8?q?[Fix]=20=EB=A7=B5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Private/BroomRaceManager.cpp | 6 ++++-- Jusin154_Team3D/Client/Private/BuildingContainer.cpp | 2 +- Jusin154_Team3D/Client/Private/Human_Duelist.cpp | 4 ++++ Jusin154_Team3D/Client/Private/Level_GamePlay.cpp | 12 ++++++------ Jusin154_Team3D/Client/Private/MapObject_Render.cpp | 9 +++------ Jusin154_Team3D/Client/Private/Ranrok.cpp | 2 +- Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp | 2 +- Jusin154_Team3D/Client/Public/Ranrok.h | 2 +- 8 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp b/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp index f26f062cd..f13b319b6 100644 --- a/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp +++ b/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp @@ -473,7 +473,7 @@ void CBroomRaceManager::RaceReady() CTransform* pTransform = racer.pAI->Get_Component(); _float fRand = m_pGameInstance->Real_Random_Float(-10.f, 10.f); - spawnPos.m128_f32[0] += fRand; + spawnPos.m128_f32[2] += fRand; pTransform->Set_State(STATE::POSITION, spawnPos); pTransform->LookAt(pRingTransform->Get_State(STATE::POSITION)); @@ -482,8 +482,10 @@ void CBroomRaceManager::RaceReady() } else if (racer.pRacer) { + /*CTransform* pTransform = + racer.pRacer->Get_Component();*/ CTransform* pTransform = - racer.pRacer->Get_Component(); + racer.pRacer->Get_Broom()->Get_Component(); CCharacter_Controller* pCharacter = racer.pRacer->Get_Component(); pCharacter->Set_Position(spawnPos); pTransform->LookAt(pRingTransform->Get_State(STATE::POSITION)); diff --git a/Jusin154_Team3D/Client/Private/BuildingContainer.cpp b/Jusin154_Team3D/Client/Private/BuildingContainer.cpp index 279b1666d..36fe81431 100644 --- a/Jusin154_Team3D/Client/Private/BuildingContainer.cpp +++ b/Jusin154_Team3D/Client/Private/BuildingContainer.cpp @@ -35,7 +35,7 @@ void CBuildingContainer::Update(_float fTimeDelta) void CBuildingContainer::Late_Update(_float fTimeDelta) { if (m_pGameInstance->IsIn_WorldFrustum(XMVectorSetW(XMLoadFloat3(&m_vExtentWorldPosition), 1.f), m_fRadius)) { - if (m_fCamDepth > 100.f) + if (m_fCamDepth > 300.f) { if (m_pOcclusionQueryCom->isDraw()) __super::Late_Update(fTimeDelta); diff --git a/Jusin154_Team3D/Client/Private/Human_Duelist.cpp b/Jusin154_Team3D/Client/Private/Human_Duelist.cpp index b5dc84a62..0a664bcae 100644 --- a/Jusin154_Team3D/Client/Private/Human_Duelist.cpp +++ b/Jusin154_Team3D/Client/Private/Human_Duelist.cpp @@ -87,6 +87,10 @@ void CHuman_Duelist::Priority_Update(_float fTimeDelta) void CHuman_Duelist::Update(_float fTimeDelta) { + if (m_pGameInstance->Key_Up(DIK_J)) + { + m_pCharacter_Controller->Set_Position(XMVectorSet(1007.f, 6.f, 1016.f, 1.f)); + } m_pFSM->Update_State(fTimeDelta); m_pModelCom->Play_Animation(fTimeDelta *m_fEasing, m_pTransformCom); diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 7be62d2ef..8636a7499 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -948,7 +948,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) } } CHuman_Duelist::DUELISTDESC DuelistDesc = {}; - DuelistDesc.vPos = _float4(1003.f, 5.f, 1005.f, 1.f); + DuelistDesc.vPos = _float4(1007.f, 6.f, 1016.f, 1.f); DuelistDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &DuelistDesc))) { return E_FAIL; @@ -1008,21 +1008,21 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster() #endif // Bin #endif // _DEBUG if (true == isLoad_Monster) { - for (_uint i = 0; i < 0; ++i) + for (_uint i = 0; i < 1; ++i) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; } } - for (_uint i = 0; i < 0; ++i) + for (_uint i = 0; i < 1; ++i) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; } } - for (_uint i = 0; i < 0; ++i) + for (_uint i = 0; i < 1; ++i) { if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) { return E_FAIL; @@ -1034,12 +1034,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster() return E_FAIL; } - CRanrok::RANROKDESC RanrokDesc = {}; + /* CRanrok::RANROKDESC RanrokDesc = {}; RanrokDesc.vPos = _float4(-44.704f, 6.860f, 16.071f, 1.f); RanrokDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER,&RanrokDesc))) { return E_FAIL; - } + }*/ diff --git a/Jusin154_Team3D/Client/Private/MapObject_Render.cpp b/Jusin154_Team3D/Client/Private/MapObject_Render.cpp index 6a86d72e8..8a83927a3 100644 --- a/Jusin154_Team3D/Client/Private/MapObject_Render.cpp +++ b/Jusin154_Team3D/Client/Private/MapObject_Render.cpp @@ -60,10 +60,8 @@ HRESULT CMapObject_Render::Initialize(void* pArg) _matrix ColliderMatrix = XMMatrixTranslation(vOffset.x, vOffset.y, vOffset.z) * XMLoadFloat4x4(&m_CombinedWorldMatrix); XMStoreFloat4(&m_vExtentPosition, ColliderMatrix.r[3]); - ReadyForPhysX(); ConvertToPhysX(); - return S_OK; } @@ -164,7 +162,7 @@ void CMapObject_Render::ReadyForPhysX() { CModel* pModel = m_pModelComs[iIndexLOD]; - if (FAILED(pModel->Ready_PhysXMeshes(XMLoadFloat4x4(&m_CombinedWorldMatrix), iLevel))) { + if (FAILED(pModel->Ready_PhysXMeshes(XMMatrixIdentity(), iLevel))) { assert(false); } } @@ -172,7 +170,6 @@ void CMapObject_Render::ReadyForPhysX() void CMapObject_Render::ConvertToPhysX() { - XMStoreFloat4x4(&m_IdentityMatrix, XMMatrixIdentity()); if (true == m_bReadyToCreatePhysX) { return; } @@ -184,7 +181,7 @@ void CMapObject_Render::ConvertToPhysX() CModel* pModel = m_pModelComs[iIndexLOD]; _uint iNumMeshes = pModel->Get_NumMeshes(); - + for (_uint iIndex = 0; iIndex < iNumMeshes; ++iIndex) { _wstring wstrName = CMyTools::ToWstring(pModel->Get_MeshName(iIndex)) + to_wstring(iIndex); @@ -192,7 +189,7 @@ void CMapObject_Render::ConvertToPhysX() CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {}; Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN); Desc.pMeshName = wstrName.c_str(); - Desc.pWorldMatrix = &m_IdentityMatrix; + Desc.pWorldMatrix = &m_CombinedWorldMatrix; if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, wstrName, (CComponent**)&pRigidBody, &Desc))) { assert(false); } diff --git a/Jusin154_Team3D/Client/Private/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp index 36f46dcac..ce5c51fb8 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp @@ -389,7 +389,7 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc) return; } - if (m_bFireBurst || m_pFSM->IsEnable(FSMSTATE::LAND|FSMSTATE::TUCKED)) + if (m_bFireBurst || m_pFSM->IsEnable(FSMSTATE::LAND|FSMSTATE::TUCKED) || m_pModelCom->Get_AnimIndex() == m_Animation[STATEANIM::HIT_BWD2].first) return; ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp index f3ae36c38..7096a4c3d 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok_Prop.cpp @@ -131,7 +131,7 @@ HRESULT CRanrok_Prop::Pre_Setting(CGameObject* pObject, void* pArg) _vector vPos = pObject->Get_WorldPostion(); - _vector vRandomPos = XMVectorSet(m_pGameInstance->Real_Random_Float(-20.f, 20.f), m_pGameInstance->Real_Random_Float(5.f, 15.f), m_pGameInstance->Real_Random_Float(-20.f, 20.f), 0.f); + _vector vRandomPos = XMVectorSet(m_pGameInstance->Real_Random_Float(-20.f, 0.f), m_pGameInstance->Real_Random_Float(5.f, 15.f), m_pGameInstance->Real_Random_Float(-20.f, 0.f), 0.f); vPos += vRandomPos; diff --git a/Jusin154_Team3D/Client/Public/Ranrok.h b/Jusin154_Team3D/Client/Public/Ranrok.h index eb94849c3..691515ae9 100644 --- a/Jusin154_Team3D/Client/Public/Ranrok.h +++ b/Jusin154_Team3D/Client/Public/Ranrok.h @@ -74,7 +74,7 @@ class CRanrok final : public CMonster _uint iIndex = {}; DAMAGE_INFO m_DamageInfo; _bool m_bCollisionPlayer = { false }; - _float2 m_vCreatePropTime = { 0.f , 60.f }; + _float2 m_vCreatePropTime = { 0.f , 30.f }; private: virtual HRESULT Initialize_Prototype() override;