Merge branch 'Develope' into Effect
This commit is contained in:
@@ -113,7 +113,7 @@
|
||||
<PreprocessorDefinitions>$(USERNAME);_DEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;../../EngineSDK/Inc/PhysX/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
@@ -123,7 +123,7 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../../EngineSDK/Lib/$(ConfigurationName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;DirectXTKd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;PhysX_64.lib;PhysXCommon_64.lib;PhysXCooking_64.lib;PhysXExtensions_static_64.lib;PhysXFoundation_64.lib;DirectXTKd.lib;%(AdditionalDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd /d "$(SolutionDir)"
|
||||
@@ -140,7 +140,7 @@ call Update_Resources.bat
|
||||
<PreprocessorDefinitions>$(USERNAME);NDEBUG;_WINDOWS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;../../EngineSDK/Inc/PhysX/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
@@ -150,7 +150,7 @@ call Update_Resources.bat
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../../EngineSDK/Lib/$(ConfigurationName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;PhysX_64.lib;PhysXCommon_64.lib;PhysXCooking_64.lib;PhysXExtensions_static_64.lib;PhysXFoundation_64.lib;%(AdditionalDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd /d "$(SolutionDir)"
|
||||
@@ -166,6 +166,10 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\CallBack_NonPlayable_Behavior.h" />
|
||||
<ClInclude Include="..\Public\CallBack_NonPlayable_HitReport.h" />
|
||||
<ClInclude Include="..\Public\CallBack_Ranrok_HitReport.h" />
|
||||
<ClInclude Include="..\Public\Camera_Model.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Assassin.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Assassin_Spector.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Sword.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Breath.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_FireBall.h" />
|
||||
<ClInclude Include="..\Public\CamPosition_AI.h" />
|
||||
@@ -175,8 +179,12 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\public\NPCInteraction.h" />
|
||||
<ClInclude Include="..\public\PointLight.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Point.h" />
|
||||
<ClInclude Include="..\Public\PlayerRobe.h" />
|
||||
<ClInclude Include="..\Public\Player_ENUM.h" />
|
||||
<ClInclude Include="..\Public\State_Dash.h" />
|
||||
<ClInclude Include="..\Public\State_Fall.h" />
|
||||
<ClInclude Include="..\Public\State_FireBall.h" />
|
||||
<ClInclude Include="..\Public\State_Slash.h" />
|
||||
<ClInclude Include="..\Public\TransformationSide.h" />
|
||||
<ClInclude Include="..\Public\Transformation.h" />
|
||||
<ClInclude Include="..\Public\LightningSide.h" />
|
||||
@@ -326,8 +334,6 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Monster.h" />
|
||||
<ClInclude Include="..\Public\NoMountIcon.h" />
|
||||
<ClInclude Include="..\Public\PhysXEffectHitBox.h" />
|
||||
<ClInclude Include="..\Public\Dummy_PhysXPlayable.h" />
|
||||
<ClInclude Include="..\Public\Dummy_PhysXWall.h" />
|
||||
<ClInclude Include="..\Public\EffectParts.h" />
|
||||
<ClInclude Include="..\Public\EffectObject.h" />
|
||||
<ClInclude Include="..\Public\Effect_Container.h" />
|
||||
@@ -410,6 +416,11 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\CallBack_NonPlayable_Behavior.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_NonPlayable_HitReport.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_Ranrok_HitReport.cpp" />
|
||||
<ClCompile Include="..\Private\Camera_Model.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_Spector.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_States.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Sword.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Breath.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_FireBall.cpp" />
|
||||
<ClCompile Include="..\Private\CamPosition_AI.cpp" />
|
||||
@@ -419,7 +430,10 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\private\NPCInteraction.cpp" />
|
||||
<ClCompile Include="..\private\PointLight.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Point.cpp" />
|
||||
<ClCompile Include="..\Private\PlayerRobe.cpp" />
|
||||
<ClCompile Include="..\Private\State_Dash.cpp" />
|
||||
<ClCompile Include="..\Private\State_Fall.cpp" />
|
||||
<ClCompile Include="..\Private\State_Slash.cpp" />
|
||||
<ClCompile Include="..\Private\TransformationSide.cpp" />
|
||||
<ClCompile Include="..\Private\Transformation.cpp" />
|
||||
<ClCompile Include="..\Private\LightningSide.cpp" />
|
||||
@@ -571,8 +585,6 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\CamPosition_Shoulder.cpp" />
|
||||
<ClCompile Include="..\Private\CamPosition_Socket.cpp" />
|
||||
<ClCompile Include="..\Private\CamPosition_Target.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_PhysXPlayable.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_PhysXWall.cpp" />
|
||||
<ClCompile Include="..\Private\EffectParts.cpp" />
|
||||
<ClCompile Include="..\Private\EffectObject.cpp" />
|
||||
<ClCompile Include="..\Private\Effect_Container.cpp" />
|
||||
|
||||
@@ -79,12 +79,6 @@
|
||||
<ClInclude Include="..\Public\Broom.h">
|
||||
<Filter>02.GameObjects\Item\Broom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_PhysXWall.h">
|
||||
<Filter>02.GameObjects\PhysX</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_PhysXPlayable.h">
|
||||
<Filter>02.GameObjects\PhysX</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Root.h">
|
||||
<Filter>04.Mechanic\State</Filter>
|
||||
</ClInclude>
|
||||
@@ -338,7 +332,7 @@
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Swing</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Blink.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Blink</Filter>
|
||||
<Filter>04.Mechanic\State\Movement\State_Blink</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Dagger.h">
|
||||
<Filter>02.GameObjects\Item\Goblin_Dagger</Filter>
|
||||
@@ -410,9 +404,6 @@
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
||||
</ClInclude>
|
||||
@@ -751,6 +742,33 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ranrok_Point.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Point</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Player_ENUM.h">
|
||||
<Filter>02.GameObjects\Player</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\PlayerRobe.h">
|
||||
<Filter>02.GameObjects\Player\Robe</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Camera_Model.h">
|
||||
<Filter>02.GameObjects\Cameras\Camera_Model</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Assassin.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Sword.h">
|
||||
<Filter>02.GameObjects\Item\Goblin_Sword</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Slash.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Slash</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Dash.h">
|
||||
<Filter>04.Mechanic\State\Movement\Dash</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Warrior_Spector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Assassin_Spector.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Assassin_Spector</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -1140,9 +1158,6 @@
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Swing">
|
||||
<UniqueIdentifier>{f109c973-c532-4549-9680-d0d6495b0fa8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Blink">
|
||||
<UniqueIdentifier>{27251db2-19f2-4492-a3a4-32c11526f413}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Mouse_Cursor">
|
||||
<UniqueIdentifier>{b8c7e12b-da04-4d49-bc61-104649975d0b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -1562,6 +1577,33 @@
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Point">
|
||||
<UniqueIdentifier>{a94e24d2-0f61-4263-b834-bfdf9f6c06ae}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Player\Robe">
|
||||
<UniqueIdentifier>{f3c7cf8d-2b83-49d3-85da-fe135e376a11}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Cameras\Camera_Model">
|
||||
<UniqueIdentifier>{f8d55057-c0f8-4cac-8a6c-6f11345a83bb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin">
|
||||
<UniqueIdentifier>{af9f5cf6-151a-49bc-9af4-28ba0bde1d37}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Item\Goblin_Sword">
|
||||
<UniqueIdentifier>{db12252c-8c0d-40bc-9466-e76ec60e2509}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Slash">
|
||||
<UniqueIdentifier>{0736f27e-2722-483b-88b6-30471ad70835}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Movement\State_Blink">
|
||||
<UniqueIdentifier>{27251db2-19f2-4492-a3a4-32c11526f413}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Movement\Dash">
|
||||
<UniqueIdentifier>{6d1f0862-40a4-4c0b-9921-87fe6af2008b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Warrior_Spector">
|
||||
<UniqueIdentifier>{0c62f4f7-a0e6-4ff2-a4dd-25e3dd79709e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Assassin_Spector">
|
||||
<UniqueIdentifier>{bf7cf91b-742f-4913-8af2-39ed94d19e23}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -1628,12 +1670,6 @@
|
||||
<ClCompile Include="..\Private\Broom.cpp">
|
||||
<Filter>02.GameObjects\Item\Broom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dummy_PhysXWall.cpp">
|
||||
<Filter>02.GameObjects\PhysX</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dummy_PhysXPlayable.cpp">
|
||||
<Filter>02.GameObjects\PhysX</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Root.cpp">
|
||||
<Filter>04.Mechanic\State</Filter>
|
||||
</ClCompile>
|
||||
@@ -1884,7 +1920,7 @@
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Swing</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Blink.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Blink</Filter>
|
||||
<Filter>04.Mechanic\State\Movement\State_Blink</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Dagger.cpp">
|
||||
<Filter>02.GameObjects\Item\Goblin_Dagger</Filter>
|
||||
@@ -1967,9 +2003,6 @@
|
||||
<ClCompile Include="..\Private\Enemy_Panel.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Spector.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
||||
</ClCompile>
|
||||
@@ -2261,6 +2294,33 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ranrok_Point.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Point</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Camera_Model.cpp">
|
||||
<Filter>02.GameObjects\Cameras\Camera_Model</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Assassin.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_States.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Sword.cpp">
|
||||
<Filter>02.GameObjects\Item\Goblin_Sword</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Slash.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Slash</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Dash.cpp">
|
||||
<Filter>04.Mechanic\State\Movement\Dash</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\PlayerRobe.cpp">
|
||||
<Filter>02.GameObjects\Player\Robe</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Spector.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Warrior_Spector</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_Spector.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Assassin_Spector</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -76,7 +76,9 @@ void CAvadakedavra::Late_Update(_float fTimeDelta)
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
//XMStoreFloat4(&m_vEndPos, m_pStupefy_PJ_PT->Get_WorldPostion());
|
||||
if (m_Info.pUnit) {
|
||||
XMStoreFloat4(&m_vEndPos, m_Info.pUnit->Get_LockOnPos());
|
||||
}
|
||||
|
||||
_vector vDir = XMLoadFloat4(&m_vEndPos) - XMLoadFloat4(&m_vStartPos);
|
||||
|
||||
@@ -84,7 +86,7 @@ void CAvadakedavra::Late_Update(_float fTimeDelta)
|
||||
if (false == m_bHit) {
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
|
||||
ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f);
|
||||
ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.2f);
|
||||
|
||||
OnCollision(this, &CollisionInfo);
|
||||
}
|
||||
|
||||
@@ -251,38 +251,33 @@ void CBroomRaceManager::Check_RingPassed()
|
||||
|
||||
_vector prevPos = racer.prevPos;
|
||||
|
||||
_float d0 = XMVectorGetX(
|
||||
XMVector3Dot(prevPos - ringPos, ringFwd));
|
||||
_float d1 = XMVectorGetX(
|
||||
XMVector3Dot(currPos - ringPos, ringFwd));
|
||||
_float Prev = XMVectorGetX(XMVector3Dot(prevPos - ringPos, ringFwd));
|
||||
_float Curr = XMVectorGetX(XMVector3Dot(currPos - ringPos, ringFwd));
|
||||
#ifdef _DEBUG
|
||||
GUI::Text("%s", racer.pAI ? "AI" : "Player");
|
||||
GUI::SameLine();
|
||||
GUI::Text("CurRing %d", racer.curRing);
|
||||
GUI::Text("PrevSide %.2f", d0);
|
||||
GUI::Text("CurrSide %.2f", d1);
|
||||
GUI::Text("PrevSide %.2f", Prev);
|
||||
GUI::Text("CurrSide %.2f", Curr);
|
||||
#endif // _DEBUG
|
||||
if (d0 * d1 <= 0.f && fabs(d0 - d1) > 1e-4f)
|
||||
if (Prev * Curr <= 0.f && fabs(Prev - Curr) > 1e-4f)
|
||||
{
|
||||
_float t = d0 / (d0 - d1);
|
||||
t = std::clamp(t, 0.f, 1.f);
|
||||
_float t = Prev / (Prev - Curr);
|
||||
t = clamp(t, 0.f, 1.f);
|
||||
|
||||
_vector hitPos =
|
||||
prevPos + (currPos - prevPos) * t;
|
||||
_vector hitPos = prevPos + (currPos - prevPos) * t;
|
||||
|
||||
_vector v = hitPos - ringPos;
|
||||
_float side = XMVectorGetX(XMVector3Dot(v, ringFwd));
|
||||
_vector proj = hitPos - ringFwd * side;
|
||||
|
||||
_float dist =
|
||||
XMVectorGetX(XMVector3Length(proj - ringPos));
|
||||
_float dist = XMVectorGetX(XMVector3Length(proj - ringPos));
|
||||
|
||||
if (dist <= PASS_RADIUS)
|
||||
{
|
||||
if(racer.pRacer){
|
||||
pRing->Set_Target(false);
|
||||
}
|
||||
|
||||
|
||||
racer.curRing = (racer.curRing + 1) % m_pRaceRings.size();
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ HRESULT CBroomRacerAI::Render()
|
||||
}
|
||||
if (m_pModelCom->Get_Type() == MODEL::PBR_ANIM)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, false))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ PSX::PxControllerBehaviorFlags CCallBack_EffectHitBox_Behavior::getBehaviorFlags
|
||||
return PSX::PxControllerBehaviorFlags(0);
|
||||
}
|
||||
PSX::PxControllerBehaviorFlags eResults = PSX::PxControllerBehaviorFlags(0);
|
||||
PhsXUserData* pActorData = static_cast<PhsXUserData*>(actor.userData);
|
||||
PHYSX_USERDATA* pActorData = static_cast<PHYSX_USERDATA*>(actor.userData);
|
||||
switch (pActorData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
|
||||
@@ -34,8 +34,8 @@ void CCallBack_EffectHitBox_HitReport::onShapeHit(const PSX::PxControllerShapeHi
|
||||
ON_COLLISION_INFO CollisionDesc = {};
|
||||
|
||||
if (nullptr != pController && nullptr != pActor) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
if (nullptr == pTargetActorData) { // missing user data
|
||||
return;
|
||||
}
|
||||
@@ -119,8 +119,8 @@ void CCallBack_EffectHitBox_HitReport::onControllerHit(const PSX::PxControllersH
|
||||
ON_COLLISION_INFO CollisionDesc = {};
|
||||
|
||||
if (nullptr != pController && nullptr != pOtherController) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
assert(nullptr != pTargetActorData); // missing user data
|
||||
|
||||
switch (pTargetActorData->eKind)
|
||||
|
||||
@@ -17,7 +17,7 @@ PSX::PxControllerBehaviorFlags CCallBack_Monster_Behavior::getBehaviorFlags(cons
|
||||
return PSX::PxControllerBehaviorFlags(0);
|
||||
}
|
||||
PSX::PxControllerBehaviorFlags eResults = PSX::PxControllerBehaviorFlags(0);
|
||||
PhsXUserData* pActorData = static_cast<PhsXUserData*>(actor.userData);
|
||||
PHYSX_USERDATA* pActorData = static_cast<PHYSX_USERDATA*>(actor.userData);
|
||||
switch (pActorData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
|
||||
@@ -33,8 +33,8 @@ void CCallBack_Monster_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hi
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
|
||||
if (nullptr != pController && nullptr != pActor) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
if (nullptr == pTargetActorData) { // missing user data
|
||||
return;
|
||||
}
|
||||
@@ -105,8 +105,8 @@ void CCallBack_Monster_HitReport::onControllerHit(const PSX::PxControllersHit& h
|
||||
ON_COLLISION_INFO CollisionDesc = {};
|
||||
|
||||
if (nullptr != pController && nullptr != pOtherController) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
assert(nullptr != pTargetActorData); // missing user data
|
||||
|
||||
switch (pTargetActorData->eKind)
|
||||
|
||||
@@ -17,7 +17,7 @@ PSX::PxControllerBehaviorFlags CCallBack_NonPlayable_Behavior::getBehaviorFlags(
|
||||
return PSX::PxControllerBehaviorFlags(0);
|
||||
}
|
||||
PSX::PxControllerBehaviorFlags eResults = PSX::PxControllerBehaviorFlags(0);
|
||||
PhsXUserData* pActorData = static_cast<PhsXUserData*>(actor.userData);
|
||||
PHYSX_USERDATA* pActorData = static_cast<PHYSX_USERDATA*>(actor.userData);
|
||||
switch (pActorData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
|
||||
@@ -31,8 +31,8 @@ void CCallBack_NonPlayable_HitReport::onShapeHit(const PSX::PxControllerShapeHit
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
|
||||
if (nullptr != pController && nullptr != pActor) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
if (nullptr == pTargetActorData) { // missing user data
|
||||
return;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ void CCallBack_NonPlayable_HitReport::onControllerHit(const PSX::PxControllersHi
|
||||
PSX::PxController* pOtherController = hit.other; // 다른 컨트롤러
|
||||
|
||||
if (nullptr != pController && nullptr != pOtherController) {
|
||||
PhsXUserData* pActorData = static_cast<PhsXUserData*>(pOtherController->getActor()->userData);
|
||||
PHYSX_USERDATA* pActorData = static_cast<PHYSX_USERDATA*>(pOtherController->getActor()->userData);
|
||||
assert(nullptr != pActorData); // missing user data
|
||||
|
||||
switch (pActorData->eKind)
|
||||
|
||||
@@ -17,7 +17,7 @@ PSX::PxControllerBehaviorFlags CCallBack_Playable_Behavior::getBehaviorFlags(con
|
||||
return PSX::PxControllerBehaviorFlags(0);
|
||||
}
|
||||
PSX::PxControllerBehaviorFlags eResults = PSX::PxControllerBehaviorFlags(0);
|
||||
PhsXUserData* pActorData = static_cast<PhsXUserData*>(actor.userData);
|
||||
PHYSX_USERDATA* pActorData = static_cast<PHYSX_USERDATA*>(actor.userData);
|
||||
switch (pActorData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
|
||||
@@ -31,8 +31,8 @@ void CCallBack_Playable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& h
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
|
||||
if (nullptr != pController && nullptr != pActor) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
if (nullptr == pTargetActorData) { // missing user data
|
||||
return;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ void CCallBack_Playable_HitReport::onControllerHit(const PSX::PxControllersHit&
|
||||
PSX::PxController* pOtherController = hit.other; // 다른 컨트롤러
|
||||
|
||||
if (nullptr != pController && nullptr != pOtherController) {
|
||||
PhsXUserData* pActorData = static_cast<PhsXUserData*>(pOtherController->getActor()->userData);
|
||||
PHYSX_USERDATA* pActorData = static_cast<PHYSX_USERDATA*>(pOtherController->getActor()->userData);
|
||||
assert(nullptr != pActorData); // missing user data
|
||||
|
||||
switch (pActorData->eKind)
|
||||
|
||||
@@ -34,8 +34,8 @@ void CCallBack_Ranrok_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
|
||||
if (nullptr != pController && nullptr != pActor) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
if (nullptr == pTargetActorData) { // missing user data
|
||||
return;
|
||||
}
|
||||
@@ -106,8 +106,8 @@ void CCallBack_Ranrok_HitReport::onControllerHit(const PSX::PxControllersHit& hi
|
||||
ON_COLLISION_INFO CollisionDesc = {};
|
||||
|
||||
if (nullptr != pController && nullptr != pOtherController) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
assert(nullptr != pTargetActorData); // missing user data
|
||||
|
||||
switch (pTargetActorData->eKind)
|
||||
|
||||
@@ -34,8 +34,8 @@ void CCallBack_Troll_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit)
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
|
||||
if (nullptr != pController && nullptr != pActor) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
if (nullptr == pTargetActorData) { // missing user data
|
||||
return;
|
||||
}
|
||||
@@ -117,8 +117,8 @@ void CCallBack_Troll_HitReport::onControllerHit(const PSX::PxControllersHit& hit
|
||||
PSX::PxActor* pActor = pOtherController->getActor();
|
||||
|
||||
if (nullptr != pController && nullptr != pOtherController) {
|
||||
PhsXUserData* pTargetActorData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PhsXUserData* pOwnerActorData = static_cast<PhsXUserData*>(pController->getActor()->userData);
|
||||
PHYSX_USERDATA* pTargetActorData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
PHYSX_USERDATA* pOwnerActorData = static_cast<PHYSX_USERDATA*>(pController->getActor()->userData);
|
||||
assert(nullptr != pTargetActorData); // missing user data
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ void CCamPosition_Socket::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
/*_matrix socketMatrix = {};
|
||||
|
||||
socketMatrix = XMLoadFloat4x4(m_pSocketMatrices);
|
||||
socketMatrix = XMLoadFloat4x4(m_pSocketMatrix);
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]);
|
||||
@@ -40,7 +40,7 @@ HRESULT CCamPosition_Socket::Initialize_Prototype()
|
||||
HRESULT CCamPosition_Socket::Initialize(void* pArg)
|
||||
{
|
||||
CAMERAPOSITION_PLAYER_DESC* pDesc = static_cast<CAMERAPOSITION_PLAYER_DESC*> (pArg);
|
||||
//m_pSocketMatrices = pDesc->pSocketMatrices;
|
||||
//m_pSocketMatrix = pDesc->pSocketMatrix;
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
#include "pch.h"
|
||||
#include "Camera_Model.h"
|
||||
#include "Shader.h"
|
||||
#include "Layer.h"
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
CCamera_Model::CCamera_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CCamera(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CCamera_Model::CCamera_Model(const CCamera_Model& rhs)
|
||||
: CCamera(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CCamera_Model::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_MODEL, false);
|
||||
#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_MODEL))) {
|
||||
return;
|
||||
}
|
||||
//Transition(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;
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
}
|
||||
|
||||
__super::Bind_Matrices();
|
||||
}
|
||||
|
||||
void CCamera_Model::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CCamera_Model::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
/*if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_MODEL))) {
|
||||
return;
|
||||
}*/
|
||||
|
||||
auto M = m_pModelCom->Get_BoneMatrix("lookat_target");
|
||||
GUI::Text("Bone T: %.3f %.3f %.3f", M.r[3].m128_f32[0], M.r[3].m128_f32[1], M.r[3].m128_f32[2]);
|
||||
|
||||
|
||||
_vector vTargetPos = m_pModelCom->Get_BoneMatrix("lookat_target").r[3];
|
||||
|
||||
m_pTransformCom->LookAt(
|
||||
XMVectorSetW(vTargetPos, 1.f)
|
||||
);
|
||||
|
||||
// m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
|
||||
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Initialize(void* pArg)
|
||||
{
|
||||
CAMERA_MODEL_DESC* pDesc = static_cast<CAMERA_MODEL_DESC*>(pArg);
|
||||
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vEye), 1.f));
|
||||
m_pTransformCom->LookAt(XMVectorSetW(XMLoadFloat3(&pDesc->vAt), 1.f));
|
||||
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
|
||||
m_bActive = true;
|
||||
|
||||
|
||||
m_pModelCom->Set_Temp(true);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_CCL_CameraRig.001_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifdef 기무리
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // 기무리
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCamera_Model::Set_InitialPos()
|
||||
{
|
||||
m_pTransformCom->Set_WorldMatrix(m_matInitial);
|
||||
}
|
||||
|
||||
CCamera_Model* CCamera_Model::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCamera_Model* pInstance = new CCamera_Model(pDevice, pContext);
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CCamera_Model");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CCamera_Model::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CCamera_Model* pInstance = new CCamera_Model(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CCamera_Model");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CCamera_Model::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CCamera_Model::Describe_Entity()
|
||||
{
|
||||
_float3 vPosition = {};
|
||||
GUI::Begin("CameraAnim List");
|
||||
for (_int i = 0; i < m_pModelCom->Get_AnimSize(); i++)
|
||||
{
|
||||
if (GUI::Button(m_pModelCom->Get_AnimList(i)))
|
||||
{
|
||||
m_pModelCom->Set_AnimationIndex(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -1,232 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "Dummy_PhysXPlayable.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CDummy_PhysXPlayable::CDummy_PhysXPlayable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext):
|
||||
CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CDummy_PhysXPlayable::CDummy_PhysXPlayable(const CDummy_PhysXPlayable& rhs):
|
||||
CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CDummy_PhysXPlayable::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->RewindMomentum();
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position());
|
||||
}
|
||||
|
||||
void CDummy_PhysXPlayable::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_UPARROW)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 0.f, 1.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LEFT)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(-1.f, 0.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_DOWN)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 0.f, -1.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_RIGHT)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(1.f, 0.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)) {
|
||||
if (m_pGameInstance->Key_Pressing(DIK_SPACE)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 10.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_C)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -10.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_V)) {
|
||||
m_pGameInstance->Detach_Actor(*m_pCharacter_Controller->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_pGameInstance->Key_Down(DIK_V)) {
|
||||
m_pGameInstance->Attach_Actor(*m_pCharacter_Controller->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
}
|
||||
}
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
}
|
||||
|
||||
void CDummy_PhysXPlayable::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
if (m_pGameInstance->IsIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Render()
|
||||
{
|
||||
//if (FAILED(Bind_ShaderResources())) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
//if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
//if (FAILED(m_pModelCom->Render(0))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pCharacter_Controller->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Ready_Components(void* pArg)
|
||||
{
|
||||
CTransform::TRANSFORM_DESC TransformDesc{};
|
||||
TransformDesc.fRadius = 100.f;
|
||||
TransformDesc.fRotationPerSec = XMConvertToRadians(60.f);
|
||||
TransformDesc.fSpeedPerSec = 15.f;
|
||||
if (FAILED(__super::Ready_Components(&TransformDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
PHYSXDUMMY_DESC* pDesc = static_cast<PHYSXDUMMY_DESC*>(pArg);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPos), 1.f));
|
||||
m_pTransformCom->Rotation(pDesc->vRotRPY.x, pDesc->vRotRPY.y, pDesc->vRotRPY.z);
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = pDesc->iSubKind;
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 1.0f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Playable_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Playable_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = pDesc->iSubKind;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
|
||||
}
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDummy_PhysXPlayable* CDummy_PhysXPlayable::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDummy_PhysXPlayable* pInstance = new CDummy_PhysXPlayable(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDummy_PhysXPlayable");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDummy_PhysXPlayable::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDummy_PhysXPlayable* pInstance = new CDummy_PhysXPlayable(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDummy_PhysXPlayable");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDummy_PhysXPlayable::Free()
|
||||
{
|
||||
__super::Free();
|
||||
if (nullptr != m_pCallBack_Behavior) {
|
||||
m_pCallBack_Behavior->Finalize();
|
||||
}
|
||||
if (nullptr != m_pCallBack_HitReport) {
|
||||
m_pCallBack_HitReport->Finalize();
|
||||
}
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CDummy_PhysXPlayable::Describe_Entity()
|
||||
{
|
||||
m_pCharacter_Controller->Describe_Entity();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -1,170 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "Dummy_PhysXWall.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
|
||||
CDummy_PhysXWall::CDummy_PhysXWall(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CDummy_PhysXWall::CDummy_PhysXWall(const CDummy_PhysXWall& rhs)
|
||||
: CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDummy_PhysXWall::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CDummy_PhysXWall::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CDummy_PhysXWall::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Render()
|
||||
{
|
||||
//if (FAILED(Bind_ShaderResources())) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
//if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
//if (FAILED(m_pModelCom->Render(0))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pRigidBody->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
PHYSXDUMMY_DESC* pPhysXDummyDesc = static_cast<PHYSXDUMMY_DESC*>(pArg);
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pPhysXDummyDesc->vPos), 1.f));
|
||||
m_pTransformCom->Rotation(pPhysXDummyDesc->vRotRPY.x, pPhysXDummyDesc->vRotRPY.y, pPhysXDummyDesc->vRotRPY.z);
|
||||
|
||||
|
||||
{ // RIGID_BODY
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = pPhysXDummyDesc->iSubKind;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDummy_PhysXWall* CDummy_PhysXWall::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDummy_PhysXWall* pInstance = new CDummy_PhysXWall(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDummy_PhysXWall");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDummy_PhysXWall::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDummy_PhysXWall* pInstance = new CDummy_PhysXWall(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDummy_PhysXWall");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDummy_PhysXWall::Free()
|
||||
{
|
||||
//if (nullptr != m_pRigidBody) {
|
||||
// m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
//}
|
||||
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CDummy_PhysXWall::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -652,7 +652,7 @@ _int CEffect_Container::CollisionCheck()
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData) {
|
||||
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
|
||||
if (pUserData->iSubKind >= UINT_MAX - 1) {
|
||||
continue;
|
||||
@@ -666,6 +666,7 @@ _int CEffect_Container::CollisionCheck()
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
case PXOBJECT::GOBLIN_MAGICIAN:
|
||||
case PXOBJECT::TROLL:
|
||||
case PXOBJECT::RANROK:
|
||||
case PXOBJECT::WALL:
|
||||
{
|
||||
return i;
|
||||
@@ -725,11 +726,22 @@ ON_COLLISION_INFO CEffect_Container::SweepTarget(_vector StartPos, _vector EndPo
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::GOBLIN_PROTEGO:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
{
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
@@ -792,7 +804,7 @@ ON_COLLISION_INFO CEffect_Container::SweepTarget(_vector StartPos, _vector EndPo
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
@@ -844,11 +856,22 @@ ON_COLLISION_INFO CEffect_Container::MonsterSweepTarget(_vector StartPos, _vecto
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::SKILL_PROTEGO:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
{
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
@@ -860,11 +883,7 @@ ON_COLLISION_INFO CEffect_Container::MonsterSweepTarget(_vector StartPos, _vecto
|
||||
m_bHit = true;
|
||||
}
|
||||
break;
|
||||
case PXOBJECT::SKILL_PROTEGO:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -898,7 +917,7 @@ ON_COLLISION_INFO CEffect_Container::MonsterSweepTarget(_vector StartPos, _vecto
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
@@ -952,7 +971,7 @@ ON_COLLISION_INFO CEffect_Container::MonsterRayCast(_vector StartPos, _vector _v
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
|
||||
switch (pUserData->eKind)
|
||||
|
||||
@@ -340,6 +340,12 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
case ENUM_CLASS(SKILL_TYPE::STUPEFY):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::STUPEFY);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -0,0 +1,687 @@
|
||||
#include "pch.h"
|
||||
#include "Goblin_Assassin.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Layer.h"
|
||||
#include "Player.h"
|
||||
#include "Goblin_Sword.h"
|
||||
#include "Goblin_Assassin_Spector.h"
|
||||
#include "Effect_Container.h"
|
||||
#include "EffectPool.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
|
||||
#include "EffectParts.h"
|
||||
|
||||
|
||||
CGoblin_Assassin::CGoblin_Assassin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMonster(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CGoblin_Assassin::CGoblin_Assassin(const CGoblin_Assassin& Prototype)
|
||||
: CMonster(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Parts()))
|
||||
return E_FAIL;
|
||||
|
||||
Add_FSM();
|
||||
|
||||
Set_Anim();
|
||||
|
||||
{
|
||||
CFSM::FSM_DESC FSMDesc{};
|
||||
FSMDesc.pStates = &m_States;
|
||||
FSMDesc.pStateMask = &m_iStateMask;
|
||||
|
||||
m_pFSM->Bind_States(FSMDesc);
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(-52.f, 0.f, -14.f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-52.f, 0.f, -14.f, 1.f));
|
||||
|
||||
|
||||
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
||||
SAFE_ADDREF(m_pEffectPool);
|
||||
|
||||
m_pModelCom->Set_Temp(true);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CGoblin_Assassin::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta * m_fEasing, m_pTransformCom);
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Play_Event();
|
||||
|
||||
if (true == m_pCharacter_Controller->IsActive()) {
|
||||
{ // 세트
|
||||
m_pCallBack_HitReport->BeginFrame();
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
m_vStunTimer.x = 0.f;
|
||||
}
|
||||
else if (true == m_pRigidBody->IsActive()) {
|
||||
if (0.f == m_vStunTimer.x) {
|
||||
PSX::PxExtendedVec3 pxControlllerPos = m_pCharacter_Controller->Get_Controller()->getPosition();
|
||||
PSX::PxTransform pxTransform((_float)pxControlllerPos.x, (_float)pxControlllerPos.y + 100.f, (_float)pxControlllerPos.z);
|
||||
m_pCharacter_Controller->Set_Position(XMLoadFloat3((_float3*)&pxTransform.p));
|
||||
//m_pCharacter_Controller->Move(fTimeDelta);
|
||||
}
|
||||
m_vStunTimer.x += fTimeDelta;
|
||||
m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_Actor()->getGlobalPose());
|
||||
if (m_vStunTimer.y < m_vStunTimer.x) {
|
||||
m_pRigidBody->ConvertToCCT(*m_pCharacter_Controller);
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
for (_uint i = 0; i < ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::END); i++)
|
||||
m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta);
|
||||
|
||||
|
||||
//m_pDetection->Set_Active(m_bDetection);
|
||||
|
||||
|
||||
if (m_bDisolve) {
|
||||
m_fDisolveTime += fTimeDelta*0.8f;
|
||||
if (m_fDisolveTime >= 1.f)
|
||||
{
|
||||
m_fDisolveTime = 0.f;
|
||||
m_bDisolve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CGoblin_Assassin::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
if (true == m_pCharacter_Controller->IsActive()) {
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
}
|
||||
else if (true == m_pRigidBody->IsActive()) {
|
||||
m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_FootPositionPxTransform());
|
||||
}
|
||||
if (true == m_bLookAt) {
|
||||
m_pTransformCom->LookAt_Horizontal_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f);
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Render_DeadDisolve())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
Render_OutLine();
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
//if (true == m_pCharacter_Controller->IsActive()) {
|
||||
// if (FAILED(m_pCharacter_Controller->Render())) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
//else {
|
||||
// if (FAILED(m_pRigidBody->Render())) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
#endif
|
||||
|
||||
if (0.f < m_fDeadRatio) {
|
||||
_bool bDisolve = false;
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Render_OutLine()
|
||||
{
|
||||
m_bDrawOutLine = false;
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Compute_Depth();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(0.01f, 0.1f, fRatio);
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineThickness", &m_fOutLineThickness, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineScale", &m_fOutLineScale, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLinePower", &m_fOutLinePower, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::OUTLINE_READ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ViewMatrix", D3DTS::VIEW, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CGoblin_Assassin::Get_LockOnPos()
|
||||
{
|
||||
if (nullptr != m_pCharacter_Controller && true == m_pCharacter_Controller->IsActive()) {
|
||||
return m_pCharacter_Controller->Get_Position();
|
||||
}
|
||||
else if (nullptr != m_pRigidBody) {
|
||||
return m_pRigidBody->Get_Position();
|
||||
}
|
||||
return Get_WorldPostion();
|
||||
}
|
||||
|
||||
void CGoblin_Assassin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
if (true == m_bDead) {
|
||||
return;
|
||||
}
|
||||
if (m_pFSM->IsEnable(FSMSTATE::BLINK)) {
|
||||
return;
|
||||
}
|
||||
m_DamageInfo.vTarget_Pos = m_pCharacter_Controller->Get_HeadPosition();
|
||||
|
||||
// m_pGoblinSpector->Set_Visible(false);
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir));
|
||||
|
||||
m_fHitRadius = CMyTools::Get_Direction2D(m_pTransformCom->Get_State(STATE::LOOK), XMLoadFloat4(&CollisionDesc->vHitDir));
|
||||
|
||||
CEffect_Container* pEffect_Container = dynamic_cast<CEffect_Container*>(pOther);
|
||||
|
||||
pair<_float, _float> damagePair = {};
|
||||
|
||||
if (pEffect_Container != nullptr)
|
||||
{
|
||||
_uint iSkillType = pEffect_Container->Get_SkillType();
|
||||
//damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(iSkillType));
|
||||
|
||||
switch (iSkillType)
|
||||
{
|
||||
case ENUM_CLASS(SKILL_TYPE::DESCENDO):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::DESCENDO);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::BOMBARDA):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::BOMBARDA);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::JAP):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::JAP);
|
||||
m_fTumbleTimer = 0.f;
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::LEVIOSO):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::LEVIOSO);
|
||||
m_eHitState = ENUM_CLASS(HIT_STATE::AIR_LEVIOSO);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::ACCIO):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ACCIO);
|
||||
m_eHitState = ENUM_CLASS(HIT_STATE::AIR_LEVIOSO);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::STUPEFY):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::STUPEFY);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
damagePair = Get_Damage(m_pInfoInstance->Get_Spell_Damage(ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW)));
|
||||
CMapElement_Interactable* pProps = dynamic_cast<CMapElement_Interactable*>(pOther);
|
||||
if (pProps != nullptr)
|
||||
{
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC_THROW);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//m_DamageInfo.fDamage = damagePair.first;
|
||||
//m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
|
||||
//if (0 == damagePair.second) {
|
||||
// m_pFSM->Change_State(FSMSTATE::DEAD);
|
||||
// _int ID = m_pStat->Get_Stat().iObjectID;
|
||||
// m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID);
|
||||
// return;
|
||||
//}
|
||||
|
||||
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CGoblin_Assassin::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
}
|
||||
|
||||
void CGoblin_Assassin::Set_Detection(_bool bDetection)
|
||||
{
|
||||
m_bDetection = bDetection;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Ready_Components()
|
||||
{
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
|
||||
Desc.fSpeedPerSec = 10.f;
|
||||
Desc.fRotationPerSec = XMConvertToRadians(180.0f);
|
||||
Desc.fRadius = 10.f;
|
||||
|
||||
if (FAILED(Add_Component<CTransform>(g_iStaticLevel, &m_pTransformCom, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Component<CFSM>(g_iStaticLevel, &m_pFSM))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Goblin_Assassin_Model");
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::GOBLIN_WARRIOR);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.6f;
|
||||
Desc.fHeight = 0.7f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Monster_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Monster_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::GOBLIN_WARRIOR);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
|
||||
}
|
||||
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_GOBLIN"), (CComponent**)&m_pStat))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Ready_Parts()
|
||||
{
|
||||
{
|
||||
CGoblin_Sword::GOBLIN_SWORD_DESC Goblin_SwordDesc{};
|
||||
|
||||
Goblin_SwordDesc.pParentTransform = m_pTransformCom;
|
||||
Goblin_SwordDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand");
|
||||
Goblin_SwordDesc.iIndex = 0;
|
||||
|
||||
if (FAILED(Add_PartObject<CGoblin_Sword>("Goblin_Sword_L", g_iStaticLevel, nullptr, &Goblin_SwordDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
CGoblin_Sword::GOBLIN_SWORD_DESC Goblin_SwordDesc{};
|
||||
|
||||
Goblin_SwordDesc.pParentTransform = m_pTransformCom;
|
||||
Goblin_SwordDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||
Goblin_SwordDesc.iIndex = 1;
|
||||
|
||||
if (FAILED(Add_PartObject<CGoblin_Sword>("Goblin_Sword_R", g_iStaticLevel, nullptr, &Goblin_SwordDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CGoblin_Assassin_Spector::GOBLIN_SPECTOR_DESC Goblin_SpectorDesc{};
|
||||
|
||||
Goblin_SpectorDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Assassin_Spector>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &Goblin_SpectorDesc, this, &m_pGoblinSpector))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma region EFFECT
|
||||
/* EFFECT */
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Goblin_Particle", g_iStaticLevel, &m_pGoblin_Particle, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGoblin_Particle->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pGoblin_Particle->FollowParents(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Goblin_Particle2", g_iStaticLevel, &m_pGoblin_Particle2, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGoblin_Particle2->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Particle2", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pGoblin_Particle2->FollowParents(m_pModelCom->Get_BoneMatrixPtr("RightShoulder"));
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEffectParts>("Goblin_Smoke", g_iStaticLevel, &m_pSmoke, &PartsDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pSmoke->Load("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Smoke", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pSmoke->FollowParents(m_pModelCom->Get_BoneMatrixPtr("Spine2"));
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEnemy_Detection>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &PartsDesc, this, &m_pDetection))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CGoblin_Assassin* CGoblin_Assassin::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CGoblin_Assassin* pInstance = new CGoblin_Assassin(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CGoblin_Assassin");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CGoblin_Assassin::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CGoblin_Assassin* pInstance = new CGoblin_Assassin(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CGoblin_Assassin");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
if (nullptr != m_pCallBack_Behavior) {
|
||||
m_pCallBack_Behavior->Finalize();
|
||||
}
|
||||
if (nullptr != m_pCallBack_HitReport) {
|
||||
m_pCallBack_HitReport->Finalize();
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pSmoke);
|
||||
SAFE_RELEASE(m_pGoblin_Particle);
|
||||
SAFE_RELEASE(m_pGoblin_Particle2);
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CGoblin_Assassin::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("Goblin")) {
|
||||
GUI::Checkbox("LookAt", &m_bLookAt);
|
||||
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
|
||||
if (GUI::DragFloat3("Pos", (_float*)&Pos))
|
||||
{
|
||||
m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos));
|
||||
}
|
||||
|
||||
XMFLOAT3 f3;
|
||||
XMStoreFloat3(&f3, m_vOriginPos);
|
||||
|
||||
GUI::Text("Origin: %.2f, %.2f, %.2f", f3.x, f3.y, f3.z);
|
||||
|
||||
m_fLength = XMVectorGetX(XMVector2Length(m_pTransformCom->Get_State(STATE::POSITION) - m_vOriginPos));
|
||||
|
||||
GUI::Text("Length %.2f", m_fLength);
|
||||
|
||||
GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,367 @@
|
||||
#include "pch.h"
|
||||
#include "Goblin_Assassin_Spector.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Goblin_Assassin.h"
|
||||
#include "Effect_Container.h"
|
||||
#include "Goblin_Sword.h"
|
||||
|
||||
#include "EffectParts.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CGoblin_Assassin_Spector::CGoblin_Assassin_Spector(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMonster(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CGoblin_Assassin_Spector::CGoblin_Assassin_Spector(const CGoblin_Assassin_Spector& Prototype)
|
||||
: CMonster(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Initialize(void* pArg)
|
||||
{
|
||||
GOBLIN_SPECTOR_DESC* pDesc = static_cast<GOBLIN_SPECTOR_DESC*> (pArg);
|
||||
m_pParentTransformCom = pDesc->pParentTransform;
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Parts()))
|
||||
return E_FAIL;
|
||||
|
||||
m_pInfoInstance->Deregist_ActiveMonster(this);
|
||||
|
||||
m_pGoblin = dynamic_cast<CGoblin_Assassin*>(m_pOwner);
|
||||
SAFE_ADDREF(m_pGoblin);
|
||||
|
||||
m_vOriginScale = m_pTransformCom->Get_Scale();
|
||||
|
||||
m_pLeftHand_BoneMat = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand");
|
||||
m_pRightHand_BoneMat = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(5);
|
||||
m_pModelCom->Play_Animation(0, m_pTransformCom);
|
||||
|
||||
|
||||
m_bVisible = false;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
m_Offset = _float3(0.f, 0.3f, 0.f);
|
||||
|
||||
_matrix Offset = XMMatrixTranslation(m_Offset.x,
|
||||
m_Offset.y, m_Offset.z);
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(Offset * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
|
||||
|
||||
if (m_bVisible)
|
||||
{
|
||||
if (m_vScale.x <= 2.f)
|
||||
{
|
||||
m_vScale.x += fTimeDelta;
|
||||
m_vScale.y += fTimeDelta;
|
||||
m_vScale.z += fTimeDelta;
|
||||
}
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pModelCom->Set_AnimationIndex(m_pGoblin->Get_Component<CModel>()->Get_AnimIndex());
|
||||
m_pModelCom->Set_CurrentTrackPosition(m_pGoblin->Get_Component<CModel>()->Get_CurrentTrackPosition());
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_L")->Set_Visible(true);
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_R")->Set_Visible(true);
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
}
|
||||
else {
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_L")->Set_Visible(false);
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_R")->Set_Visible(false);
|
||||
m_vScale = { 1.f,1.f,1.f };
|
||||
m_pTransformCom->Set_Scale(m_vOriginScale);
|
||||
m_pModelCom->Set_AnimationIndex(5);
|
||||
}
|
||||
|
||||
if (m_bDisolve) {
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_L")->Set_Disolve(true);
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_R")->Set_Disolve(true);
|
||||
m_fDisolveTime += fTimeDelta;
|
||||
if (m_fDisolveTime >= 1.f)
|
||||
{
|
||||
m_fDisolveTime = 0.f;
|
||||
m_bDisolve = false;
|
||||
m_bVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
#pragma region TRAIL_UPDATE
|
||||
|
||||
_matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
_matrix LeftHandMatrix = {};
|
||||
_matrix RightHandMatrix = {};
|
||||
_matrix WeaponMatrix = {};
|
||||
|
||||
LeftHandMatrix = XMLoadFloat4x4(m_pLeftHand_BoneMat);
|
||||
RightHandMatrix = XMLoadFloat4x4(m_pRightHand_BoneMat);
|
||||
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
LeftHandMatrix.r[i] = XMVector3Normalize(LeftHandMatrix.r[i]);
|
||||
RightHandMatrix.r[i] = XMVector3Normalize(RightHandMatrix.r[i]);
|
||||
WeaponMatrix.r[i] = XMVector3Normalize(WeaponMatrix.r[i]);
|
||||
}
|
||||
|
||||
_matrix WeaponSoket = WeaponMatrix * Get_Component<CTransform>()->Get_XMWorldMatrix();
|
||||
|
||||
m_pLeft_Trail->Trail_Update(LeftHandMatrix * WorldMat, fTimeDelta);
|
||||
m_pRight_Trail->Trail_Update(RightHandMatrix * WorldMat, fTimeDelta);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Render()
|
||||
{
|
||||
if (!m_bVisible)
|
||||
return S_OK;
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
_uint iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::SPECTOR);
|
||||
|
||||
if (FAILED(Render_Disolve())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(iShaderPass))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
_bool bDisolve = false;
|
||||
_float zero = 0.f;
|
||||
m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool));
|
||||
m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &zero, sizeof(_float));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Ready_Components()
|
||||
{
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
|
||||
Desc.fSpeedPerSec = 10.f;
|
||||
Desc.fRotationPerSec = XMConvertToRadians(180.0f);
|
||||
Desc.fRadius = 10.f;
|
||||
|
||||
__super::Ready_Components(&Desc);
|
||||
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Goblin_Spector_Model");
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Spector_Trail_Visible(_bool isTrailVisible)
|
||||
{
|
||||
m_pLeft_Trail->Set_Visible(isTrailVisible);
|
||||
m_pRight_Trail->Set_Visible(isTrailVisible);
|
||||
|
||||
m_pLeft_Trail->Get_Component<CTrail>()->Reset_Trail();
|
||||
m_pRight_Trail->Get_Component<CTrail>()->Reset_Trail();
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Ready_Parts()
|
||||
{
|
||||
|
||||
{
|
||||
CGoblin_Sword::GOBLIN_SWORD_DESC Goblin_SwordDesc{};
|
||||
|
||||
Goblin_SwordDesc.pParentTransform = m_pTransformCom;
|
||||
Goblin_SwordDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand");
|
||||
Goblin_SwordDesc.iIndex = 0;
|
||||
|
||||
if (FAILED(Add_PartObject<CGoblin_Sword>("Goblin_Sword_L", g_iStaticLevel, nullptr, &Goblin_SwordDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
CGoblin_Sword::GOBLIN_SWORD_DESC Goblin_SwordDesc{};
|
||||
|
||||
Goblin_SwordDesc.pParentTransform = m_pTransformCom;
|
||||
Goblin_SwordDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||
Goblin_SwordDesc.iIndex = 1;
|
||||
|
||||
if (FAILED(Add_PartObject<CGoblin_Sword>("Goblin_Sword_R", g_iStaticLevel, nullptr, &Goblin_SwordDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(Add_PartObject<CTrailObject>("Left_Trail", g_iStaticLevel, &m_pLeft_Trail, &PartsDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pLeft_Trail->Load_Trail("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Trail_R", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pLeft_Trail->Set_Visible(false);
|
||||
|
||||
if (FAILED(Add_PartObject<CTrailObject>("Right_Trail", g_iStaticLevel, &m_pRight_Trail, &PartsDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pRight_Trail->Load_Trail("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Trail_R", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pRight_Trail->Set_Visible(false);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CGoblin_Assassin_Spector* CGoblin_Assassin_Spector::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CGoblin_Assassin_Spector* pInstance = new CGoblin_Assassin_Spector(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CGoblin_Assassin_Spector");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CGoblin_Assassin_Spector::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CGoblin_Assassin_Spector* pInstance = new CGoblin_Assassin_Spector(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CGoblin_Assassin_Spector");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
SAFE_RELEASE(m_pGoblin);
|
||||
SAFE_RELEASE(m_pLeft_Trail);
|
||||
SAFE_RELEASE(m_pRight_Trail);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CGoblin_Assassin_Spector::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("GoblinSpector")) {
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
GUI::DragFloat3("Scale", (_float*)&vScale);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
File diff suppressed because it is too large
Load Diff
@@ -66,12 +66,8 @@ void CGoblin_Attack::Update(_float fTimeDelta)
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
|
||||
_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
|
||||
|
||||
|
||||
}
|
||||
@@ -90,13 +86,18 @@ HRESULT CGoblin_Attack::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
|
||||
_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
//
|
||||
//CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
//
|
||||
//_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_vMat = *static_cast<_float4x4*>(pArg);
|
||||
|
||||
//m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
//m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
|
||||
|
||||
m_pPT1->Set_Visible(true);
|
||||
m_pPT2->Set_Visible(true);
|
||||
|
||||
@@ -269,7 +269,7 @@ void CGoblin_BattleAxe::SwingHit(_bool& bPlayerHit)
|
||||
for (_uint i = 0; i < pxHits.size(); ++i) {
|
||||
PSX::PxActor* pxHitActor = pxHits[i].actor;
|
||||
if (nullptr != pxHitActor && nullptr != pxHitActor->userData) {
|
||||
PhsXUserData* pUserData = (PhsXUserData*)pxHitActor->userData;
|
||||
PHYSX_USERDATA* pUserData = (PHYSX_USERDATA*)pxHitActor->userData;
|
||||
|
||||
ON_COLLISION_INFO tagCollInfo = {};
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ void CGoblin_Dagger::Dagger_Hit()
|
||||
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
|
||||
tagCollInfo.fLength = fLength;
|
||||
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
|
||||
@@ -82,9 +82,6 @@ void CGoblin_Mage::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CGoblin_Mage::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
@@ -285,7 +282,6 @@ _vector CGoblin_Mage::Get_LockOnPos()
|
||||
|
||||
void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
|
||||
if (true == m_bDead) {
|
||||
return;
|
||||
}
|
||||
@@ -332,6 +328,12 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
case ENUM_CLASS(SKILL_TYPE::STUPEFY):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::STUPEFY);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -466,7 +466,11 @@ void CGoblin_Mage::Behavior_HitEnter()
|
||||
pairAnimInfo = m_Animation[STATEANIM::INCARCEROUS];
|
||||
break;
|
||||
default:
|
||||
pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_R];
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
if(iRand == 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_L];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_R];
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@ void CGoblin_Protego::Update(_float fTimeDelta)
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
if (m_bVisible == false) {
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
}
|
||||
|
||||
|
||||
/* 시작 사이즈 러프 */
|
||||
@@ -92,10 +95,8 @@ void CGoblin_Protego::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_Component<CCharacter_Controller>()->Get_Position());
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Protego::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
@@ -127,6 +128,15 @@ HRESULT CGoblin_Protego::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::GOBLIN_PROTEGO);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_SHIELD"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -164,6 +174,8 @@ CGameObject* CGoblin_Protego::Clone(void* pArg, CGameObject* pOwner)
|
||||
|
||||
void CGoblin_Protego::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
if (!m_bVisible)
|
||||
return;
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
@@ -180,6 +192,7 @@ void CGoblin_Protego::Free()
|
||||
SAFE_RELEASE(m_pSphere);
|
||||
SAFE_RELEASE(m_pBottom);
|
||||
SAFE_RELEASE(m_pCircle);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -30,9 +30,7 @@
|
||||
void CGoblin::Behavior_IdleEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLE);
|
||||
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CGoblin::Behavior_IdleExitCheck()
|
||||
@@ -41,6 +39,10 @@ HRESULT CGoblin::Behavior_IdleExitCheck()
|
||||
{
|
||||
m_bLookAt = false;
|
||||
m_bDetection = true;
|
||||
|
||||
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
if ((m_fTargetDistance <= 10.f && m_fTargetDistance != 0.f) /*|| m_pDetection->Get_Step() == true*/)
|
||||
{
|
||||
@@ -131,8 +133,6 @@ HRESULT CGoblin::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
|
||||
|
||||
if (m_fTargetDistance >= 6.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
@@ -207,8 +207,6 @@ void CGoblin::Behavior_CombatEnter()
|
||||
|
||||
HRESULT CGoblin::Behavior_CombatExitCheck(_float fTimeDelta)
|
||||
{
|
||||
m_bLookAt = true;
|
||||
|
||||
if (m_fTargetDistance > 25.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
@@ -267,7 +265,7 @@ void CGoblin::Behavior_SwingEnter()
|
||||
m_pGoblinSpector->Set_Visible(true);
|
||||
m_pGoblinSpector->Spector_Trail_Visible(true);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_ATTACK, m_pGoblinSpector->Get_PartObject<CGoblin_BattleAxe>());
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_ATTACK, m_pGoblinSpector->Get_PartObject<CGoblin_BattleAxe>(), (void*)&m_pGoblinSpector->Get_PartObject<CGoblin_BattleAxe>()->Get_AxeMatrix());
|
||||
},
|
||||
0.05f);
|
||||
|
||||
@@ -286,7 +284,7 @@ void CGoblin::Behavior_SwingEnter()
|
||||
|
||||
Set_Easing(pairAnimInfo.first, 0.01f, 0.15f, 0.8f);
|
||||
|
||||
Set_Easing(pairAnimInfo.first, 0.2f, 0.4f, 1.4f);
|
||||
Set_Easing(pairAnimInfo.first, 0.15f, 0.4f, 1.4f);
|
||||
}
|
||||
|
||||
HRESULT CGoblin::Behavior_SwingExitCheck(_float fTimeDelta)
|
||||
@@ -549,7 +547,11 @@ void CGoblin::Behavior_HitEnter()
|
||||
pairAnimInfo = m_Animation[STATEANIM::INCARCEROUS];
|
||||
break;
|
||||
default:
|
||||
pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_R];
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
if (iRand == 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_L];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::STUMBLE_BWD_R];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -798,7 +800,7 @@ void CGoblin::HitState_Behavior(_float fTimeDelta)
|
||||
m_pCharacter_Controller->ConvertToDO(*m_pRigidBody);
|
||||
_vector vCameraLook = m_pGameInstance->Get_CameraLook();
|
||||
vCameraLook = XMVector3Normalize(vCameraLook);
|
||||
m_pRigidBody->Add_Force(vCameraLook * 30.f, PSX::PxForceMode::eIMPULSE);
|
||||
m_pRigidBody->Add_Force(vCameraLook * 60.f, PSX::PxForceMode::eIMPULSE);
|
||||
m_fAirTime = 0.f;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
#include "pch.h"
|
||||
#include "Goblin_Sword.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Goblin.h"
|
||||
|
||||
CGoblin_Sword::CGoblin_Sword(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CPartObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CGoblin_Sword::CGoblin_Sword(const CGoblin_Sword& Prototype)
|
||||
: CPartObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Sword::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Sword::Initialize(void* pArg)
|
||||
{
|
||||
GOBLIN_SWORD_DESC* pDesc = static_cast<GOBLIN_SWORD_DESC*> (pArg);
|
||||
m_pSocketMatrices = pDesc->pSocketMatrices;
|
||||
m_iIndex = pDesc->iIndex;
|
||||
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGoblin_Sword::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGoblin_Sword::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bDisolve) {
|
||||
m_fDisolveTime += fTimeDelta;
|
||||
if (m_fDisolveTime >= 1.f)
|
||||
{
|
||||
m_fDisolveTime = 0.f;
|
||||
m_bDisolve = false;
|
||||
m_bVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CGoblin_Sword::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
_matrix socketMatrix = {};
|
||||
|
||||
socketMatrix = XMLoadFloat4x4(m_pSocketMatrices);
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
socketMatrix.r[i] = XMVector3Normalize(socketMatrix.r[i]);
|
||||
}
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
|
||||
XMStoreFloat4x4(&m_vSwordMat, XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone")) * m_pTransformCom->Get_XMWorldMatrix());
|
||||
if (m_bCanTakeDamage)
|
||||
{
|
||||
Sword_Hit();
|
||||
}
|
||||
else {
|
||||
m_bHit = false;
|
||||
}
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Sword::Render()
|
||||
{
|
||||
if (!m_pModelCom)
|
||||
return S_OK;
|
||||
|
||||
if (!m_bVisible)
|
||||
return S_OK;
|
||||
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Render_Disolve())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SPECTOR_WEAPON)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
_bool bDisolve = false;
|
||||
_float zero = 0.f;
|
||||
m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool));
|
||||
m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &zero, sizeof(_float));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Sword::Render_Disolve()
|
||||
{
|
||||
if (FLT_EPSILON3 * 10 < m_fDisolveTime)
|
||||
{
|
||||
_bool bDisolve = true;
|
||||
_float fDisolveAmount = 0.1f;
|
||||
_float fDisolveEdgeWidth = 0.1f;
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &m_fDisolveTime, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveAmount", &fDisolveAmount, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveEdgeWidth", &fDisolveEdgeWidth, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_GlobalSRV(m_pShaderCom, TEXT("GLOBAL_DISOLVE_NOISE_05"), "g_DeadDisolveTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_GlobalSRV(m_pShaderCom, TEXT("GLOBAL_DISOLVE_BURN_VERTICAL"), "g_DisolveTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Sword::Ready_Components()
|
||||
{
|
||||
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
|
||||
Desc.fSpeedPerSec = 10.f;
|
||||
Desc.fRotationPerSec = XMConvertToRadians(180.0f);
|
||||
Desc.fRadius = 10.f;
|
||||
|
||||
__super::Ready_Components(&Desc);
|
||||
|
||||
|
||||
if (m_iIndex == 0)
|
||||
{
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Goblin_Sword_L_Model");
|
||||
}
|
||||
else {
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Goblin_Sword_R_Model");
|
||||
}
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Sword::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGoblin_Sword::Sword_Hit()
|
||||
{
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
_vector vEndPos = m_pTransformCom->Get_State(STATE::POSITION);
|
||||
_vector vDir = vEndPos - vStartPos;
|
||||
_float fLength = XMVectorGetX(XMVector4Length(vDir));
|
||||
vDir = XMVector4Normalize(vDir);
|
||||
m_SweepBuffer = {};
|
||||
_bool bHit = m_pGameInstance->SphereCast(0.5f, vStartPos, vDir, fLength, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, m_SweepBuffer);
|
||||
if (true == bHit) {
|
||||
vector<PSX::PxSweepHit*> Hits;
|
||||
_uint iHitCount = m_SweepBuffer.nbTouches;
|
||||
if (true == m_SweepBuffer.hasBlock) {
|
||||
iHitCount += 1;
|
||||
Hits.reserve(iHitCount);
|
||||
Hits.emplace_back(&m_SweepBuffer.block);
|
||||
}
|
||||
else {
|
||||
Hits.reserve(iHitCount);
|
||||
}
|
||||
for (_uint i = 0; i < m_SweepBuffer.nbTouches; ++i) {
|
||||
Hits.emplace_back(&m_SweepBuffer.touches[i]);
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < Hits.size(); ++i) {
|
||||
PSX::PxSweepHit* pHit = Hits[i];
|
||||
PSX::PxActor* pActor = pHit->actor;
|
||||
if (nullptr != pActor && nullptr != pActor->userData) {
|
||||
const PSX::PxSweepHit& hit = m_SweepBuffer.block;
|
||||
PSX::PxShape* pShape = hit.shape;
|
||||
ON_COLLISION_INFO tagCollInfo = {};
|
||||
|
||||
tagCollInfo.vWorldPos.w = 1.f;
|
||||
|
||||
memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
|
||||
|
||||
memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
|
||||
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
|
||||
tagCollInfo.fLength = fLength;
|
||||
tagCollInfo.fDamage = 10.f;
|
||||
tagCollInfo.eHitType = ENUM_CLASS(HIT_TYPE::HIT_MEDIUM);
|
||||
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case Engine::PXOBJECT::PLAYER:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
m_bCanTakeDamage = false;
|
||||
}
|
||||
break;
|
||||
case Engine::PXOBJECT::ALLY_HITBOX:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CGoblin_Sword* CGoblin_Sword::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CGoblin_Sword* pInstance = new CGoblin_Sword(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CGoblin_Sword");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CGoblin_Sword::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CGoblin_Sword* pInstance = new CGoblin_Sword(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CGoblin_Sword");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CGoblin_Sword::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CGoblin_Sword::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -130,7 +130,22 @@ HRESULT CLevel_Field::Ready_Lights()
|
||||
{
|
||||
CLight_Main* pLight = { nullptr };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLight_Main>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT,nullptr, nullptr, &pLight))) {
|
||||
LIGHT_DESC Desc = {};
|
||||
if (m_isDay)
|
||||
{
|
||||
Desc.vDiffuse = _float4(0.6529f, 0.6157f, 0.7843f, 1.0f);
|
||||
Desc.vAmbient = _float4(0.6275f, 0.6275f, 0.6275f, 0.0314f);
|
||||
Desc.vSpecular = _float4(0.05f, 0.05f, 0.05f, 0.05f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Desc.vDiffuse = _float4(0.0471f, 0.0745f, 0.1294f, 0.2549f);
|
||||
Desc.vAmbient = _float4(0.1686f, 0.1765f, 0.1373f, 0.0f);
|
||||
Desc.vSpecular = _float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLight_Main>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT, &Desc, nullptr, &pLight))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
#include "Level_Loading.h"
|
||||
#include "Light_Main.h"
|
||||
#include "Camera_Debug.h"
|
||||
#include "Camera_Model.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "UI_Manager.h"
|
||||
#include "Layer.h"
|
||||
#include "SkyBox.h"
|
||||
#include "Broom.h"
|
||||
#include "Dummy_PhysXWall.h"
|
||||
#include "Dummy_PhysXPlayable.h"
|
||||
#include "Terrain.h"
|
||||
#include "EffectPool.h"
|
||||
#include "InstancedProp.h"
|
||||
@@ -25,6 +24,7 @@
|
||||
#include "Troll.h"
|
||||
#include "Goblin.h"
|
||||
#include "Goblin_Mage.h"
|
||||
#include "Goblin_Assassin.h"
|
||||
#include "Goblin_Spector.h"
|
||||
#include "NPC_Ollivander.h"
|
||||
#include "NPC_EleazarFig.h"
|
||||
@@ -42,10 +42,31 @@ CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pCo
|
||||
|
||||
HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
{
|
||||
// 낮, 밤 설정
|
||||
#ifdef gimch
|
||||
m_isDay = false;
|
||||
#endif // gimch
|
||||
#ifdef Bin
|
||||
m_isDay = true;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
m_isDay = true;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
m_isDay = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
m_isDay = true;
|
||||
#endif //
|
||||
|
||||
if (FAILED(Ready_Lights())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Volumetric())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
//플레이어 , 맵 보다 먼저 생성해야함 !
|
||||
if (FAILED(Reday_Layer_EffectPool())) {
|
||||
return E_FAIL;
|
||||
@@ -164,13 +185,54 @@ HRESULT CLevel_GamePlay::Render()
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Lights()
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLight_Main>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT))) {
|
||||
|
||||
LIGHT_DESC Desc = {};
|
||||
if (m_isDay)
|
||||
{
|
||||
Desc.vDiffuse = _float4(0.6529f, 0.6157f, 0.7843f, 1.0f);
|
||||
Desc.vAmbient = _float4(0.6275f, 0.6275f, 0.6275f, 0.0314f);
|
||||
Desc.vSpecular = _float4(0.05f, 0.05f, 0.05f, 0.05f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Desc.vDiffuse = _float4(0.0471f, 0.0745f, 0.1294f, 0.2549f);
|
||||
Desc.vAmbient = _float4(0.1686f, 0.1765f, 0.1373f, 0.0f);
|
||||
Desc.vSpecular = _float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLight_Main>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Volumetric()
|
||||
{
|
||||
// Volumetric 설정
|
||||
if(m_isDay)
|
||||
{
|
||||
m_pGameInstance->Setting_Volumetirc(
|
||||
1.251f, // 밀도
|
||||
0.0253f, // 빛 강도
|
||||
0.9f, // 산란 계수
|
||||
1.78f // 깊이 분포 계수
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pGameInstance->Setting_Volumetirc(
|
||||
0.626f, // 밀도
|
||||
0.01f, // 빛 강도
|
||||
0.11f, // 산란 계수
|
||||
1.0f // 깊이 분포 계수
|
||||
);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Background()
|
||||
{
|
||||
CTerrain::TERRAIN_DESC Terrain_Desc = {};
|
||||
@@ -267,8 +329,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isReady_Background = true;
|
||||
isReady_Hogsmeade = true;
|
||||
isReady_Hogwart = true;
|
||||
isReady_Hogsmeade = false;
|
||||
isReady_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isReady_Background = false;
|
||||
@@ -582,33 +644,57 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
{
|
||||
CNPC_Ollivander::NPCDESC NPCDesc{};
|
||||
NPCDesc.vPos = _float4(40.f, 4.f, 68.9f, 1.f);
|
||||
NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_Ollivander>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
CNPC_EleazarFig::NPCDESC NPCDesc{};
|
||||
NPCDesc.vPos = _float4(101.f, 14.f, 100.f, 1.f);
|
||||
NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_EleazarFig>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
_bool isLoad_NPC = { true };
|
||||
#ifdef _DEBUG
|
||||
#ifdef gimch
|
||||
|
||||
#endif // gimch
|
||||
#ifdef 진우
|
||||
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_NPC = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
|
||||
#endif //
|
||||
#ifdef Bin
|
||||
|
||||
#endif // Bin
|
||||
#endif // _DEBUG
|
||||
|
||||
if(true == isLoad_NPC)
|
||||
{
|
||||
{
|
||||
CNPC_Ollivander::NPCDESC NPCDesc{};
|
||||
NPCDesc.vPos = _float4(40.f, 4.f, 68.9f, 1.f);
|
||||
NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_Ollivander>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
CNPC_EleazarFig::NPCDESC NPCDesc{};
|
||||
NPCDesc.vPos = _float4(101.f, 14.f, 100.f, 1.f);
|
||||
NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_EleazarFig>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_BroomRacerAI(const _wstring& strLayerTag)
|
||||
{
|
||||
for (_uint i = 0; i < 10; ++i) {
|
||||
#ifdef Bin
|
||||
for (_uint i = 0; i < 0; ++i) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroomRacerAI>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, m_pBroomRaceManager))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
#endif // Bin
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -619,15 +705,16 @@ HRESULT CLevel_GamePlay::Ready_Layer_Item(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_RaceRing(const _wstring& strLayerTag)
|
||||
{
|
||||
for (_uint i = 0; i < 10; ++i) {
|
||||
for (_uint i = 0; i < 1; ++i) {
|
||||
|
||||
CRaceRing::RACERING_DESC RaceRingDesc {};
|
||||
CRaceRing::RACERING_DESC RaceRingDesc{};
|
||||
RaceRingDesc.pBroomRaceManager = m_pBroomRaceManager;
|
||||
RaceRingDesc.iIndex = i;
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRaceRing>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &RaceRingDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -637,49 +724,65 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
CDummy_PhysXWall::PHYSXDUMMY_DESC Desc{};
|
||||
Desc.vPos = { 0.f, 0.f, 0.f };
|
||||
Desc.vRotRPY = { 0.f, m_pGameInstance->Random_Float(0.f, XM_2PI), 0.f };
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::WALL);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXWall>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
{
|
||||
for (_uint i = 0; i <1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
_bool isLoad_Monster = { true };
|
||||
#ifdef _DEBUG
|
||||
#ifdef gimch
|
||||
|
||||
#endif // gimch
|
||||
#ifdef 진우
|
||||
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Monster = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
|
||||
#endif //
|
||||
#ifdef Bin
|
||||
|
||||
#endif // Bin
|
||||
#endif // _DEBUG
|
||||
if (true == isLoad_Monster) {
|
||||
for (_uint i = 0; i < 1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < 1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Mage>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < 1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Assassin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTroll>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (_uint i = 0; i <1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Mage>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRanrok>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTroll>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRanrok>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#if 진우
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -23,10 +23,12 @@ HRESULT CLight_Main::Initialize(void* pArg)
|
||||
if (FAILED(__super::Initialize(pArg))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components())){
|
||||
if (FAILED(Ready_Components(pArg))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pTransformCom->Set_State(STATE::LOOK, XMVectorSet(-1.716f, 0.121f, 0.211f, 0.f));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -88,23 +90,23 @@ HRESULT CLight_Main::Capture_PreShadow()
|
||||
_float4x4 ProjMatrix = {}; XMStoreFloat4x4(&ProjMatrix, Get_OffCenterProjMatrix(xmViewMatrix, vNeededPos));
|
||||
|
||||
m_pGameInstance->Render_PreShadow(ViewMatrix, ProjMatrix);
|
||||
|
||||
m_pGameInstance->Update_Volumetric();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLight_Main::Ready_Components()
|
||||
HRESULT CLight_Main::Ready_Components(void* pArg)
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
m_pTransformCom->LookAt(XMVectorSet(1.f, -4.f, 1.f, 1.f));
|
||||
LIGHT_DESC* pLightDescArg = static_cast<LIGHT_DESC*>(pArg);
|
||||
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::DIRECTIONAL;
|
||||
//LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
//LightDesc.vAmbient = _float4(0.6f, 0.6f, 0.6f, 0.f);
|
||||
//LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.vDiffuse = _float4(0.3f, 0.3f, 0.1f, 0.f);
|
||||
LightDesc.vAmbient = _float4(0.12f, 0.12f, 0.24f, 0.f);
|
||||
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.vDiffuse = pLightDescArg->vDiffuse;
|
||||
LightDesc.vAmbient = pLightDescArg->vAmbient;
|
||||
LightDesc.vSpecular = pLightDescArg->vSpecular;
|
||||
LightDesc.pDirection = m_pTransformCom->Get_StatePtr(STATE::LOOK);
|
||||
LightDesc.iLevel = NEXT_LEVEL;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ HRESULT CLightning::Initialize(void* pArg)
|
||||
if (FAILED(Create_Effect()))
|
||||
return E_FAIL;
|
||||
|
||||
m_iSkillType = ENUM_CLASS(SKILL_TYPE::LIGHTNING);
|
||||
m_iSkillType = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC);
|
||||
|
||||
m_wstrEffectName = L"Lightning";
|
||||
|
||||
@@ -82,14 +82,15 @@ void CLightning::Late_Update(_float fTimeDelta)
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
//if (false == m_bHit) {
|
||||
// _vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
// _vector vEndPos = XMLoadFloat4(&m_vEndPos);
|
||||
// ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f , true);
|
||||
if (false == m_bHit) {
|
||||
_vector vTop = XMLoadFloat4(&m_vTargetPos) + XMVectorSet(0.f, 5.f, 0.f, 0.f);
|
||||
|
||||
// OnCollision(this, &CollisionInfo);
|
||||
//}
|
||||
_vector vBottom = XMLoadFloat4(&m_vTargetPos) - XMVectorSet(0.f, 5.f, 0.f, 0.f);
|
||||
|
||||
ON_COLLISION_INFO CollisionInfo = SweepTarget(vTop, vBottom, 0.02f, true);
|
||||
|
||||
OnCollision(this, &CollisionInfo);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CLightning::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
@@ -215,7 +216,7 @@ void CLightning::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
CWand* pWand = static_cast<CPlayer*>(m_pOwner)->Get_PartObject<CWand>();
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "CamPosition_Socket.h"
|
||||
#include "CamPosition_Target.h"
|
||||
#include "CamPosition_AI.h"
|
||||
#include "Camera_Model.h"
|
||||
#include "SkyBox.h"
|
||||
#include "Troll_Weapon.h"
|
||||
#include "Troll_Rock.h"
|
||||
@@ -21,15 +22,19 @@
|
||||
#include "Wand.h"
|
||||
#include "Item_Potion.h"
|
||||
#include "RaceRing.h"
|
||||
#include "Goblin_Sword.h"
|
||||
#include "Goblin_BattleAxe.h"
|
||||
#include "BroomRaceManager.h"
|
||||
|
||||
#pragma region ACTOR
|
||||
|
||||
#include "Player.h"
|
||||
#include "PlayerRobe.h"
|
||||
#include "Goblin.h"
|
||||
#include "Goblin_Mage.h"
|
||||
#include "Goblin_Assassin.h"
|
||||
#include "Goblin_Spector.h"
|
||||
#include "Goblin_Assassin_Spector.h"
|
||||
#include "Troll.h"
|
||||
#include "NPC_Ollivander.h"
|
||||
#include "NPC_EleazarFig.h"
|
||||
@@ -135,9 +140,6 @@
|
||||
#pragma endregion
|
||||
|
||||
#pragma region PHYSX
|
||||
|
||||
#include "Dummy_PhysXWall.h"
|
||||
#include "Dummy_PhysXPlayable.h"
|
||||
#include "PhysXEffectHitBox.h"
|
||||
|
||||
#pragma endregion
|
||||
@@ -355,27 +357,39 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
_bool isLoad_Background = { true };
|
||||
_bool isLoad_Hogwart = { false };
|
||||
_bool isLoad_UI_SEQUANTIAL = { true };
|
||||
_bool isLoad_NPC = { true };
|
||||
_bool isLoad_Monster = { true };
|
||||
|
||||
#ifdef _DEBUG
|
||||
#ifdef gimch
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif // gimch
|
||||
#ifdef Bin
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = true;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
isLoad_NPC = true;
|
||||
isLoad_Monster = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif //
|
||||
#ifdef Bin
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif // Bin
|
||||
#endif // _DEBUG
|
||||
|
||||
#pragma region MAP_MODELS
|
||||
vector<future<vector<FOLDER_LOAD*>*>> jobMapModels;
|
||||
@@ -945,8 +959,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma region UI
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Keyboard", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
@@ -1225,106 +1237,103 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
#pragma region UI_ANI
|
||||
if (true == isLoad_UI_SEQUANTIAL) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma endregion
|
||||
#pragma region Global_SRV
|
||||
{
|
||||
m_pGameInstance->Load_GlobalSRV(TEXT("GLOBAL_DISOLVE_NOISE_05"), "../Bin/Resources/Textures/Effect/Noises/VFX_T_Noise05_D.png");
|
||||
m_pGameInstance->Load_GlobalSRV(TEXT("GLOBAL_DISOLVE_BURN_VERTICAL"), "../Bin/Resources/Textures/Effect/Diffuse/drp_fire_Line_Vertical.png");
|
||||
}
|
||||
#pragma endregion
|
||||
#if 진우
|
||||
#elif 기무리
|
||||
#elif 인혁
|
||||
#elif Bin
|
||||
#elif gimch
|
||||
#else
|
||||
#pragma region UI_ANI
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#endif
|
||||
|
||||
#pragma region TERRAIN_TEXTURE
|
||||
/* Terrain_Diffuse */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Diffuse"),
|
||||
@@ -1373,7 +1382,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region LAKE_TEXTURE
|
||||
/* For.Prototype_Component_Water_Noise_D */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("T_Noises_D"),
|
||||
@@ -1510,6 +1518,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
|
||||
#pragma endregion
|
||||
#pragma region SHADER
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
@@ -1531,7 +1540,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl"),
|
||||
VTX_MODEL_INSTANCE_MODEL::Elements, VTX_MODEL_INSTANCE_MODEL::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
@@ -1572,6 +1581,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
|
||||
CVIBuffer_UI_Instance::UI_INSTANCE_DESC SpellSlotUIDesc{};
|
||||
@@ -1663,7 +1673,68 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Quest_Slot_Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
{
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
Desc.eType = ACTOR::SPHERE;
|
||||
Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ };
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.001f };
|
||||
Desc.fContactOffset = { 0.005f };
|
||||
Desc.vhalfGeometryInfo = { 0.025f, 0.025f, 0.025f };
|
||||
Desc.fDensity = 0.01f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 12.f, 12.f };
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
Desc.eType = ACTOR::CAPSULE;
|
||||
Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ };
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.001f };
|
||||
Desc.fContactOffset = { 0.005f };
|
||||
Desc.vhalfGeometryInfo = { 0.025f, 0.085f, 0.f };
|
||||
Desc.fDensity = 0.01f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 12.f, 12.f };
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
Desc.eType = ACTOR::CAPSULE;
|
||||
Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.01f };
|
||||
Desc.fContactOffset = { 0.01f };
|
||||
Desc.vhalfGeometryInfo = { 0.12f, 0.25f, 0.f };
|
||||
Desc.fDensity = 122.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 1.f, 1.f };
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DynamicJoint"), CDynamic_D6Joint::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ // LIGHT PHYSX DYNAMIC
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
@@ -1690,7 +1761,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc1.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc1.vMatInfo = { 0.5f, 0.5f, 0.6f };
|
||||
Desc1.fContactOffset = { 0.05f };
|
||||
Desc1.vhalfGeometryInfo = { 1.f, 1.f, 1.f };
|
||||
Desc1.vhalfGeometryInfo = { 2.f, 2.f, 2.f };
|
||||
Desc1.fDensity = 1.f;
|
||||
Desc1.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc1.eLockFlag = {};
|
||||
@@ -1702,22 +1773,21 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_SHIELD"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc1)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX_KIN"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
{ // DOOR PHYSX
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
@@ -1760,55 +1830,69 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (true == isLoad_NPC) {
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Npc_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GerboldOlivander_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Npc_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin",XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Professor_EleazarFig_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VictorRookWood_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
if (true == isLoad_Monster) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Mage_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Mage_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Spector_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Assassin_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GerboldOlivander_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Professor_EleazarFig_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VictorRookWood_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ghost_Peeves_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ghost_Peeves_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ranrok_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ranrok_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region ITEM
|
||||
@@ -1841,13 +1925,27 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/SK_WPN_GOB_SmallSword.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Sword_L_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Sword/SK_WPN_GOB_SmallSword_L.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Sword_R_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Sword/SK_WPN_GOB_SmallSword_R.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_BattleAxe_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_BattleAxe/SK_WPN_GOB_BattleAxe01.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_BattleAxe/SK_WPN_GOB_BattleAxe01.bin", XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CPlayerRobe::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_CCL_CameraRig.001_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/CCL_CameraRig.001.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_SkyboxModel */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SkyboxModel"),
|
||||
@@ -2721,10 +2819,18 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Mage>(g_iStaticLevel, CGoblin_Mage::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Goblin_Assassin */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Assassin>(g_iStaticLevel, CGoblin_Assassin::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Goblin_Spector */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Spector>(g_iStaticLevel, CGoblin_Spector::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Goblin_Assassin_Spector */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Assassin_Spector>(g_iStaticLevel, CGoblin_Assassin_Spector::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Troll */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTroll>(g_iStaticLevel, CTroll::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -2775,6 +2881,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Arm>(g_iStaticLevel, CCamPosition_Arm::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Camera_Model */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CCamera_Model>(g_iStaticLevel, CCamera_Model::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Wand */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CWand>(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -2799,6 +2909,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Dagger>(g_iStaticLevel, CGoblin_Dagger::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Goblin_Sword */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Sword>(g_iStaticLevel, CGoblin_Sword::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Goblin_BattleAxe */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_BattleAxe>(g_iStaticLevel, CGoblin_BattleAxe::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -2811,15 +2925,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroomRaceManager>(g_iStaticLevel, CBroomRaceManager::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_PhysXWall>(g_iStaticLevel, CDummy_PhysXWall::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_PhysXPlayable>(g_iStaticLevel, CDummy_PhysXPlayable::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CPhysXEffectHitBox>(g_iStaticLevel, CPhysXEffectHitBox::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ HRESULT CMapElement_Chest::Initialize(void* pArg)
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize);
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition);
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Move_LocalPos(XMVectorSet(0.f, 0.f, 0.f, 1.f), XMLoadFloat3(&pDesc->vBoxLocalPosition));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ void CMapElement_Door::Late_Update(_float fTimeDelta)
|
||||
* (ScaleMatrix * RotationMatrix * TranslationWorld); // 그 후 SRT 적용
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(world);
|
||||
m_pActor->setGlobalPose(XMWorldToPx_NoScale(world));
|
||||
m_pActor->setGlobalPose(XMWorldToPx_NoScaleNoFlip(world));
|
||||
|
||||
m_pActor->setAngularVelocity(PSX::PxVec3(0));
|
||||
m_pActor->setLinearVelocity(PSX::PxVec3(0));
|
||||
|
||||
@@ -58,7 +58,7 @@ HRESULT CMapElement_Interactable::Initialize(void* pArg)
|
||||
m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize);
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition);
|
||||
static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Move_LocalPos(XMVectorSet(0.f, 0.f, 0.f, 1.f), XMLoadFloat3(&pDesc->vBoxLocalPosition));
|
||||
//static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Set_Kinematic(false);
|
||||
|
||||
if (false == m_isPooled)
|
||||
@@ -338,7 +338,7 @@ void CMapElement_Interactable::ActivateAt(_fvector vPos)
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vPos);
|
||||
m_pInfoInstance->Regist_ActiveInteractive(this);
|
||||
m_pRigidBody->Set_Kinematic(false);
|
||||
m_pRigidBody->Set_Position(vPos);
|
||||
m_pRigidBody->Set_Position(vPos, true);
|
||||
}
|
||||
|
||||
ON_COLLISION_INFO CMapElement_Interactable::CollisionCheck(_fvector StartPos, _fvector EndPos, _float fRadius)
|
||||
@@ -372,7 +372,7 @@ ON_COLLISION_INFO CMapElement_Interactable::CollisionCheck(_fvector StartPos, _f
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
|
||||
switch (pUserData->eKind)
|
||||
@@ -432,7 +432,7 @@ ON_COLLISION_INFO CMapElement_Interactable::CollisionCheck(_fvector StartPos, _f
|
||||
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
|
||||
@@ -28,7 +28,7 @@ HRESULT CMonster::Initialize(void* pArg)
|
||||
}
|
||||
|
||||
m_pInfoInstance->Regist_ActiveMonster(this);
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -115,14 +115,8 @@ HRESULT CMonster::Render_OutLine()
|
||||
return E_FAIL;
|
||||
}
|
||||
Compute_Depth();
|
||||
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
if (m_fOutLineThickness > 6.f) {
|
||||
m_fOutLineThickness = 6.f;
|
||||
}
|
||||
else if (m_fOutLineThickness < 2.f) {
|
||||
m_fOutLineThickness = 2.f;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -227,10 +221,10 @@ HRESULT CMonster::Render_Disolve()
|
||||
if (FLT_EPSILON3 * 10 < m_fDisolveTime)
|
||||
{
|
||||
m_bDrawOutLine = false;
|
||||
_bool bDisolve = true;
|
||||
_int bDisolve = 1;
|
||||
_float fDisolveAmount = 0.1f;
|
||||
_float fDisolveEdgeWidth = 0.1f;
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &m_fDisolveTime, sizeof(_float)))) {
|
||||
|
||||
@@ -311,7 +311,7 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPCInteraction>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, nullptr, this, &m_pNPCInteraction))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPCInteraction>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pNPCInteraction))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "TrailObject.h"
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
CNomalJap::CNomalJap(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -112,7 +113,7 @@ void CNomalJap::Update(_float fTimeDelta)
|
||||
|
||||
_vector vDir = XMLoadFloat4(&m_vEndPos) - XMLoadFloat4(&m_vStartPos);
|
||||
|
||||
if (true == m_pGameInstance->SphereCast(0.25, XMLoadFloat4(&m_vStartPos), XMVector3Normalize(vDir), XMVectorGetX(XMVector3Length(vDir))
|
||||
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))
|
||||
{
|
||||
OnCollision(this);
|
||||
@@ -302,7 +303,7 @@ void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
|
||||
dynamic_cast<CPlayer*>(m_pOwner->Get_Owner())->Start_CameraShake(0.2f, 1.f);
|
||||
}
|
||||
|
||||
void CNomalJap::Free()
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "BroomRaceManager.h"
|
||||
#include "RaceRing.h"
|
||||
#include "PlayerRobe.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
@@ -177,6 +178,7 @@ __super::Update(fTimeDelta);
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)){
|
||||
m_pInfoInstance->Mouse_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_DOWN));
|
||||
}
|
||||
@@ -187,6 +189,116 @@ __super::Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
|
||||
#endif // _DEBUG
|
||||
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
if (false == m_LockOnInfo.pUnit->isDead()) {
|
||||
static_cast<CMonster*>(m_LockOnInfo.pUnit)->Set_DrawOutLine();
|
||||
}
|
||||
else {
|
||||
m_LockOnInfo.pUnit = nullptr;
|
||||
}
|
||||
}
|
||||
if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
static_cast<CMapElement_Interactable*>(m_LockOnInfo.pInteractive)->Set_DrawOutLine();
|
||||
}
|
||||
|
||||
if (m_bLookAt && m_LockOnInfo.pUnit)
|
||||
{
|
||||
m_pTransformCom->LookAt_Horizontal_Lerp(m_LockOnInfo.pUnit->Get_WorldPostion(), fTimeDelta, 5.f);
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
_vector look = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
_vector worldUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
_vector right = XMVector3Normalize(XMVector3Cross(worldUp, look));
|
||||
_vector up = XMVector3Normalize(XMVector3Cross(look, right));
|
||||
|
||||
m_pTransformCom->Set_State(STATE::RIGHT, right);
|
||||
m_pTransformCom->Set_State(STATE::UP, up);
|
||||
m_pTransformCom->Set_State(STATE::LOOK, look);
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#ifdef 기무리
|
||||
// if (nullptr == m_pRobePart) {
|
||||
// {
|
||||
// CPlayerRobe::PlayerRobe_DESC Desc{};
|
||||
// Desc.pModel = m_pModelCom;
|
||||
// Desc.pParentTransform = m_pTransformCom;
|
||||
// Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
|
||||
// if (FAILED(Add_PartObject<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
|
||||
// assert(false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//#endif // 기무리
|
||||
}
|
||||
|
||||
|
||||
HRESULT CPlayer::Render()
|
||||
{
|
||||
if (!m_bVisible){
|
||||
return S_OK;
|
||||
}
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
RENDER eType = m_pGameInstance->Get_CurrentRenderPass();
|
||||
if (RENDER::NONBLEND == eType) {
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
Render_CameraCoordinateSystem();
|
||||
//m_pCharacter_Controller->Render();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (RENDER::NONLIGHT == eType) {
|
||||
//m_pRigidBody->Render();
|
||||
}
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CPlayer::UpdateGrapInteractive(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_pGrapInteractive) {
|
||||
@@ -217,98 +329,6 @@ void CPlayer::Update_CameraShake(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
if (false == m_LockOnInfo.pUnit->isDead()) {
|
||||
static_cast<CMonster*>(m_LockOnInfo.pUnit)->Set_DrawOutLine();
|
||||
}
|
||||
else {
|
||||
m_LockOnInfo.pUnit = nullptr;
|
||||
}
|
||||
}
|
||||
if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
static_cast<CMapElement_Interactable*>(m_LockOnInfo.pInteractive)->Set_DrawOutLine();
|
||||
}
|
||||
|
||||
if (m_bLookAt && m_LockOnInfo.pUnit)
|
||||
{
|
||||
m_pTransformCom->LookAt_Horizontal_Lerp(m_LockOnInfo.pUnit->Get_WorldPostion(), fTimeDelta, 10.f);
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
_vector look = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
_vector worldUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
|
||||
_vector right = XMVector3Normalize(XMVector3Cross(worldUp, look));
|
||||
_vector up = XMVector3Normalize(XMVector3Cross(look, right));
|
||||
|
||||
m_pTransformCom->Set_State(STATE::RIGHT, right);
|
||||
m_pTransformCom->Set_State(STATE::UP, up);
|
||||
m_pTransformCom->Set_State(STATE::LOOK, look);
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Render()
|
||||
{
|
||||
if (!m_bVisible){
|
||||
return S_OK;
|
||||
}
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, false))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_pCharacter_Controller->Render();
|
||||
//m_pRigidBody->Render();
|
||||
Render_CameraCoordinateSystem();
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPlayer::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
@@ -349,12 +369,11 @@ HRESULT CPlayer::Render_Shadow(SHADOW eType)
|
||||
}
|
||||
void CPlayer::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
|
||||
if (m_pFSM->IsEnable(FSMSTATE::SHIELD))
|
||||
{
|
||||
m_bShield = true;
|
||||
}
|
||||
if (m_pFSM->IsEnable(FSMSTATE::DODGE | FSMSTATE::BLINK) && m_bShield)
|
||||
_int iCurrAnim = m_pModelCom->Get_AnimIndex();
|
||||
if (m_pFSM->IsEnable(FSMSTATE::DODGE | FSMSTATE::BLINK) ||
|
||||
m_bShield ||
|
||||
iCurrAnim == m_Animation[STATEANIM::AVADA_KEDAVRA].first||
|
||||
iCurrAnim == m_Animation[STATEANIM::ANCIENT_LIGHTNING].first)
|
||||
return;
|
||||
|
||||
#ifdef _DEBUG
|
||||
@@ -372,7 +391,8 @@ void CPlayer::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
m_fHitDegree = -1.f;
|
||||
}
|
||||
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
if(m_eHitType !=ENUM_CLASS(HIT_TYPE::HIT_NONE))
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
}
|
||||
void CPlayer::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
@@ -385,7 +405,6 @@ void CPlayer::Start_CameraShake(_float fTime, _float fIntense)
|
||||
m_fCameraShakeIntense = fIntense;
|
||||
m_bCameraShake = true;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CPlayer::Render_CameraCoordinateSystem()
|
||||
{
|
||||
@@ -437,8 +456,6 @@ void CPlayer::Render_CameraCoordinateSystem()
|
||||
);
|
||||
m_Batch->End();
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CPlayer::Ready_Components()
|
||||
{
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
@@ -550,8 +567,6 @@ HRESULT CPlayer::Ready_Parts()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -719,7 +734,7 @@ void CPlayer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
SAFE_RELEASE(m_pRobePart);
|
||||
SAFE_RELEASE(m_pGrapInteractive);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
|
||||
@@ -0,0 +1,638 @@
|
||||
#include "pch.h"
|
||||
#include "PlayerRobe.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CPlayerRobe::CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CPartObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype)
|
||||
: CPartObject(Prototype)
|
||||
{
|
||||
}
|
||||
void CPlayerRobe::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CPlayerRobe::Update(_float fTimeDelta)
|
||||
{
|
||||
_matrix SocketMatrixFixed = (XMMatrixRotationZ(XM_PI) * XMLoadFloat4x4(m_pSocketMatrix)) *
|
||||
XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr());
|
||||
m_pRobeMainAnchor->Move_Kinematic(SocketMatrixFixed, false);
|
||||
m_pRobeMainAnchor->Get_Actor()->wakeUp();
|
||||
Update_LegsPosition();
|
||||
}
|
||||
|
||||
void CPlayerRobe::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
Update_RobeSocketPosition();
|
||||
#ifdef _DEBUG
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
|
||||
PSX::PxConstraintFlags pxConstraintFlags = m_pDynamicJoints[i]->getConstraintFlags();
|
||||
const bool bBroken = (pxConstraintFlags.isSet(PSX::PxConstraintFlag::eBROKEN));
|
||||
if (true == bBroken) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Render()
|
||||
{
|
||||
Render_BonePhysX();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Update_RobeSocketPosition()
|
||||
{
|
||||
{
|
||||
PSX::PxTransform pxTransform = {};
|
||||
_matrix WorldMatrix = {};
|
||||
_matrix OwnerInvWorldMatrix = m_pParentTransformCom->Get_WorldMatrixInv();
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition();
|
||||
WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
|
||||
XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], WorldMatrix * OwnerInvWorldMatrix);
|
||||
}
|
||||
}
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
if (FAILED(m_pContext->Map(m_pBoneCombinedMatrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &SubResource))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
memcpy_s(SubResource.pData, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_ReconstructedJointAnchorMatirces, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END));
|
||||
m_pContext->Unmap(m_pBoneCombinedMatrixBuffer, 0);
|
||||
}
|
||||
m_pModelCom->ComputeInsertionBoneBuffer(m_BoneInsertionDesc, m_pBoneCombinedMatrixSRV);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld)
|
||||
{
|
||||
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
|
||||
|
||||
|
||||
PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor();
|
||||
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
|
||||
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
|
||||
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Create_BoneCombinedMatrixSRV()
|
||||
{
|
||||
D3D11_BUFFER_DESC desc{};
|
||||
desc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
desc.ByteWidth = sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END);
|
||||
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
|
||||
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
desc.StructureByteStride = sizeof(_float4x4);
|
||||
desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
|
||||
|
||||
if (FAILED(m_pDevice->CreateBuffer(&desc, nullptr, &m_pBoneCombinedMatrixBuffer))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
|
||||
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
|
||||
srvDesc.Format = DXGI_FORMAT_UNKNOWN;
|
||||
srvDesc.Buffer.FirstElement = 0;
|
||||
srvDesc.Buffer.NumElements = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END);
|
||||
|
||||
|
||||
if (FAILED(m_pDevice->CreateShaderResourceView(m_pBoneCombinedMatrixBuffer, &srvDesc, &m_pBoneCombinedMatrixSRV))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CPlayerRobe::Update_LegsPosition()
|
||||
{
|
||||
_matrix WorldMatrix = m_pParentTransformCom->Get_XMWorldMatrix();
|
||||
{
|
||||
|
||||
_vector vFootPos = XMVector4Transform(XMLoadFloat4((_float4*)&m_pLeftFootLocalMatrix->m[3][0]), WorldMatrix);
|
||||
_vector vLegPos = XMVector4Transform(XMLoadFloat4((_float4*)&m_pLeftLegLocalMatrix->m[3][0]), WorldMatrix);
|
||||
m_pLeftLeg->Set_CenterTransform(vFootPos, vLegPos, false);
|
||||
|
||||
#ifdef _DEBUG
|
||||
{
|
||||
_vector vCenterWorldPos = (vFootPos + vLegPos ) * 0.5f;
|
||||
_vector vRotQ = XMQuaternionIdentity();
|
||||
_vector vDir = XMVectorSetW(vLegPos - vFootPos, 0.f);
|
||||
_float vLength = XMVectorGetX(XMVector3Length(vDir));
|
||||
if (vLength > FLT_EPSILON5) {
|
||||
vDir = XMVector3Normalize(vDir);
|
||||
vRotQ = CMyTools::MakeQuaternionFromTo(XMVectorSet(0.f, 1.f, 0.f, 0.f), vDir);
|
||||
}
|
||||
XMStoreFloat4x4(&m_LeftLegMatrix, XMMatrixRotationQuaternion(vRotQ) * XMMatrixTranslationFromVector(vCenterWorldPos));
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
vFootPos = XMVector4Transform(XMLoadFloat4((_float4*)&m_pRightFootLocalMatrix->m[3][0]), WorldMatrix);
|
||||
vLegPos = XMVector4Transform(XMLoadFloat4((_float4*)&m_pRightLegLocalMatrix->m[3][0]), WorldMatrix);
|
||||
m_pRightLeg->Set_CenterTransform(vFootPos, vLegPos, false);
|
||||
|
||||
#ifdef _DEBUG
|
||||
{
|
||||
_vector vCenterWorldPos = (vFootPos + vLegPos) * 0.5f;
|
||||
_vector vRotQ = XMQuaternionIdentity();
|
||||
_vector vDir = XMVectorSetW(vLegPos - vFootPos, 0.f);
|
||||
_float vLength = XMVectorGetX(XMVector3Length(vDir));
|
||||
if (vLength > FLT_EPSILON5) {
|
||||
vDir = XMVector3Normalize(vDir);
|
||||
vRotQ = CMyTools::MakeQuaternionFromTo(XMVectorSet(0.f, 1.f, 0.f, 0.f), vDir);
|
||||
}
|
||||
XMStoreFloat4x4(&m_RightLegMatrix, XMMatrixRotationQuaternion(vRotQ) * XMMatrixTranslationFromVector(vCenterWorldPos));
|
||||
}
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
HRESULT CPlayerRobe::Render_Legs()
|
||||
{
|
||||
_float fHeight = 0.25f;
|
||||
|
||||
_matrix WorldMatrix = XMLoadFloat4x4(&m_LeftLegMatrix);
|
||||
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
|
||||
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0xff0000, 1.f);
|
||||
|
||||
m_pMainShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
_matrix WorldUp = XMMatrixTranslationFromVector(WorldMatrix.r[1] * fHeight);
|
||||
_matrix WorldDown = XMMatrixTranslationFromVector(WorldMatrix.r[1] * -fHeight);
|
||||
m_pSubShape->Draw(WorldUp * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
m_pSubShape->Draw(WorldDown * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
|
||||
WorldMatrix = XMLoadFloat4x4(&m_RightLegMatrix);
|
||||
|
||||
m_pMainShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
WorldUp = XMMatrixTranslationFromVector(WorldMatrix.r[1] * fHeight);
|
||||
WorldDown = XMMatrixTranslationFromVector(WorldMatrix.r[1] * -fHeight);
|
||||
m_pSubShape->Draw(WorldUp * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
m_pSubShape->Draw(WorldDown * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Render_BonePhysX()
|
||||
{
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f);
|
||||
_fmatrix OwnerMatrix = m_pParentTransformCom->Get_XMWorldMatrix();
|
||||
_cmatrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
|
||||
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
|
||||
ID3D11DepthStencilState* pPrevDSS = nullptr;
|
||||
UINT iPrevStencilRef = 0;
|
||||
m_pContext->OMGetDepthStencilState(&pPrevDSS, &iPrevStencilRef);
|
||||
|
||||
for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex)
|
||||
{
|
||||
_matrix WorldMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr(PLAYER_JOINT_BONE_NAMES[iBoneIndex])) * OwnerMatrix;
|
||||
|
||||
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
}
|
||||
_matrix MainAnchorMatrix = /*XMMatrixRotationZ(XM_PIDIV2) * */XMLoadFloat4x4(m_pSocketMatrix) * OwnerMatrix;
|
||||
m_pSubShape->Draw(MainAnchorMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
m_pRobeMainAnchor->Render([this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
Render_Legs();
|
||||
_vector vRouteColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f);
|
||||
//for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
|
||||
// if (nullptr != m_pRobeJointRoute[i]) {
|
||||
// m_pRobeJointRoute[i]->Render([this]() {
|
||||
// m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
m_pRobeJointAnchor[i]->Render([this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
}
|
||||
m_pContext->OMSetDepthStencilState(pPrevDSS, iPrevStencilRef);
|
||||
if (pPrevDSS != nullptr) {
|
||||
pPrevDSS->Release();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CPlayerRobe::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
_matrix socketWorld = /*XMMatrixRotationZ(XM_PIDIV2) * */XMLoadFloat4x4(m_pSocketMatrix) * m_pParentTransformCom->Get_XMWorldMatrix();
|
||||
_matrix xmAnchorMatricesWorld[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { };
|
||||
for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex) {
|
||||
xmAnchorMatricesWorld[iBoneIndex] = XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iBoneIndex]) * socketWorld;
|
||||
}
|
||||
|
||||
{ //
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftLeg, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ //
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightLeg, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ // RobeSocket
|
||||
{ // Fixed_MainAnchor
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeMainAnchor, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pRobeMainAnchor->Set_Kinematic(true);
|
||||
m_pRobeMainAnchor->Set_Transform(socketWorld, true);
|
||||
#ifdef _DEBUG
|
||||
m_pRobeMainAnchor->Set_Name("MainAnchor");
|
||||
#endif // _DEBUG
|
||||
}
|
||||
// SubAnchors
|
||||
for (_int i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeJointAnchor[i], &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pRobeJointAnchor[i]->Set_Transform(xmAnchorMatricesWorld[i], true);
|
||||
#ifdef _DEBUG
|
||||
m_pRobeJointAnchor[i]->Set_Name(PLAYER_JOINT_BONE_NAMES[i]);
|
||||
#endif // _DEBUG
|
||||
}
|
||||
}
|
||||
{ // RobeRoute
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc_Body = {};
|
||||
ROUTE_DESC Desc_Route = {};
|
||||
Desc_Body.bAutoOwnerTranslation = false;
|
||||
Desc_Body.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ROUTE);
|
||||
/*Origin_Linked_Routes*/
|
||||
{
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RUP);
|
||||
Desc_Route.iStartBoneIndex = -1;
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
|
||||
#ifdef _DEBUG
|
||||
m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes");
|
||||
#endif // _DEBUG
|
||||
{ // Joint
|
||||
PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
|
||||
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
|
||||
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
|
||||
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
}
|
||||
}
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_TUP);
|
||||
Desc_Route.iStartBoneIndex = -1;
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
|
||||
#ifdef _DEBUG
|
||||
m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes");
|
||||
#endif // _DEBUG
|
||||
{ // Joint
|
||||
PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
|
||||
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
|
||||
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
|
||||
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
}
|
||||
}
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LUP);
|
||||
Desc_Route.iStartBoneIndex = -1;
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true);
|
||||
#ifdef _DEBUG
|
||||
m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes");
|
||||
#endif // _DEBUG
|
||||
{ // Joint
|
||||
PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor();
|
||||
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
|
||||
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
|
||||
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*UP_TO_MIDDLE*/
|
||||
{
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RUP_TO_RMIDDLE);
|
||||
Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP);
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
|
||||
}
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TUP_TO_TMIDDLE);
|
||||
Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP);
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
|
||||
}
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LUP_TO_LMIDDLE);
|
||||
Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP);
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
|
||||
}
|
||||
}
|
||||
/*MIDDLE_TO_DOWN*/
|
||||
{
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_RR);
|
||||
Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWNRIGHT);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
|
||||
}
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_R);
|
||||
Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWN);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_R_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
|
||||
}
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TR);
|
||||
Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
|
||||
}
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TL);
|
||||
Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
|
||||
}
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_L);
|
||||
Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_L_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
|
||||
}
|
||||
{
|
||||
Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL);
|
||||
Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
|
||||
Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWNLEFT);
|
||||
Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START);
|
||||
Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1;
|
||||
Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld);
|
||||
}
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Initialize(void* pArg)
|
||||
{
|
||||
PlayerRobe_DESC* pDesc = static_cast<PlayerRobe_DESC*> (pArg);
|
||||
m_pSocketMatrix = pDesc->pSocketMatrix;
|
||||
m_pModelCom = pDesc->pModel;
|
||||
|
||||
m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot");
|
||||
m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg");
|
||||
m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot");
|
||||
m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg");
|
||||
|
||||
{
|
||||
ZeroMemory(&m_BoneInsertionDesc, sizeof(m_BoneInsertionDesc));
|
||||
m_BoneInsertionDesc.iMatrixCount = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END);
|
||||
m_BoneInsertionDesc.iStartOffset = m_pModelCom->Get_BoneIndex(PLAYER_JOINT_BONE_NAMES[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP)]);
|
||||
}
|
||||
Create_BoneCombinedMatrixSRV();
|
||||
|
||||
XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr()));
|
||||
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
m_RobeJointAnchorMatrices[i] = m_pModelCom->Get_BoneLocalMatrixPtr(PLAYER_JOINT_BONE_NAMES[i]);
|
||||
}
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i)
|
||||
{
|
||||
_uint iParentIndex = UINT_MAX;
|
||||
_bool bCopyPreTransform = false;
|
||||
|
||||
switch ((PLAYER_JOINT_BONE_ORDER)i)
|
||||
{
|
||||
case PLAYER_JOINT_BONE_ORDER::RIGHTUP:
|
||||
case PLAYER_JOINT_BONE_ORDER::TAILUP:
|
||||
case PLAYER_JOINT_BONE_ORDER::LEFTUP:
|
||||
bCopyPreTransform = true;
|
||||
break;
|
||||
|
||||
case PLAYER_JOINT_BONE_ORDER::RIGHT:
|
||||
iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP);
|
||||
break;
|
||||
case PLAYER_JOINT_BONE_ORDER::TAIL:
|
||||
iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP);
|
||||
break;
|
||||
case PLAYER_JOINT_BONE_ORDER::LEFT:
|
||||
iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP);
|
||||
break;
|
||||
case PLAYER_JOINT_BONE_ORDER::RIGHTDOWNRIGHT:
|
||||
case PLAYER_JOINT_BONE_ORDER::RIGHTDOWN:
|
||||
iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT);
|
||||
break;
|
||||
case PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN:
|
||||
case PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN:
|
||||
iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL);
|
||||
break;
|
||||
case PLAYER_JOINT_BONE_ORDER::LEFTDOWN:
|
||||
case PLAYER_JOINT_BONE_ORDER::LEFTDOWNLEFT:
|
||||
iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT);
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
if (true == bCopyPreTransform)
|
||||
{
|
||||
_matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) * XMLoadFloat4x4(&m_PreTransformMatrix);
|
||||
|
||||
XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix);
|
||||
continue;
|
||||
}
|
||||
|
||||
_matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i])
|
||||
* XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iParentIndex]);
|
||||
|
||||
XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix);
|
||||
}
|
||||
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 22, false, false));
|
||||
m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, 0.3f, 0.075f, 22, false));
|
||||
D3D11_DEPTH_STENCIL_DESC depthStencilDesc = {};
|
||||
depthStencilDesc.DepthEnable = FALSE;
|
||||
depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO;
|
||||
depthStencilDesc.DepthFunc = D3D11_COMPARISON_ALWAYS;
|
||||
depthStencilDesc.StencilEnable = FALSE;
|
||||
|
||||
HRESULT result = m_pDevice->CreateDepthStencilState(&depthStencilDesc, &m_pDepthStencilStateNone);
|
||||
if (FAILED(result)){
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CPlayerRobe* CPlayerRobe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CPlayerRobe* pInstance = new CPlayerRobe(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CPlayerRobe");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CPlayerRobe::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CPlayerRobe* pInstance = new CPlayerRobe(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CPlayerRobe");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CPlayerRobe::Free()
|
||||
{
|
||||
__super::Free();
|
||||
#ifdef _DEBUG
|
||||
SAFE_RELEASE(m_pDepthStencilStateNone);
|
||||
#endif // _DEBUG
|
||||
SAFE_RELEASE(m_pBoneCombinedMatrixSRV);
|
||||
SAFE_RELEASE(m_pBoneCombinedMatrixBuffer);
|
||||
SAFE_RELEASE(m_pRightLeg);
|
||||
SAFE_RELEASE(m_pLeftLeg);
|
||||
SAFE_RELEASE(m_pRobeMainAnchor);
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
|
||||
SAFE_RELEASE(m_pRobeJointRoute[i]);
|
||||
}
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
SAFE_RELEASE(m_pRobeJointAnchor[i]);
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CPlayerRobe::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -186,24 +186,6 @@ HRESULT CPlayer::InputBroom()
|
||||
|
||||
void CPlayer::Behavior_IdleEnter() {
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLE);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
if (SUCCEEDED(InputAim()))
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_AIM];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true,1.f,false);
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
}
|
||||
|
||||
m_bSprintToggle = false;
|
||||
m_bWalkToggle = false;
|
||||
|
||||
@@ -258,6 +240,23 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
else {
|
||||
if (SUCCEEDED(InputAim()))
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON)) {
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_AIM];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
@@ -1126,6 +1125,7 @@ void CPlayer::Behavior_CombatEnter()
|
||||
HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
|
||||
if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) {
|
||||
@@ -1183,7 +1183,8 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) {
|
||||
if (SUCCEEDED(InputMove()) && fRatio >= 0.3f &&
|
||||
iCurrAnimIndex != m_Animation[STATEANIM::ANCIENT_LIGHTNING].first) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
m_bLookAt = false;
|
||||
return E_FAIL;
|
||||
@@ -1426,7 +1427,7 @@ void CPlayer::Behavior_SpellEnter()
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL];
|
||||
fRatio = 0.2f;
|
||||
}
|
||||
else if (Degree <= 135.f)
|
||||
else if (Degree <= 85.f)
|
||||
{
|
||||
if (Cross < 0.f)
|
||||
{
|
||||
@@ -1577,7 +1578,8 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
|
||||
|
||||
Play_SpellHitAnim();
|
||||
|
||||
if (SUCCEEDED(InputMove()) && iIndex != m_Animation[STATEANIM::AVADA_KEDAVRA].first) {
|
||||
if (SUCCEEDED(InputMove()) &&
|
||||
iIndex != m_Animation[STATEANIM::AVADA_KEDAVRA].first) {
|
||||
if (fRatio >= 0.4f) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
@@ -1704,10 +1706,15 @@ HRESULT CPlayer::Behavior_ShieldExitCheck()
|
||||
_vector vCross = XMVector3Cross(vLook, vCameraLook);
|
||||
_float Cross = XMVectorGetY(vCross);
|
||||
|
||||
if (Degree <= 60.f)
|
||||
if (Degree <= 30.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::PARRY4];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
}
|
||||
else if (Degree <= 60.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::PARRY4];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bLookAt = true;
|
||||
},
|
||||
@@ -1718,22 +1725,26 @@ HRESULT CPlayer::Behavior_ShieldExitCheck()
|
||||
if (Cross < 0.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::PARRY2];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true,1.f,false);
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::PARRY3];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
}
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_bLookAt = true;
|
||||
},
|
||||
0.8f);
|
||||
0.11f);
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::PARRY_180];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::PARRY4];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
|
||||
}
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
|
||||
@@ -97,7 +97,6 @@ void CProtego::Late_Update(_float fTimeDelta)
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_Component<CCharacter_Controller>()->Get_Position());
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CProtego::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
@@ -129,14 +128,14 @@ HRESULT CProtego::Ready_Components(void* pArg)
|
||||
}
|
||||
|
||||
|
||||
//{ // DO
|
||||
// CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
// Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_PROTEGO);
|
||||
// if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_SHIELD"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
// m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor());
|
||||
//}
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_PROTEGO);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_SHIELD"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@ HRESULT CRanrok::Initialize(void* pArg)
|
||||
}
|
||||
else {
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(-44.704f, -2.860f, 16.071f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-44.704f, -2.860f, 16.071f, 1.f));
|
||||
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));
|
||||
}
|
||||
|
||||
Load_RanrokPos("../Bin/Resources/Data/RanrokPos/RanrokPos.xml");
|
||||
@@ -162,7 +162,9 @@ void CRanrok::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (true == m_bLookAt) {
|
||||
m_pTransformCom->LookAt_Horizontal_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f);
|
||||
|
||||
}
|
||||
m_pModelCom->Set_TargetPos((XMLoadFloat4(&m_vTargetPos)));
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
@@ -279,6 +281,12 @@ void CRanrok::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
case ENUM_CLASS(SKILL_TYPE::STUPEFY):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::STUPEFY);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -428,16 +436,23 @@ HRESULT CRanrok::Render_Nonblend()
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bDrawOutLine) {
|
||||
@@ -490,7 +505,82 @@ HRESULT CRanrok::Render_Blend()
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
Render_OutLine();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CRanrok::Render_OutLine()
|
||||
{
|
||||
m_bDrawOutLine = false;
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Compute_Depth();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineThickness", &m_fOutLineThickness, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineScale", &m_fOutLineScale, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLinePower", &m_fOutLinePower, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::OUTLINE_READ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -501,7 +591,6 @@ HRESULT CRanrok::Render_Blend()
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -523,7 +612,6 @@ void CRanrok::MoveTo(_float fTimeDelta)
|
||||
_vector vLook = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
|
||||
|
||||
_vector toTarget = Target - CurPos;
|
||||
_float fDist = XMVectorGetX(XMVector3Length(toTarget));
|
||||
|
||||
|
||||
@@ -85,7 +85,6 @@ void CRanrok_FireBall::Update(_float fTimeDelta)
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
_vector vEndPos = m_pFireBall->Get_WorldPostion();
|
||||
ON_COLLISION_INFO CollisionInfo = MonsterSweepTarget(vStartPos, vEndPos, 0.2f, true);
|
||||
|
||||
OnCollision(this, &CollisionInfo);
|
||||
}
|
||||
|
||||
@@ -134,7 +133,7 @@ HRESULT CRanrok_FireBall::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
XMStoreFloat4(&m_vStartPos, vStartPos);
|
||||
|
||||
/* 플레이어 위치 받기 */
|
||||
CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
|
||||
CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
|
||||
|
||||
if (pPlayer == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
@@ -32,7 +32,7 @@ void CRanrok::Behavior_IdleEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLE);
|
||||
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::HOVER_LOOP];
|
||||
|
||||
m_bLookAt = true;
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
@@ -49,12 +49,14 @@ HRESULT CRanrok::Behavior_IdleExitCheck()
|
||||
void CRanrok::Behavior_IdleExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::IDLE);
|
||||
m_bLookAt = false;
|
||||
}
|
||||
|
||||
void CRanrok::Behavior_IdleBreakEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLEBREAK);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
m_bLookAt = true;
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK2];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
@@ -71,6 +73,7 @@ HRESULT CRanrok::Behavior_IdleBreakExitCheck()
|
||||
void CRanrok::Behavior_IdleBreakExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::IDLEBREAK);
|
||||
m_bLookAt = false;
|
||||
}
|
||||
|
||||
void CRanrok::Behavior_MoveEnter()
|
||||
@@ -283,31 +286,29 @@ void CRanrok::Behavior_FlyExit()
|
||||
void CRanrok::Behavior_FireBreathEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_bLookAt = true;
|
||||
m_pFSM->Enable_State(FSMSTATE::FIREBREATH);
|
||||
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_WINDUP_A];
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() {
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)];
|
||||
m_bLookAt = false;
|
||||
}, 0.95f);
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)];
|
||||
m_pModelCom->Play_HeadBone(true);
|
||||
m_bLookAt = false; },
|
||||
0.95f);
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
|
||||
[&]() {
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_bLookAt = true;
|
||||
}, 0.95f);
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); },
|
||||
0.95f);
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
|
||||
[this]() {
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
|
||||
}, 0.1f);
|
||||
|
||||
}
|
||||
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
@@ -321,9 +322,25 @@ HRESULT CRanrok::Behavior_FireBreathExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
if (m_pModelCom->Get_PlayHeadBone())
|
||||
{
|
||||
m_fHeadAimWeight += fTimeDelta;
|
||||
if (m_fHeadAimWeight >= 1.f)
|
||||
{
|
||||
m_fHeadAimWeight = 1.f;
|
||||
}
|
||||
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
|
||||
}
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A].first)
|
||||
{
|
||||
m_fHeadAimWeight -= fTimeDelta * 2.f;
|
||||
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
|
||||
}
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pModelCom->Play_HeadBone(false);
|
||||
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
|
||||
@@ -341,11 +358,13 @@ HRESULT CRanrok::Behavior_FireBreathExitCheck(_float fTimeDelta)
|
||||
void CRanrok::Behavior_FireBreathExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::FIREBREATH);
|
||||
m_fHeadAimWeight = 0.f;
|
||||
}
|
||||
|
||||
void CRanrok::Behavior_FireSweepEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_bLookAt = true;
|
||||
m_pFSM->Enable_State(FSMSTATE::FIRESWEEP);
|
||||
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
|
||||
{
|
||||
@@ -355,15 +374,15 @@ void CRanrok::Behavior_FireSweepEnter()
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)];
|
||||
m_bLookAt = false;
|
||||
}, 0.95f);
|
||||
m_pModelCom->Play_HeadBone(true);
|
||||
m_bLookAt = false; },
|
||||
0.95f);
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_COOLDOWN_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_bLookAt = true;
|
||||
},
|
||||
0.94f);
|
||||
0.95f);
|
||||
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first,
|
||||
@@ -389,8 +408,25 @@ HRESULT CRanrok::Behavior_FireSweepExitCheck(_float fTimeDelta)
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_pModelCom->Get_PlayHeadBone())
|
||||
{
|
||||
m_fHeadAimWeight += fTimeDelta;
|
||||
if (m_fHeadAimWeight >= 1.f)
|
||||
{
|
||||
m_fHeadAimWeight = 1.f;
|
||||
}
|
||||
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
|
||||
}
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::FIRESWEEP_COOLDOWN_A].first)
|
||||
{
|
||||
m_fHeadAimWeight -= fTimeDelta * 2.f;
|
||||
m_pModelCom->Set_HeadAimWeight(m_fHeadAimWeight);
|
||||
}
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pModelCom->Play_HeadBone(false);
|
||||
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_AIR))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
|
||||
@@ -408,6 +444,7 @@ HRESULT CRanrok::Behavior_FireSweepExitCheck(_float fTimeDelta)
|
||||
void CRanrok::Behavior_FireSweepExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::FIRESWEEP);
|
||||
m_fHeadAimWeight = 0.f;
|
||||
}
|
||||
|
||||
void CRanrok::Behavior_FireBallEnter()
|
||||
@@ -465,9 +502,6 @@ void CRanrok::Behavior_FireBallEnter()
|
||||
}, 0.45f);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)];
|
||||
@@ -620,9 +654,9 @@ void CRanrok::Behavior_PulseEnter()
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
/*Add_Event(pairAnimInfo.first,
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { CameraShake(10.f, 2.f, 5.f, 1.2f); },
|
||||
0.39f);*/
|
||||
0.39f);
|
||||
}
|
||||
|
||||
HRESULT CRanrok::Behavior_PulseExitCheck(_float fTimeDelta)
|
||||
|
||||
@@ -57,7 +57,7 @@ void CSkill_Data::Update_Damage(_float Damage)
|
||||
{
|
||||
for (_int i = 0; i < m_iSpell_Count; ++i)
|
||||
{
|
||||
m_fSpell_Damage[i] = SpellInfo->fSpell_Damage + Damage;
|
||||
m_fSpell_Damage[i] = SpellInfo[i].fSpell_Damage + Damage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Dash.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Dash::CState_Dash()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Dash::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Dash::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Dash::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Dash::Initialize(STATE_DASH_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Dash* CState_Dash::Create(STATE_DASH_DESC* pDesc)
|
||||
{
|
||||
CState_Dash* pInstance = new CState_Dash;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Dash::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Dash::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Slash.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Slash::CState_Slash()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Slash::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Slash::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Slash::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Slash::Initialize(STATE_SLASH_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Slash* CState_Slash::Create(STATE_SLASH_DESC* pDesc)
|
||||
{
|
||||
CState_Slash* pInstance = new CState_Slash;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Slash::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Slash::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -216,7 +216,7 @@ void CTransformation::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
|
||||
//m_pCharacter_Controller->Move(fTimeDelta);
|
||||
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pCCT->Get_Actor()->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pCCT->Get_Actor()->userData);
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::CCTActor:
|
||||
|
||||
@@ -197,16 +197,24 @@ HRESULT CTroll::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
@@ -252,6 +260,15 @@ HRESULT CTroll::Render_OutLine()
|
||||
else if (m_fOutLineThickness < 2.f) {
|
||||
m_fOutLineThickness = 2.f;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -388,6 +405,12 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
case ENUM_CLASS(SKILL_TYPE::STUPEFY):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::STUPEFY);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA);
|
||||
break;
|
||||
case ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC):
|
||||
m_eHitSpell = ENUM_CLASS(SKILL_TYPE::ANCIENT_MAGIC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -122,7 +122,7 @@ void CTroll_Rock::RockHit()
|
||||
memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
|
||||
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
|
||||
tagCollInfo.fLength = fLength;
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
tagCollInfo.eHitType = ENUM_CLASS(HIT_TYPE::HIT_HEAVY);
|
||||
tagCollInfo.fDamage = 10.f;
|
||||
|
||||
@@ -883,7 +883,7 @@ void CTroll::SwingHit(_bool& bPlayerHit)
|
||||
for (_uint i = 0; i < pxHits.size(); ++i) {
|
||||
PSX::PxActor* pxHitActor = pxHits[i].actor;
|
||||
if (nullptr != pxHitActor && nullptr != pxHitActor->userData) {
|
||||
PhsXUserData* pUserData = (PhsXUserData*)pxHitActor->userData;
|
||||
PHYSX_USERDATA* pUserData = (PHYSX_USERDATA*)pxHitActor->userData;
|
||||
ON_COLLISION_INFO tagCollInfo = {};
|
||||
|
||||
tagCollInfo.vWorldPos.w = 1.f;
|
||||
@@ -934,7 +934,7 @@ void CTroll::SlamHit(_bool& bPlayerHit)
|
||||
for (_uint i = 0; i < pxHits.size(); ++i) {
|
||||
PSX::PxActor* pxHitActor = pxHits[i].actor;
|
||||
if (nullptr != pxHitActor && nullptr != pxHitActor->userData) {
|
||||
PhsXUserData* pUserData = (PhsXUserData*)pxHitActor->userData;
|
||||
PHYSX_USERDATA* pUserData = (PHYSX_USERDATA*)pxHitActor->userData;
|
||||
|
||||
ON_COLLISION_INFO tagCollInfo = {};
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Camera.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CCamera_Model final : public CCamera
|
||||
{
|
||||
public:
|
||||
typedef struct tagCamera_Model : public CCamera::CAMERA_DESC
|
||||
{
|
||||
_float3 vEye{}, vAt{};
|
||||
_float fMouseSensor{};
|
||||
}CAMERA_MODEL_DESC;
|
||||
private:
|
||||
CCamera_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CCamera_Model(const CCamera_Model& rhs);
|
||||
virtual ~CCamera_Model() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
class CModel* m_pModelCom = { nullptr };
|
||||
class CShader* m_pShaderCom = { nullptr };
|
||||
_bool m_bMovable = true;
|
||||
_float4x4 m_matInitial = {};
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
void Set_InitialPos();
|
||||
|
||||
public:
|
||||
static CCamera_Model* 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
|
||||
@@ -25,7 +25,7 @@ namespace Client
|
||||
|
||||
enum class SHADER_PASS_NPC_PBR_ANIM {
|
||||
EYELASH_DAOTHV_ToSRO, TEETH_SRXO_ToSRO, EYE_DN_ToSRO, EYE_OCC, FACIAL_HAIR_DAOTHV_ToSRO, HEAD_HAIR_DAOTHV_ToSRO, HEADwtHAND_DSRXON_ToSRO, LOWER_DSRON_ToSRO, UPPER_DMRON_ToMRO, GLASSES_DMRON_ToMRO, EmissiveMetalness_DENMRO_ToMRO, MI_ClothSim_DSEN_ToSRO, MI_Troll_Club_DAENMROSRXO_To
|
||||
, OUTLINE_READ, TEETH_SRXO_ToSRO__OUTLINE_WRITE, EYE_DN_ToSRO__OUTLINE_WRITE, HEADwtHAND_DSRXON_ToSRO__OUTLINE_WRITE, UPPER_DMRON_ToMRO__OUTLINE_WRITE, EmissiveMetalness_DENMRO_ToMRO__OUTLINE_WRITE, MI_ClothSim_DSEN_ToSRO__OUTLINE_WRITE
|
||||
, OUTLINE_READ
|
||||
, END
|
||||
};
|
||||
enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN, END };
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Client {
|
||||
#define CAMERA_DEBUG TEXT("CAMERA_DEBUG")
|
||||
#define CAMERA_SHOULDER TEXT("CAMERA_SHOULDER")
|
||||
#define CAMERA_AI TEXT("CAMERA_AI")
|
||||
#define CAMERA_MODEL TEXT("CAMERA_MODEL")
|
||||
#pragma endregion
|
||||
#pragma region COMPONENT
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CDummy_PhysXPlayable final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagPhysXDummyDesc
|
||||
{
|
||||
_float3 vPos = { };
|
||||
_float3 vRotRPY = { };
|
||||
_uint iSubKind = { };
|
||||
}PHYSXDUMMY_DESC;
|
||||
private:
|
||||
CDummy_PhysXPlayable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummy_PhysXPlayable(const CDummy_PhysXPlayable& rhs);
|
||||
virtual ~CDummy_PhysXPlayable() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
CCallBack_Playable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
CCallBack_Playable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
public:
|
||||
static CDummy_PhysXPlayable* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -1,51 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CDummy_PhysXWall final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagPhysXDummyDesc
|
||||
{
|
||||
_float3 vPos = { };
|
||||
_float3 vRotRPY = { };
|
||||
_uint iSubKind = { };
|
||||
}PHYSXDUMMY_DESC;
|
||||
private:
|
||||
CDummy_PhysXWall(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummy_PhysXWall(const CDummy_PhysXWall& rhs);
|
||||
virtual ~CDummy_PhysXWall() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
const PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
public:
|
||||
static CDummy_PhysXWall* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,138 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Monster.h"
|
||||
#include "CallBack_Monster_Behavior.h"
|
||||
#include "CallBack_Monster_HitReport.h"
|
||||
#include "Enemy_Detection.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CGoblin_Assassin final : public CMonster
|
||||
{
|
||||
enum class GOBLIN_ASSASSIN_SKILL
|
||||
{
|
||||
SLASH,
|
||||
DASH,
|
||||
TP,
|
||||
END
|
||||
};
|
||||
private:
|
||||
CGoblin_Assassin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CGoblin_Assassin(const CGoblin_Assassin& Prototype);
|
||||
virtual ~CGoblin_Assassin() = 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 HRESULT Render_OutLine();
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
virtual _vector Get_LockOnPos() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||
|
||||
void Set_Detection(_bool bDetection);
|
||||
private:
|
||||
CCallBack_Monster_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
CCallBack_Monster_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CEnemy_Detection* m_pDetection = { nullptr };
|
||||
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
_float2 m_vStunTimer = { 0.f, 4.f };
|
||||
_uint iIndex;
|
||||
private:
|
||||
class CEffectPool* m_pEffectPool = nullptr;
|
||||
DAMAGE_INFO m_DamageInfo;
|
||||
|
||||
_bool m_bDetection = { false };
|
||||
|
||||
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle2 = { nullptr };
|
||||
class CGoblin_Assassin_Spector* m_pGoblinSpector = { nullptr };
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Ready_Parts();
|
||||
HRESULT Bind_ShaderResources();
|
||||
void HitState_Behavior(_float fTimeDelta);
|
||||
|
||||
public:
|
||||
static CGoblin_Assassin* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
private:
|
||||
virtual void Add_FSM();
|
||||
virtual void Set_Anim();
|
||||
|
||||
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::END)] = {};
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::END)] = { 5.f,2.f,15.f };
|
||||
|
||||
_bool m_bStep = { true };
|
||||
_float m_fTpTime = {};
|
||||
_float m_fAirTime = {};
|
||||
_vector m_vOriginPos = {};
|
||||
_float m_fLength = {};
|
||||
_float m_fMoveTime = {};
|
||||
_bool m_bFirstMove = {};
|
||||
_bool m_bPos = {};
|
||||
_float m_fAccel = { 3.f};
|
||||
_float m_fTargetSpeed = {60.f};
|
||||
_float m_fSpeed = {};
|
||||
_bool m_bAir = {};
|
||||
_float m_fGravityAmount = {};
|
||||
_float m_fHitTimer = {};
|
||||
_float m_fTumbleTimer = {};
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck();
|
||||
void Behavior_IdleExit();
|
||||
|
||||
void Behavior_IdleBreakEnter();
|
||||
HRESULT Behavior_IdleBreakExitCheck();
|
||||
void Behavior_IdleBreakExit();
|
||||
|
||||
void Behavior_MoveEnter();
|
||||
HRESULT Behavior_MoveExitCheck(_float fTimeDelta);
|
||||
void Behavior_MoveExit();
|
||||
|
||||
void Behavior_CombatEnter();
|
||||
HRESULT Behavior_CombatExitCheck(_float fTimeDelta);
|
||||
void Behavior_CombatExit();
|
||||
|
||||
void Behavior_SlashEnter();
|
||||
HRESULT Behavior_SlashExitCheck(_float fTimeDelta);
|
||||
void Behavior_SlashExit();
|
||||
|
||||
void Behavior_DashEnter();
|
||||
HRESULT Behavior_DashExitCheck(_float fTimeDelta);
|
||||
void Behavior_DashExit();
|
||||
|
||||
void Behavior_BlinkEnter();
|
||||
HRESULT Behavior_BlinkExitCheck(_float fTimeDelta);
|
||||
void Behavior_BlinkExit();
|
||||
|
||||
void Behavior_ShuffleEnter();
|
||||
HRESULT Behavior_ShuffleExitCheck(_float fTimeDelta);
|
||||
void Behavior_ShuffleExit();
|
||||
|
||||
void Behavior_HitEnter();
|
||||
HRESULT Behavior_HitExitCheck(_float fTimeDelta);
|
||||
void Behavior_HitExit();
|
||||
|
||||
void Behavior_DeadEnter();
|
||||
HRESULT Behavior_DeadExitCheck(_float fTimeDelta);
|
||||
void Behavior_DeadExit();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,79 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Monster.h"
|
||||
#include "CallBack_Monster_Behavior.h"
|
||||
#include "CallBack_Monster_HitReport.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTransform;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CGoblin_Assassin_Spector final : public CMonster
|
||||
{
|
||||
public:
|
||||
typedef struct tagSpector
|
||||
{
|
||||
CTransform* pParentTransform = { nullptr };
|
||||
}GOBLIN_SPECTOR_DESC;
|
||||
private:
|
||||
CGoblin_Assassin_Spector(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CGoblin_Assassin_Spector(const CGoblin_Assassin_Spector& Prototype);
|
||||
virtual ~CGoblin_Assassin_Spector() = 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 OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||
|
||||
public:
|
||||
void Spector_Trail_Visible(_bool isTrailVisible);
|
||||
void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; }
|
||||
|
||||
|
||||
private:
|
||||
class CGoblin_Assassin* m_pGoblin = { nullptr };
|
||||
CTransform* m_pParentTransformCom = { nullptr };
|
||||
_uint iIndex;
|
||||
_float3 m_Offset = {};
|
||||
_float3 m_vOriginScale = {};
|
||||
_float3 m_vScale = { 1.f, 1.f, 1.f };
|
||||
|
||||
|
||||
class CTrailObject* m_pLeft_Trail = { nullptr };
|
||||
class CTrailObject* m_pRight_Trail = { nullptr };
|
||||
|
||||
const _float4x4* m_pLeftHand_BoneMat = { nullptr };
|
||||
const _float4x4* m_pRightHand_BoneMat = { nullptr };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Ready_Parts();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CGoblin_Assassin_Spector* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
_bool m_bStep = { false };
|
||||
_float m_fTpTime = {};
|
||||
_float m_fAirTime = {};
|
||||
_vector m_vOriginPos = {};
|
||||
_float m_fLength = {};
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -34,6 +34,7 @@ class CGoblin_Attack final : public CEffect_Container
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CEffectParts* m_pPT1 = { nullptr };
|
||||
class CEffectParts* m_pPT2 = { nullptr };
|
||||
_float4x4 m_vMat = {};
|
||||
public:
|
||||
static CGoblin_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -24,7 +24,7 @@ class CGoblin_BattleAxe final : public CPartObject
|
||||
virtual HRESULT Render() override;
|
||||
HRESULT Render_Disolve();
|
||||
void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; }
|
||||
const _float4x4 Get_AxeMatrix() { return m_vAxeMat; };
|
||||
const _float4x4& Get_AxeMatrix() { return m_vAxeMat; };
|
||||
|
||||
private:
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
|
||||
@@ -32,7 +32,7 @@ class CGoblin_Protego final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
class CEffectParts* m_pSphere = { nullptr };
|
||||
class CEffectParts* m_pBottom = { nullptr };
|
||||
class CEffectParts* m_pCircle = { nullptr };
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "PartObject.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CGoblin_Sword final : public CPartObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagSword : public CPartObject::PARTOBJECT_DESC
|
||||
{
|
||||
const _float4x4* pSocketMatrices = { };
|
||||
_int iIndex = {};
|
||||
}GOBLIN_SWORD_DESC;
|
||||
private:
|
||||
CGoblin_Sword(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CGoblin_Sword(const CGoblin_Sword& Prototype);
|
||||
virtual ~CGoblin_Sword() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
HRESULT Render_Disolve();
|
||||
void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; }
|
||||
void Set_CanTakeDamage(_bool bCanTake) { m_bCanTakeDamage = bCanTake; }
|
||||
const _float4x4& Get_SwordMatrix() { return m_vSwordMat; };
|
||||
public:
|
||||
|
||||
private:
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_int m_iIndex = {};
|
||||
_wstring m_strModelPrototypeTag;
|
||||
_bool m_bCanTakeDamage = { false };
|
||||
_bool m_bHit = { false };
|
||||
_bool m_bDisolve = { false };
|
||||
_float m_fDisolveTime = { 0.f };
|
||||
_float4x4 m_vSwordMat = {};
|
||||
|
||||
_float4 m_vStartPos = {};
|
||||
PSX::PxSweepBufferN<12> m_SweepBuffer = {};
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
void Sword_Hit();
|
||||
|
||||
public:
|
||||
static CGoblin_Sword* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override;
|
||||
virtual void Free() override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -15,6 +15,7 @@ class CLevel_Field final : public CLevel
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
_bool m_isDay = { true };
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
|
||||
@@ -19,10 +19,13 @@ class CLevel_GamePlay final : public CLevel
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
class CBroomRaceManager* m_pBroomRaceManager = { nullptr };
|
||||
|
||||
_bool m_isDay = { true };
|
||||
private:
|
||||
virtual HRESULT Initialize() override;
|
||||
HRESULT Initialize(void* pArg);
|
||||
HRESULT Ready_Lights();
|
||||
HRESULT Ready_Volumetric();
|
||||
HRESULT Ready_Background();
|
||||
HRESULT Ready_Layer_Hogsmeade();
|
||||
HRESULT Ready_Layer_Hogwart();
|
||||
|
||||
@@ -20,13 +20,13 @@ class CLight_Main final : public CGameObject
|
||||
virtual HRESULT Capture_PreShadow();
|
||||
|
||||
private:
|
||||
CLight* m_pLightCom = { nullptr };
|
||||
CLight* m_pLightCom = { nullptr };
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Ready_Components(void* pArg);
|
||||
HRESULT Bind_ShaderResources();
|
||||
_matrix Get_OffCenterProjMatrix(_fmatrix ViewMatrix, vector<_float3>& WorldPositions);
|
||||
|
||||
|
||||
@@ -2,30 +2,12 @@
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Unit.h"
|
||||
#include "Player_ENUM.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CPlayer final : public CUnit
|
||||
{
|
||||
enum class PLAYER_MESH_ORDER {
|
||||
HEAD_EYE_OCC,
|
||||
HEAD_FACE,
|
||||
HEAD_TEETH,
|
||||
HEAD_EYELASH,
|
||||
HEAD_EYES,
|
||||
BODY_ARMS,
|
||||
HAIR_MAIN,
|
||||
HAIR_MAIN_CLOTH,
|
||||
LOWER,
|
||||
SHOES,
|
||||
UPPER,
|
||||
HAIR_SUB,
|
||||
HAIR_SUB_CLOTH,
|
||||
ROBE_SKIRT,
|
||||
ROBE_FUR,
|
||||
ROBE_CLOTH,
|
||||
END
|
||||
};
|
||||
public:
|
||||
typedef struct tagPlayerInitDesc {
|
||||
_float4 vPos;
|
||||
@@ -92,6 +74,8 @@ class CPlayer final : public CUnit
|
||||
class CTransform* m_pBroomTransform = { nullptr };
|
||||
class CBroom* m_pBroom = { nullptr };
|
||||
CStat* m_pStat = { nullptr };
|
||||
class CPlayerRobe* m_pRobePart = { nullptr };
|
||||
|
||||
|
||||
class CBroomRaceManager* m_pBroomRaceManager = { nullptr };
|
||||
class CRaceRing* m_pRaceRing = { nullptr };
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "PartObject.h"
|
||||
#include "Player_ENUM.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CPlayerRobe final : public CPartObject
|
||||
{
|
||||
typedef struct tagRouteCreater {
|
||||
_uint iTargetRouteIndex = UINT_MAX; // 만들려는 루트
|
||||
_uint iStartBoneIndex = UINT_MAX; // 시작 앵커
|
||||
_uint iEndBoneIndex = UINT_MAX; // 끝 앵커
|
||||
_uint iStartJointIndex = UINT_MAX; // 시작 앵커가 할당받을 인덱스
|
||||
_uint iEndJointIndex = UINT_MAX; // 끝 앵커가 할당받을 인덱스
|
||||
}ROUTE_DESC;
|
||||
|
||||
public:
|
||||
typedef struct tagPlayerRobe : public CPartObject::PARTOBJECT_DESC
|
||||
{
|
||||
const _float4x4* pSocketMatrix = { };
|
||||
CModel* pModel = { nullptr };
|
||||
}PlayerRobe_DESC;
|
||||
private:
|
||||
CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CPlayerRobe(const CPlayerRobe& Prototype);
|
||||
virtual ~CPlayerRobe() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
private:
|
||||
_float4x4 m_PreTransformMatrix = { };
|
||||
const _float4x4* m_pSocketMatrix = { nullptr };
|
||||
const _float4x4* m_pLeftFootLocalMatrix = { nullptr };
|
||||
const _float4x4* m_pLeftLegLocalMatrix = { nullptr };
|
||||
const _float4x4* m_pRightFootLocalMatrix = { nullptr };
|
||||
const _float4x4* m_pRightLegLocalMatrix = { nullptr };
|
||||
const _float4x4* m_RobeJointAnchorMatrices[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
|
||||
_float4x4 m_ReconstructedJointAnchorMatirces[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { };
|
||||
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRightLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLeftLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeMainAnchor = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeJointRoute[ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END)] = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeJointAnchor[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
|
||||
PSX::PxD6Joint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr };
|
||||
|
||||
ID3D11Buffer* m_pBoneCombinedMatrixBuffer = { nullptr };
|
||||
ID3D11ShaderResourceView* m_pBoneCombinedMatrixSRV = { nullptr };
|
||||
|
||||
CModel::BONEINSERTION_DESC m_BoneInsertionDesc = {};
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<GeometricPrimitive> m_pMainShape = { nullptr };
|
||||
unique_ptr<GeometricPrimitive> m_pSubShape = { nullptr };
|
||||
ID3D11DepthStencilState* m_pDepthStencilStateNone = { nullptr };
|
||||
_float4x4 m_LeftLegMatrix = {};
|
||||
_float4x4 m_RightLegMatrix = {};
|
||||
#endif // _DEBUG
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources() { return S_OK; }
|
||||
|
||||
HRESULT Update_LegsPosition();
|
||||
HRESULT Update_RobeSocketPosition();
|
||||
HRESULT Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld);
|
||||
HRESULT Create_BoneCombinedMatrixSRV();
|
||||
#ifdef _DEBUG
|
||||
HRESULT Render_BonePhysX();
|
||||
HRESULT Render_Legs();
|
||||
#endif // _DEBUG
|
||||
public:
|
||||
static CPlayerRobe* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)override;
|
||||
virtual void Free() override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,125 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
enum class PLAYER_MESH_ORDER {
|
||||
HEAD_EYE_OCC,
|
||||
HEAD_FACE,
|
||||
HEAD_TEETH,
|
||||
HEAD_EYELASH,
|
||||
HEAD_EYES,
|
||||
BODY_ARMS,
|
||||
HAIR_MAIN,
|
||||
HAIR_MAIN_CLOTH,
|
||||
LOWER,
|
||||
SHOES,
|
||||
UPPER,
|
||||
HAIR_SUB,
|
||||
HAIR_SUB_CLOTH,
|
||||
ROBE_SKIRT,
|
||||
ROBE_FUR,
|
||||
ROBE_CLOTH,
|
||||
END
|
||||
};
|
||||
|
||||
static const _char* PLAYER_JOINT_BONE_NAMES[12] = {
|
||||
"RightUpLeg_Cloth"
|
||||
, "TailUp_Cloth"
|
||||
, "LeftUpLeg_Cloth"
|
||||
|
||||
, "RightLeg_Cloth"
|
||||
, "Tail_Cloth"
|
||||
, "LeftLeg_Cloth"
|
||||
|
||||
, "RightDownLeg_Cloth"
|
||||
, "RightDownRightLeg_Cloth"
|
||||
, "TailRightDown_Cloth"
|
||||
|
||||
, "TailLeftDown_Cloth"
|
||||
, "LeftDownLeftLeg_Cloth"
|
||||
, "LeftDownLeg_Cloth"
|
||||
};
|
||||
|
||||
enum class PLAYER_JOINT_BONE_ORDER {
|
||||
RIGHTUP
|
||||
, RIGHT
|
||||
, RIGHTDOWN
|
||||
, RIGHTDOWNRIGHT
|
||||
|
||||
, LEFTUP
|
||||
, LEFT
|
||||
, LEFTDOWN
|
||||
, LEFTDOWNLEFT
|
||||
|
||||
, TAILUP
|
||||
, TAIL
|
||||
, TAILLEFTDOWN
|
||||
, TAILRIGHTDOWN
|
||||
|
||||
, END
|
||||
};
|
||||
|
||||
enum class PLAYER_JOINT_ORDER {
|
||||
ORIGIN_TO_RUP_START
|
||||
, ORIGIN_TO_RUP_END
|
||||
|
||||
, ORIGIN_TO_TUP_START
|
||||
, ORIGIN_TO_TUP_END
|
||||
|
||||
, ORIGIN_TO_LUP_START
|
||||
, ORIGIN_TO_LUP_END
|
||||
|
||||
|
||||
, RUP_TO_RMIDDLE_START
|
||||
, RUP_TO_RMIDDLE_END
|
||||
|
||||
, TUP_TO_TMIDDLE_START
|
||||
, TUP_TO_TMIDDLE_END
|
||||
|
||||
, LUP_TO_LMIDDLE_START
|
||||
, LUP_TO_LMIDDLE_END
|
||||
|
||||
|
||||
, RMIDDLE_TO_RR_START
|
||||
, RMIDDLE_TO_RR_END
|
||||
|
||||
, RMIDDLE_TO_R_START
|
||||
, RMIDDLE_TO_R_END
|
||||
|
||||
, TMIDDLE_TO_TR_START
|
||||
, TMIDDLE_TO_TR_END
|
||||
|
||||
, TMIDDLE_TO_TL_START
|
||||
, TMIDDLE_TO_TL_END
|
||||
|
||||
, LMIDDLE_TO_L_START
|
||||
, LMIDDLE_TO_L_END
|
||||
|
||||
, LMIDDLE_TO_LL_START
|
||||
, LMIDDLE_TO_LL_END
|
||||
|
||||
|
||||
, END
|
||||
};
|
||||
|
||||
enum class PLAYER_JOINT_ROUTE_ORDER {
|
||||
ORIGIN_TO_RUP
|
||||
, ORIGIN_TO_TUP
|
||||
, ORIGIN_TO_LUP
|
||||
|
||||
, RUP_TO_RMIDDLE
|
||||
, TUP_TO_TMIDDLE
|
||||
, LUP_TO_LMIDDLE
|
||||
|
||||
, RMIDDLE_TO_RR
|
||||
, RMIDDLE_TO_R
|
||||
, TMIDDLE_TO_TR
|
||||
, TMIDDLE_TO_TL
|
||||
, LMIDDLE_TO_L
|
||||
, LMIDDLE_TO_LL
|
||||
, END
|
||||
};
|
||||
|
||||
|
||||
NS_END
|
||||
@@ -48,6 +48,7 @@ class CRanrok final : public CMonster
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_OutLine() override;
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
virtual _vector Get_LockOnPos() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||
@@ -93,7 +94,7 @@ 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 ,15.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 };
|
||||
@@ -112,6 +113,7 @@ class CRanrok final : public CMonster
|
||||
_float m_fAroundRadius = 40.f;
|
||||
_float m_fAroundTime = {};
|
||||
_float m_fRushTime = {};
|
||||
_float m_fHeadAimWeight = {};
|
||||
|
||||
class CEffect_Container* m_pRanrok_Point = { nullptr };
|
||||
_float m_fTuckedSpeed = { 75.f };
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Dash final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagDash : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_DASH_DESC;
|
||||
private:
|
||||
CState_Dash();
|
||||
virtual ~CState_Dash() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_DASH_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Dash* Create(STATE_DASH_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Slash final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagSlash : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_SLASH_DESC;
|
||||
private:
|
||||
CState_Slash();
|
||||
virtual ~CState_Slash() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_SLASH_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Slash* Create(STATE_SLASH_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
Reference in New Issue
Block a user