[add] Client_States
This commit is contained in:
@@ -23,9 +23,11 @@ float g_fOwnerAlpha;
|
||||
float g_fCanvasAlpha;
|
||||
float g_fAngle;
|
||||
float g_fCoolTime;
|
||||
float g_fHp;
|
||||
|
||||
float2 g_fOrigin_Size;
|
||||
float2 g_fCurrent_Size;
|
||||
float2 g_fHpBG;
|
||||
|
||||
float4 g_fNine_Slice;
|
||||
|
||||
@@ -461,7 +463,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
|
||||
}
|
||||
}
|
||||
|
||||
if (uv.y <= CoolTime)
|
||||
if (uv.y <= CoolTime)
|
||||
{
|
||||
color.a = 0.f;
|
||||
}
|
||||
@@ -472,6 +474,79 @@ PS_OUT PS_SpellAnim(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_HpBar(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 CurrentPixelPosition = uv * g_fCurrent_Size;
|
||||
float OriginLeft = g_fNine_Slice.x;
|
||||
float OriginRight = g_fNine_Slice.y;
|
||||
float OriginTop = g_fNine_Slice.z;
|
||||
float OriginBottom = g_fNine_Slice.w;
|
||||
|
||||
float CurrentLeft = OriginLeft;
|
||||
float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight);
|
||||
float CurrentTop = OriginTop;
|
||||
float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom);
|
||||
|
||||
float2 Finaluv = In.vTexcoord;
|
||||
|
||||
if (CurrentPixelPosition.x < CurrentLeft)
|
||||
{
|
||||
Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x;
|
||||
}
|
||||
else if (CurrentPixelPosition.x > CurrentRight)
|
||||
{
|
||||
float dist = CurrentPixelPosition.x - CurrentRight;
|
||||
Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft);
|
||||
Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x);
|
||||
}
|
||||
|
||||
if (CurrentPixelPosition.y < CurrentTop)
|
||||
{
|
||||
Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y;
|
||||
}
|
||||
else if (CurrentPixelPosition.y > CurrentBottom)
|
||||
{
|
||||
float dist = CurrentPixelPosition.y - CurrentBottom;
|
||||
Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop);
|
||||
Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y);
|
||||
}
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv);
|
||||
Color = tex1;
|
||||
|
||||
float2 reversuv = In.vTexcoord;
|
||||
|
||||
reversuv.x = 1.0f - Finaluv;
|
||||
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, Finaluv);
|
||||
|
||||
if (reversuv.x >= g_fHp)
|
||||
{
|
||||
tex2.rgb = float3(0.f, 0.f, 0.f);
|
||||
}
|
||||
|
||||
tex2.rgb *= float3(112.f, 241.f, 31.f) / 255.f;
|
||||
|
||||
if (all(Color.rgb >= float3(70.f / 255.f, 70.f / 255.f, 70.f / 255.f)))
|
||||
Color = tex2;
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -603,4 +678,13 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_SpellAnim();
|
||||
}
|
||||
pass HpBar
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_HpBar();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ HWND g_hWnd;
|
||||
WCHAR szTitle[MAX_LOADSTRING];
|
||||
WCHAR szWindowClass[MAX_LOADSTRING];
|
||||
|
||||
// 이 코드 모듈에 포함된 함수의 선언을 전달합니다:
|
||||
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
@@ -172,10 +172,6 @@
|
||||
<ClInclude Include="..\Public\Client_Define.h" />
|
||||
<ClInclude Include="..\Public\Client_Enum.h" />
|
||||
<ClInclude Include="..\Public\Client_Macro.h" />
|
||||
<ClInclude Include="..\Public\Client_Struct.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_PhysXPlayable.h" />
|
||||
<ClInclude Include="..\Public\Dummy_PhysXWall.h" />
|
||||
<ClInclude Include="..\Public\SkyBox.h" />
|
||||
@@ -192,6 +188,13 @@
|
||||
<ClInclude Include="..\Public\MonsterInfo.h" />
|
||||
<ClInclude Include="..\Public\Player.h" />
|
||||
<ClInclude Include="..\Public\PlayerInfo.h" />
|
||||
<ClInclude Include="..\Public\State_Player_Combat.h" />
|
||||
<ClInclude Include="..\Public\State_Player_Dodge.h" />
|
||||
<ClInclude Include="..\Public\State_Player_Idle.h" />
|
||||
<ClInclude Include="..\Public\State_Player_Jump.h" />
|
||||
<ClInclude Include="..\Public\State_Player_Land.h" />
|
||||
<ClInclude Include="..\Public\State_Player_Move.h" />
|
||||
<ClInclude Include="..\Public\State_Root.h" />
|
||||
<ClInclude Include="..\Public\Wand.h" />
|
||||
<ClInclude Include="Client.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
@@ -231,6 +234,13 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Player.cpp" />
|
||||
<ClCompile Include="..\Private\PlayerInfo.cpp" />
|
||||
<ClCompile Include="..\Private\State_Player_Combat.cpp" />
|
||||
<ClCompile Include="..\Private\State_Player_Dodge.cpp" />
|
||||
<ClCompile Include="..\Private\State_Player_Idle.cpp" />
|
||||
<ClCompile Include="..\Private\State_Player_Jump.cpp" />
|
||||
<ClCompile Include="..\Private\State_Player_Land.cpp" />
|
||||
<ClCompile Include="..\Private\State_Player_Move.cpp" />
|
||||
<ClCompile Include="..\Private\State_Root.cpp" />
|
||||
<ClCompile Include="..\Private\Wand.cpp" />
|
||||
<ClCompile Include="Client.cpp" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
<ClInclude Include="..\Public\Level_GamePlay.h">
|
||||
<Filter>01.Levels\02.GamePlay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Client_Struct.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\InfoInstance.h">
|
||||
<Filter>03.InfoInstance</Filter>
|
||||
</ClInclude>
|
||||
@@ -112,6 +109,27 @@
|
||||
<ClInclude Include="..\Public\CallBack_Monster_HitReport.h">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\HitReport</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Root.h">
|
||||
<Filter>04.Mechanic\State</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Player_Combat.h">
|
||||
<Filter>04.Mechanic\State\State_Combat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Player_Dodge.h">
|
||||
<Filter>04.Mechanic\State\Focus\Dodge</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Player_Jump.h">
|
||||
<Filter>04.Mechanic\State\Focus\Jump</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Player_Land.h">
|
||||
<Filter>04.Mechanic\State\Focus\Land</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Player_Idle.h">
|
||||
<Filter>04.Mechanic\State\Movement\Idle</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Player_Move.h">
|
||||
<Filter>04.Mechanic\State\Movement\Move</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -284,6 +302,30 @@
|
||||
<Filter Include="02.GameObjects\PhysX\CallBack\HitReport">
|
||||
<UniqueIdentifier>{dc05dfc9-22e5-4a2a-b016-c55b215c0c68}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Focus">
|
||||
<UniqueIdentifier>{0834c76d-83d8-4ef5-9d19-7277686d28c5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat">
|
||||
<UniqueIdentifier>{017fc692-bac0-4635-843c-02fb59009f5b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Movement">
|
||||
<UniqueIdentifier>{349939a0-8b9a-4a1a-8f0a-ca5014cd4e18}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Focus\Dodge">
|
||||
<UniqueIdentifier>{5fa1e5a9-acd8-499d-90ee-9cf17441b3a5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Focus\Jump">
|
||||
<UniqueIdentifier>{41d2e34e-5280-4b3c-961e-064484f1449d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Focus\Land">
|
||||
<UniqueIdentifier>{1034dd61-dd17-456a-990b-628c45f74b51}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Movement\Idle">
|
||||
<UniqueIdentifier>{2999d0c5-81e4-44d6-99b3-4801e6f84dd7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Movement\Move">
|
||||
<UniqueIdentifier>{0a3f9629-27d1-411c-806e-b550af8f1ca1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -379,6 +421,27 @@
|
||||
<ClCompile Include="..\Private\CallBack_Playable_HitReport.cpp">
|
||||
<Filter>02.GameObjects\PhysX\CallBack\HitReport</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Root.cpp">
|
||||
<Filter>04.Mechanic\State</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Player_Combat.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Player_Dodge.cpp">
|
||||
<Filter>04.Mechanic\State\Focus\Dodge</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Player_Jump.cpp">
|
||||
<Filter>04.Mechanic\State\Focus\Jump</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Player_Land.cpp">
|
||||
<Filter>04.Mechanic\State\Focus\Land</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Player_Idle.cpp">
|
||||
<Filter>04.Mechanic\State\Movement\Idle</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Player_Move.cpp">
|
||||
<Filter>04.Mechanic\State\Movement\Move</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc">
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#include "pch.h"
|
||||
#include "State_Player_Combat.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Combat::CState_Combat()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Combat::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Combat::Update(_float fTimeDelta)
|
||||
{
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Combat::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Combat::Initialize(STATE_COMBAT_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pOwner = pDesc->pOwner;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Combat* CState_Combat::Create(STATE_COMBAT_DESC* pDesc)
|
||||
{
|
||||
CState_Combat* pInstance = new CState_Combat;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Combat::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Combat::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Player_Dodge.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Dodge::CState_Dodge()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Dodge::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Dodge::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (FAILED(__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Dodge::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Dodge::Initialize(STATE_DODGE_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_Dodge* CState_Dodge::Create(STATE_DODGE_DESC* pDesc)
|
||||
{
|
||||
CState_Dodge* pInstance = new CState_Dodge;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Dodge::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Dodge::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
#include "pch.h"
|
||||
#include "State_Player_Idle.h"
|
||||
#include "Unit.h"
|
||||
|
||||
CState_Idle::CState_Idle()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Idle::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Idle::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_Idle::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Idle::Initialize(STATE_IDLE_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_Idle* CState_Idle::Create(STATE_IDLE_DESC* pDesc)
|
||||
{
|
||||
CState_Idle* pInstance = new CState_Idle;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Idle::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Idle::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
#include "pch.h"
|
||||
#include "State_Player_Jump.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Jump::CState_Jump()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Jump::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Jump::Update(_float fTimeDelta)
|
||||
{
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Jump::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Jump::Initialize(STATE_JUMP_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Jump* CState_Jump::Create(STATE_JUMP_DESC* pDesc)
|
||||
{
|
||||
CState_Jump* pInstance = new CState_Jump;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Jump::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Jump::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
#include "pch.h"
|
||||
#include "State_Player_Land.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Land::CState_Land()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Land::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Land::Update(_float fTimeDelta)
|
||||
{
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Land::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Land::Initialize(STATE_LAND_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Land* CState_Land::Create(STATE_LAND_DESC* pDesc)
|
||||
{
|
||||
CState_Land* pInstance = new CState_Land;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Land::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Land::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
#include "pch.h"
|
||||
#include "State_Player_Move.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Move::CState_Move()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Move::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Move::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_Move::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Move::Initialize(STATE_MOVE_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_Move* CState_Move::Create(STATE_MOVE_DESC* pDesc)
|
||||
{
|
||||
CState_Move* pInstance = new CState_Move;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Move::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Move::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
#include "pch.h"
|
||||
#include "State_Root.h"
|
||||
#include "Unit.h"
|
||||
|
||||
CState_Root::CState_Root()
|
||||
:CState()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Root::Enter()
|
||||
{
|
||||
if (nullptr != m_funcEnterEvent) {
|
||||
m_funcEnterEvent();
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CState_Root::Update(_float fTimeDelta)
|
||||
{
|
||||
HRESULT hr = { S_OK };
|
||||
if (nullptr != m_funcExitCheck) {
|
||||
hr = m_funcExitCheck(fTimeDelta);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
void CState_Root::Exit()
|
||||
{
|
||||
if (nullptr != m_funcExitEvent) {
|
||||
m_funcExitEvent();
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CState_Root::Initialize(STATE_ROOT_DESC* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcExitCheck = pArg->funcExitCheck;
|
||||
m_funcEnterEvent = pArg->funcEnterEvent;
|
||||
m_funcExitEvent = pArg->funcExitEvent;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Root::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Root::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTransform;
|
||||
NS_END
|
||||
NS_BEGIN(Client)
|
||||
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Combat final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagCombat : public CState_Root::STATE_ROOT_DESC {
|
||||
|
||||
}STATE_COMBAT_DESC;
|
||||
private:
|
||||
CState_Combat();
|
||||
virtual ~CState_Combat() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_COMBAT_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Combat* Create(STATE_COMBAT_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_Dodge final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagDodge : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_DODGE_DESC;
|
||||
public:
|
||||
CState_Dodge();
|
||||
virtual ~CState_Dodge() = 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_DODGE_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Dodge* Create(STATE_DODGE_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Idle final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagIdle : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_IDLE_DESC;
|
||||
public:
|
||||
CState_Idle();
|
||||
virtual ~CState_Idle() = 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_IDLE_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Idle* Create(STATE_IDLE_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Jump final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagJump : public CState_Root::STATE_ROOT_DESC {
|
||||
|
||||
}STATE_JUMP_DESC;
|
||||
private:
|
||||
CState_Jump();
|
||||
virtual ~CState_Jump() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_JUMP_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Jump* Create(STATE_JUMP_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Land final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagLand : public CState_Root::STATE_ROOT_DESC {
|
||||
|
||||
}STATE_LAND_DESC;
|
||||
private:
|
||||
CState_Land();
|
||||
virtual ~CState_Land() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_LAND_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Land* Create(STATE_LAND_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_Move final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagMove : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_MOVE_DESC;
|
||||
private:
|
||||
CState_Move();
|
||||
virtual ~CState_Move() = 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_MOVE_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Move* Create(STATE_MOVE_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Root abstract : public CState
|
||||
{
|
||||
protected:
|
||||
typedef struct tagStateRoot : public CState::STATEDESC {
|
||||
function<HRESULT(_float fTimedelta)> funcExitCheck = { nullptr };
|
||||
function<void()> funcEnterEvent = { nullptr };
|
||||
function<void()> funcExitEvent = { nullptr };
|
||||
}STATE_ROOT_DESC;
|
||||
|
||||
protected:
|
||||
CState_Root();
|
||||
virtual ~CState_Root() = default;
|
||||
|
||||
protected:
|
||||
virtual void Enter() override;
|
||||
virtual HRESULT Update(_float fTimeDelta) override;
|
||||
virtual void Exit() override;
|
||||
|
||||
protected:
|
||||
function<HRESULT(_float fTimedelta)> m_funcExitCheck = { nullptr };
|
||||
function<void()> m_funcEnterEvent = { nullptr };
|
||||
function<void()> m_funcExitEvent = { nullptr };
|
||||
|
||||
protected:
|
||||
HRESULT Initialize(STATE_ROOT_DESC* pArg);
|
||||
|
||||
protected:
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -153,7 +153,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
float fDiffuseAOStrength = lerp(0.3f, 1.f, fOcclusion);
|
||||
float fDiffuseAOStrength = lerp(1.3f, 2.f, fOcclusion);
|
||||
|
||||
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vToView, vToLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
float fDiffuseAOStrength = lerp(0.3f, 1.f, fOcclusion);
|
||||
float fDiffuseAOStrength = lerp(1.3f, 2.f, fOcclusion);
|
||||
|
||||
PBR_LIGHT_OUT PBR_Out = PBR_Lighting(vNormal, vToView, vToLight, vAlbedo, fMetallic, fRoughness, g_vLightDiffuse.rgb, fAttenuation, vF0);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
robocopy ".\Editor\Bin\Resources\ShaderFiles\" ".\Client\Bin\Resources\ShaderFiles\" /MIR /FFT /NDL /NFL /R:0 /W:0 /ETA
|
||||
robocopy ".\Editor\Bin\Resources\ShaderFiles" ".\Client\Bin\Resources\ShaderFiles" /MIR /FFT /NDL /NFL /R:0 /W:0 /ETA
|
||||
IF %ERRORLEVEL% LEQ 4 EXIT /B 0
|
||||
pause
|
||||
pause
|
||||
|
||||
Reference in New Issue
Block a user