Merge branch 'Develope' into Effect
This commit is contained in:
@@ -45,5 +45,9 @@
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
||||
|
||||
|
||||
# lfs
|
||||
*.fbx filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
*.png binary
|
||||
@@ -340,15 +340,27 @@ PS_OUT PS_QuestType(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_UVMult(PS_IN In)
|
||||
PS_OUT PS_Spell_Anim(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 Color = float4(1.f,1.f,1.f,1.f);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
color.a *= Alpha;
|
||||
Out.vColor = color;
|
||||
Color = tex1;
|
||||
|
||||
float2 texpos = g_fImageSipos1.xy / g_fCurrent_Size;
|
||||
float2 texsize = g_fImageSipos1.zw / g_fCurrent_Size;
|
||||
float2 texlocal = (In.vTexcoord - texpos) / texsize;
|
||||
bool inside = all(texlocal >= 0.0f && texlocal <= 1.0f);
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (inside)
|
||||
Color = lerp(Color, tex2, tex2.a);
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1085,6 +1097,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Spell_Header_Line(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
@@ -1147,6 +1160,39 @@ PS_OUT PS_Spell_Header_Line(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Spell_Drag(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 tex2Color = g_Texture3.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Color = tex1;
|
||||
tex2.rgb = tex2Color;
|
||||
|
||||
Color = lerp(Color, tex2, tex2.a);
|
||||
|
||||
float2 Imagetexpos1 = g_fImageUV.xy / g_fCurrent_Size;
|
||||
float2 Imagetexsize1 = g_fImageUV.zw / g_fCurrent_Size;
|
||||
float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1;
|
||||
bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f);
|
||||
float4 tex3 = g_Texture2.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (inside1)
|
||||
{
|
||||
Color = lerp(Color, tex3, tex3.a);
|
||||
}
|
||||
|
||||
Color.a *= Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -1229,14 +1275,14 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_QuestType();
|
||||
}
|
||||
|
||||
pass UVMult
|
||||
pass Spell_Anim
|
||||
{
|
||||
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_UVMult();
|
||||
PixelShader = compile ps_5_0 PS_Spell_Anim();
|
||||
}
|
||||
|
||||
pass NineSlice
|
||||
@@ -1377,4 +1423,14 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_Spell_Header_Line();
|
||||
}
|
||||
|
||||
pass Spell_Drag
|
||||
{
|
||||
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_Spell_Drag();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,18 +13,17 @@
|
||||
HRESULT CBroom::InputAction()
|
||||
{
|
||||
if (
|
||||
m_pGameInstance->Key_Down(DIK_SPACE)
|
||||
|| m_pGameInstance->Key_Down(DIK_LCONTROL)
|
||||
|| m_pGameInstance->Key_Down(DIK_E)
|
||||
|| m_pGameInstance->Key_Down(DIK_R)
|
||||
|| m_pGameInstance->Key_Down(DIK_Q)
|
||||
|| m_pGameInstance->Mouse_Up(DIM_LBUTTON)
|
||||
m_pGameInstance->Key_Pressing(DIK_SPACE)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_LCONTROL)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_E)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_R)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_Q)
|
||||
|| m_pGameInstance->Key_Down(DIK_LSHIFT)
|
||||
|| m_pGameInstance->Key_Down(DIK_C)
|
||||
|| m_pGameInstance->Key_Down(DIK_V)
|
||||
|| m_pGameInstance->Key_Down(DIK_Z)
|
||||
|| m_pGameInstance->Key_Down(DIK_G)
|
||||
|| m_pGameInstance->Key_Down(DIK_B)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_C)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_V)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_Z)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_G)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_B)
|
||||
)
|
||||
{
|
||||
return S_OK;
|
||||
@@ -62,10 +61,10 @@ HRESULT CBroom::InputSpell()
|
||||
m_pGameInstance->Key_Down(DIK_1)
|
||||
|| m_pGameInstance->Key_Down(DIK_2)
|
||||
|| m_pGameInstance->Key_Down(DIK_3)
|
||||
|| m_pGameInstance->Key_Down(DIK_4)
|
||||
)
|
||||
{
|
||||
return S_OK;
|
||||
|| m_pGameInstance->Key_Down(DIK_4)
|
||||
)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -92,6 +91,7 @@ void CBroom::Behavior_IdleEnter() {
|
||||
|
||||
HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
{
|
||||
_uint iCurrAnimIndex = m_Animation[STATEANIM::BROOM_MOUNT_B].first;
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
if (SUCCEEDED(InputAction())) {
|
||||
if (m_pGameInstance->Key_Down(DIK_B)) {
|
||||
@@ -101,10 +101,22 @@ HRESULT CBroom::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove()) && m_pFSM->IsEnable(FSMSTATE::MOUNT_B))
|
||||
if (SUCCEEDED(InputMove()) || SUCCEEDED(InputAction()))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
if (m_bRide)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT_B].first)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
@@ -117,61 +129,172 @@ void CBroom::Behavior_IdleExit()
|
||||
|
||||
void CBroom::Behavior_MoveEnter()
|
||||
{
|
||||
if (!m_bRide)
|
||||
return;
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_bool bFoward = m_pGameInstance->Key_Pressing(DIK_W);
|
||||
_bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
|
||||
_bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
|
||||
_bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
|
||||
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::JOG);
|
||||
if (SUCCEEDED(InputMove()))
|
||||
|
||||
if (SUCCEEDED(InputMove()) || SUCCEEDED(InputAction()))
|
||||
{
|
||||
if (bFoward)
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B];
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_LEFT_B];
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_RIGHT_B];
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_LCONTROL))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_DOWN_B];
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_SPACE))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_UP_B];
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_LSHIFT))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
}
|
||||
else if (bLeft)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
|
||||
}
|
||||
else if (bRight)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 0.5f, true);
|
||||
}
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (!m_bRide)
|
||||
return E_FAIL;
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_bool bFoward = m_pGameInstance->Key_Pressing(DIK_W);
|
||||
_bool bLeft = m_pGameInstance->Key_Pressing(DIK_A);
|
||||
_bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
|
||||
_bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
|
||||
_uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
_bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
|
||||
_bool bLft = m_pGameInstance->Key_Pressing(DIK_A);
|
||||
_bool bRht = m_pGameInstance->Key_Pressing(DIK_D);
|
||||
_bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL);
|
||||
_bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE);
|
||||
|
||||
if (SUCCEEDED(InputMove()))
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_LSHIFT))
|
||||
{
|
||||
if (bFoward)
|
||||
m_bHoverToggle = !m_bHoverToggle;
|
||||
}
|
||||
|
||||
if (m_bHoverToggle)
|
||||
{
|
||||
m_pModelCom->Set_BlendDuration(0.3f);
|
||||
if (bFwd)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_IDLE_B];
|
||||
|
||||
m_fTargetSpeed = m_fHoverMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
|
||||
}
|
||||
else if (bLft)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_LEFT_B];
|
||||
}
|
||||
else if (bRht)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_RIGHT_B];
|
||||
}
|
||||
else if (bDown)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_DOWN_B];
|
||||
m_fTargetSpeed = m_fTurnMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
m_pTransformCom->Go_LerpDown(m_fSpeed, fTimeDelta);
|
||||
}
|
||||
else if (bUp)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_UP_B];
|
||||
m_fTargetSpeed = m_fTurnMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
m_pTransformCom->Go_LerpUp(m_fSpeed, fTimeDelta);
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pModelCom->Set_BlendDuration(0.6f);
|
||||
if (bFwd)
|
||||
{
|
||||
m_fTargetSpeed = m_fFlyMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
m_pTransformCom->Go_Straight(fTimeDelta);
|
||||
Camera_InterpTurn(fTimeDelta);
|
||||
}
|
||||
else if (bLeft)
|
||||
else if (bLft)
|
||||
{
|
||||
m_fTargetSpeed = m_fTurnMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fTurnDecel;
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta*0.1f);
|
||||
}
|
||||
else if (bRight)
|
||||
else if (bRht)
|
||||
{
|
||||
m_fTargetSpeed = m_fTurnMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fTurnDecel;
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta* 0.1f);
|
||||
}
|
||||
else if (bDown)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
|
||||
m_fTargetSpeed = m_fTurnMaxSpeed;
|
||||
m_fTurnSpeed += (m_fTargetSpeed - m_fTurnSpeed) * fTimeDelta * m_fAccel;
|
||||
|
||||
m_pTransformCom->Go_LerpDown(m_fTurnSpeed, fTimeDelta);
|
||||
}
|
||||
else if (bUp)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
|
||||
m_fTargetSpeed = m_fTurnMaxSpeed;
|
||||
m_fTurnSpeed += (m_fTargetSpeed - m_fTurnSpeed) * fTimeDelta * m_fAccel;
|
||||
|
||||
m_pTransformCom->Go_LerpUp(m_fTurnSpeed, fTimeDelta);
|
||||
}
|
||||
else {
|
||||
m_fTargetSpeed = m_fFlyMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
}
|
||||
|
||||
m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true);
|
||||
}
|
||||
|
||||
if (m_bHoverToggle && !SUCCEEDED(InputMove()) && !SUCCEEDED(InputAction()))
|
||||
{
|
||||
m_fTargetSpeed = 0.f;
|
||||
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fDecel;
|
||||
|
||||
m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
if (m_pModelCom->IsFinishedAnim() && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
m_pModelCom->Set_BlendDuration(0.3f);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -180,6 +303,61 @@ void CBroom::Behavior_MoveExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK);
|
||||
}
|
||||
|
||||
|
||||
void CBroom::Camera_InterpTurn(_float fTimeDelta)
|
||||
{
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (iCurrAnimIndex != m_Animation[STATEANIM::BROOM_FLY_B].first)
|
||||
return;
|
||||
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
|
||||
_vector vCameraLook = XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f);
|
||||
|
||||
_vector vCameraRight = XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f);
|
||||
|
||||
_float2 fCamLook = { XMVectorGetX(vCameraLook), XMVectorGetZ(vCameraLook) };
|
||||
|
||||
vCameraRight = XMVector3Normalize(vCameraRight);
|
||||
|
||||
_float angle = CMyTools::Get_Direction2D(vCurLook, fCamLook);
|
||||
|
||||
_float degree = XMConvertToDegrees(angle);
|
||||
|
||||
_vector xmvInput = XMVectorZero();
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
xmvInput += vCameraLook;
|
||||
|
||||
xmvInput = XMVector3Normalize(xmvInput);
|
||||
|
||||
_float2 fInput2D = { XMVectorGetX(xmvInput), XMVectorGetZ(xmvInput) };
|
||||
|
||||
_float targetAngle = XMConvertToDegrees(CMyTools::Get_Direction2D(fCamLook, fInput2D));
|
||||
|
||||
_float angleDiff = degree - targetAngle;
|
||||
if (angleDiff > 180.f) {
|
||||
angleDiff -= 360.f;
|
||||
}
|
||||
if (angleDiff < -180.f) {
|
||||
angleDiff += 360.f;
|
||||
}
|
||||
|
||||
_float Offset = 2.f;
|
||||
|
||||
if (angleDiff > Offset)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta*0.3f);
|
||||
}
|
||||
else if (angleDiff < -Offset)
|
||||
{
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
void CBroom::Add_FSM()
|
||||
{
|
||||
#pragma region Behavior_Movement_NotFocus
|
||||
@@ -192,27 +370,35 @@ void CBroom::Add_FSM()
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
|
||||
}
|
||||
{
|
||||
CState_Move::STATE_MOVE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
}
|
||||
|
||||
{
|
||||
CState_Move::STATE_MOVE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CBroom::Set_Anim()
|
||||
{
|
||||
m_Animation[STATEANIM::BROOM_MOUNT_B] = { 29,false };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_IDLE_B] = { 24,true };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_STOP_B] = { 6,false };
|
||||
m_Animation[STATEANIM::BROOM_FLY_B] = { 5,true };
|
||||
|
||||
m_Animation[STATEANIM::BROOM_HOVER_DOWN_B] = { 25,true };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_LEFT_B] = { 26,true };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_RIGHT_B] = { 27,true };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_UP_B] = { 28,true };
|
||||
|
||||
m_Animation[STATEANIM::BROOM_FLY_B] = { 12,true };
|
||||
m_Animation[STATEANIM::BROOM_FLY_DOWN_B] = { 13,true };
|
||||
m_Animation[STATEANIM::BROOM_FLY_LEFT_B] = { 15,true };
|
||||
m_Animation[STATEANIM::BROOM_FLY_RIGHT_B] = { 16,true };
|
||||
@@ -221,6 +407,11 @@ void CBroom::Set_Anim()
|
||||
//호버 스탑 6
|
||||
//호버 제자리 24
|
||||
//플라이 업 17 다운 13 왼쪽15 오른쪽 16
|
||||
|
||||
//호버 다운 25
|
||||
//호버 왼쪽 26
|
||||
// 호버 오른쪽 27
|
||||
//호버 업 28
|
||||
}
|
||||
#pragma endregion State
|
||||
|
||||
|
||||
@@ -160,11 +160,20 @@ call Update_Resources.bat
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Action_Panel.h" />
|
||||
<ClInclude Include="..\Public\Current_Slot_Number.h" />
|
||||
<ClInclude Include="..\Public\Current_Spell_Slot.h" />
|
||||
<ClInclude Include="..\Public\Eessential_Spell.h" />
|
||||
<ClInclude Include="..\Public\Eessential_Spell_Slot.h" />
|
||||
<ClInclude Include="..\Public\HpBarBG.h" />
|
||||
<ClInclude Include="..\Public\Levioso.h" />
|
||||
<ClInclude Include="..\Public\Magic_Icon.h" />
|
||||
<ClInclude Include="..\Public\Magic_Item.h" />
|
||||
<ClInclude Include="..\Public\Magic_Meter.h" />
|
||||
<ClInclude Include="..\Public\DecendoSide.h" />
|
||||
<ClInclude Include="..\Public\BombardSide.h" />
|
||||
<ClInclude Include="..\Public\LeviosoSide.h" />
|
||||
<ClInclude Include="..\public\MapElement.h" />
|
||||
<ClInclude Include="..\public\MapElement_Light.h" />
|
||||
<ClInclude Include="..\Public\Potion.h" />
|
||||
<ClInclude Include="..\Public\NomalJapSide.h" />
|
||||
<ClInclude Include="..\Public\Lumos.h" />
|
||||
@@ -229,9 +238,22 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Player.h" />
|
||||
<ClInclude Include="..\Public\PlayerInfo.h" />
|
||||
<ClInclude Include="..\Public\Slot_Number.h" />
|
||||
<ClInclude Include="..\public\Skill_Data.h" />
|
||||
<ClInclude Include="..\Public\Spell_Anim.h" />
|
||||
<ClInclude Include="..\Public\Spell_Canvas.h" />
|
||||
<ClInclude Include="..\Public\Spell_Header.h" />
|
||||
<ClInclude Include="..\Public\Spell_Header_Line.h" />
|
||||
<ClInclude Include="..\Public\Spell_Hover.h" />
|
||||
<ClInclude Include="..\Public\Spell_Hover_Effect.h" />
|
||||
<ClInclude Include="..\Public\Spell_List.h" />
|
||||
<ClInclude Include="..\Public\Spell_List_Image.h" />
|
||||
<ClInclude Include="..\Public\Spell_Overlay.h" />
|
||||
<ClInclude Include="..\Public\Spell_Panel.h" />
|
||||
<ClInclude Include="..\Public\Spell_Preview.h" />
|
||||
<ClInclude Include="..\Public\Spell_Slot.h" />
|
||||
<ClInclude Include="..\Public\Spell_State.h" />
|
||||
<ClInclude Include="..\Public\Spell_UI.h" />
|
||||
<ClInclude Include="..\Public\Spell_Vidio_Border.h" />
|
||||
<ClInclude Include="..\Public\State_Broom_Ride.h" />
|
||||
<ClInclude Include="..\Public\State_Combat.h" />
|
||||
<ClInclude Include="..\Public\State_Dodge.h" />
|
||||
@@ -243,6 +265,8 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\public\StreetContainer.h" />
|
||||
<ClInclude Include="..\public\Terrain.h" />
|
||||
<ClInclude Include="..\Public\TrailObject.h" />
|
||||
<ClInclude Include="..\Public\Troll.h" />
|
||||
<ClInclude Include="..\Public\Troll_Weapon.h" />
|
||||
<ClInclude Include="..\Public\Wand.h" />
|
||||
<ClInclude Include="Client.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
@@ -251,11 +275,20 @@ call Update_Resources.bat
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\Current_Slot_Number.cpp" />
|
||||
<ClCompile Include="..\Private\Current_Spell_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\Eessential_Spell.cpp" />
|
||||
<ClCompile Include="..\Private\Eessential_Spell_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\HpBarBG.cpp" />
|
||||
<ClCompile Include="..\Private\Levioso.cpp" />
|
||||
<ClCompile Include="..\Private\Magic_Icon.cpp" />
|
||||
<ClCompile Include="..\Private\Magic_Item.cpp" />
|
||||
<ClCompile Include="..\Private\Magic_Meter.cpp" />
|
||||
<ClCompile Include="..\Private\DecendoSide.cpp" />
|
||||
<ClCompile Include="..\Private\BombardSide.cpp" />
|
||||
<ClCompile Include="..\Private\LeviosoSide.cpp" />
|
||||
<ClCompile Include="..\private\MapElement.cpp" />
|
||||
<ClCompile Include="..\private\MapElement_Light.cpp" />
|
||||
<ClCompile Include="..\Private\Potion.cpp" />
|
||||
<ClCompile Include="..\Private\NomalJapSide.cpp" />
|
||||
<ClCompile Include="..\Private\Lumos.cpp" />
|
||||
@@ -322,9 +355,22 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Player.cpp" />
|
||||
<ClCompile Include="..\Private\PlayerInfo.cpp" />
|
||||
<ClCompile Include="..\Private\Slot_Number.cpp" />
|
||||
<ClCompile Include="..\private\Skill_Data.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Anim.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Canvas.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Header.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Header_Line.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Hover.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Hover_Effect.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_List.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_List_Image.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Overlay.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Preview.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_State.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_UI.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Vidio_Border.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_Ride.cpp" />
|
||||
<ClCompile Include="..\Private\State_Combat.cpp" />
|
||||
<ClCompile Include="..\Private\State_Dodge.cpp" />
|
||||
@@ -336,6 +382,9 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\private\StreetContainer.cpp" />
|
||||
<ClCompile Include="..\private\Terrain.cpp" />
|
||||
<ClCompile Include="..\Private\TrailObject.cpp" />
|
||||
<ClCompile Include="..\Private\Troll.cpp" />
|
||||
<ClCompile Include="..\Private\Troll_States.cpp" />
|
||||
<ClCompile Include="..\Private\Troll_Weapon.cpp" />
|
||||
<ClCompile Include="..\Private\Wand.cpp" />
|
||||
<ClCompile Include="Broom_States.cpp" />
|
||||
<ClCompile Include="Client.cpp" />
|
||||
|
||||
@@ -184,9 +184,6 @@
|
||||
<ClInclude Include="..\public\Terrain.h">
|
||||
<Filter>02.GameObjects\Environment\Terrain</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\GamePlay_Canvas.h">
|
||||
<Filter>02.GameObjects\UI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\LoadingWidget.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Loding_Panel\LoadingWidget</Filter>
|
||||
</ClInclude>
|
||||
@@ -256,11 +253,14 @@
|
||||
<ClInclude Include="..\Public\State_Broom_Ride.h">
|
||||
<Filter>04.Mechanic\State\Broom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Skill_Data.h">
|
||||
<Filter>04.Mechanic\Skill\Skill_Data</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Revelio.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Revelio</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\NomalJapSide.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\NomalJapSide</Filter>
|
||||
<Filter>02.GameObjects\Effect\Effects\NomalJap\NomalJapSide</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Levioso.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Levioso</Filter>
|
||||
@@ -268,6 +268,84 @@
|
||||
<ClInclude Include="..\Public\Lumos.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Lumos</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Troll.h">
|
||||
<Filter>02.GameObjects\Monster\Troll</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Troll_Weapon.h">
|
||||
<Filter>02.GameObjects\Item\Troll_Weapon</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\LeviosoSide.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Levioso\LeviosoSide</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DecendoSide.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Decendo\DecendoSide</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\BombardSide.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Bombard\BombardSide</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\GamePlay_Canvas.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_Vidio_Border.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Vidio_Border</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_State.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_State</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_Preview.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Preview</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_Panel.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_List_Image.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List_Image</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_List.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_Hover_Effect.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover_Effect</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_Hover.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_Header_Line.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header_Line</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_Header.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_Canvas.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Spell_Anim.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Anim</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Eessential_Spell_Slot.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell_Slot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Eessential_Spell.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Current_Spell_Slot.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Spell_Slot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Current_Slot_Number.h">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Slot_Number</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement_Light.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Light</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\MapElement_Light.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Light</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -335,9 +413,6 @@
|
||||
<Filter Include="04.Mechanic\State">
|
||||
<UniqueIdentifier>{1bfec6dc-f008-4d18-87d6-be38824b1272}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\Skill">
|
||||
<UniqueIdentifier>{c5b61cb3-bc5f-4429-8715-b309dcf054b2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels\10.Field">
|
||||
<UniqueIdentifier>{2b209526-b728-4fba-a184-b9224d72903a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -575,15 +650,99 @@
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Revelio">
|
||||
<UniqueIdentifier>{19a2325e-1184-4ee0-92e1-657bf184418c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\NomalJapSide">
|
||||
<UniqueIdentifier>{d260ec7e-150c-4a25-8e25-83eb141652bc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Levioso">
|
||||
<UniqueIdentifier>{b982d9d6-7561-43d4-b542-88483119047b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Lumos">
|
||||
<UniqueIdentifier>{6bc9fd95-31bc-40f3-83cc-15ebb756b04a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\Skill">
|
||||
<UniqueIdentifier>{c5b61cb3-bc5f-4429-8715-b309dcf054b2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\Skill\Skill_Data">
|
||||
<UniqueIdentifier>{2bc5b43e-0e24-49d4-95b0-549ad4428201}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement">
|
||||
<UniqueIdentifier>{f3f219aa-034f-4aa2-9f2e-d75d15bd1f4a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement\Light">
|
||||
<UniqueIdentifier>{71f6a568-488d-4ec1-be79-8fcce6677e27}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement">
|
||||
<UniqueIdentifier>{f3f219aa-034f-4aa2-9f2e-d75d15bd1f4a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement\Light">
|
||||
<UniqueIdentifier>{71f6a568-488d-4ec1-be79-8fcce6677e27}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Monster\Troll">
|
||||
<UniqueIdentifier>{a1b1f17d-ed4f-4b20-aa8e-c52e693683d4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Item\Troll_Weapon">
|
||||
<UniqueIdentifier>{1d6c078d-dddd-493d-a6f0-f2cac2e4107e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\NomalJap\NomalJapSide">
|
||||
<UniqueIdentifier>{d260ec7e-150c-4a25-8e25-83eb141652bc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Levioso\LeviosoSide">
|
||||
<UniqueIdentifier>{dc00cfd8-105f-419f-a4e4-109096258347}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Decendo\DecendoSide">
|
||||
<UniqueIdentifier>{1cb823f5-a6fe-4bef-9292-b49480a42524}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\Effects\Bombard\BombardSide">
|
||||
<UniqueIdentifier>{b6076bdb-df15-498f-b951-6b2d0b777a0b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas">
|
||||
<UniqueIdentifier>{257a5a09-b15b-4fd2-9615-054a00cf4b25}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel">
|
||||
<UniqueIdentifier>{978f1d19-2da4-48fe-ad5e-2622b0c668a5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Slot_Number">
|
||||
<UniqueIdentifier>{8c3162f4-bb70-443f-901d-61d194972ccc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Spell_Slot">
|
||||
<UniqueIdentifier>{fa8badcc-02d7-4e2f-bd3d-5689cb13629c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell">
|
||||
<UniqueIdentifier>{5519da22-ce61-4c5c-91fc-44859d126f26}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell_Slot">
|
||||
<UniqueIdentifier>{1584a13f-7fd5-413c-9b6b-11f07b50bf58}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Anim">
|
||||
<UniqueIdentifier>{378ce73b-f242-470c-8737-9a54b967bfd8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Drag">
|
||||
<UniqueIdentifier>{1f768f30-3484-4ce8-9bef-be71c043f229}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover_Effect">
|
||||
<UniqueIdentifier>{6f8a7e8c-2b91-44c7-89c0-8da07283e656}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List">
|
||||
<UniqueIdentifier>{f0dcd3f2-2f47-4867-8f7a-27283d7f012f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List_Image">
|
||||
<UniqueIdentifier>{3db1d2a8-b9f2-4585-b044-49e38edf68b6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Preview">
|
||||
<UniqueIdentifier>{294d9db3-97d6-47a9-9087-adb17525d6ec}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_State">
|
||||
<UniqueIdentifier>{3819fb90-dbd9-4465-a12e-bac7ba19c7d7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Vidio_Border">
|
||||
<UniqueIdentifier>{8628d773-0dcf-48e4-8c51-eca66e7f8d1e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover">
|
||||
<UniqueIdentifier>{ee8108db-4fe3-4ed7-ac2a-156e2b22591e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header_Line">
|
||||
<UniqueIdentifier>{e24f4ced-ec48-46dd-b52f-3eb4b0d9588f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header">
|
||||
<UniqueIdentifier>{00b37924-ab02-4287-b67e-80375a8d3268}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -763,9 +922,6 @@
|
||||
<ClCompile Include="..\Private\LoadingWidget.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Loding_Panel\LoadingWidget</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\GamePlay_Canvas.cpp">
|
||||
<Filter>02.GameObjects\UI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Action_Panel</Filter>
|
||||
</ClCompile>
|
||||
@@ -836,7 +992,7 @@
|
||||
<Filter>02.GameObjects\Effect\Effects\Revelio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\NomalJapSide.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\NomalJapSide</Filter>
|
||||
<Filter>02.GameObjects\Effect\Effects\NomalJap\NomalJapSide</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Levioso.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Levioso</Filter>
|
||||
@@ -844,6 +1000,90 @@
|
||||
<ClCompile Include="..\Private\Lumos.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Lumos</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Skill_Data.cpp">
|
||||
<Filter>04.Mechanic\Skill\Skill_Data</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement_Light.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Light</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement_Light.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Light</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Troll.cpp">
|
||||
<Filter>02.GameObjects\Monster\Troll</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Troll_States.cpp">
|
||||
<Filter>02.GameObjects\Monster\Troll</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Troll_Weapon.cpp">
|
||||
<Filter>02.GameObjects\Item\Troll_Weapon</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\LeviosoSide.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Levioso\LeviosoSide</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\DecendoSide.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Decendo\DecendoSide</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\BombardSide.cpp">
|
||||
<Filter>02.GameObjects\Effect\Effects\Bombard\BombardSide</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\GamePlay_Canvas.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_Vidio_Border.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Vidio_Border</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_State.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_State</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_Preview.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Preview</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_Panel.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_List_Image.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List_Image</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_List.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_List</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_Hover_Effect.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover_Effect</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_Hover.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Hover</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_Header_Line.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header_Line</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_Header.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Header</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_Canvas.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Spell_Anim.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Spell_Anim</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Eessential_Spell_Slot.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell_Slot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Eessential_Spell.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Eessential_Spell</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Current_Spell_Slot.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Spell_Slot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Current_Slot_Number.cpp">
|
||||
<Filter>02.GameObjects\UI\Spell_Canvas\Spell_Panel\Current_Slot_Number</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc">
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "PhysXEffectHitBox.h"
|
||||
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
|
||||
CBombard::CBombard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
@@ -50,6 +51,7 @@ void CBombard::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
XMStoreFloat4(&m_vStartPos, m_pLight_Projectile->Get_WorldPostion());
|
||||
}
|
||||
|
||||
void CBombard::Update(_float fTimeDelta)
|
||||
@@ -61,7 +63,18 @@ void CBombard::Update(_float fTimeDelta)
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
m_pLight_Projectile->Get_Component<CTransform>()->Translation(m_vCameraLook * 2.f);
|
||||
CTransform* pPJTransform = m_pLight_Projectile->Get_Component<CTransform>();
|
||||
|
||||
pPJTransform->Translation(m_vCameraLook * 2.f);
|
||||
|
||||
|
||||
|
||||
if (true == m_pGameInstance->SphereCast(0.125f, XMLoadFloat4(&m_vStartPos), m_vCameraLook, XMVectorGetX(XMVector3Length(m_vCameraLook * 2.f))
|
||||
, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, hitBuffer))
|
||||
{
|
||||
OnCollision();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CBombard::Late_Update(_float fTimeDelta)
|
||||
@@ -70,6 +83,8 @@ void CBombard::Late_Update(_float fTimeDelta)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
XMStoreFloat4(&m_vEndPos, m_pLight_Projectile->Get_WorldPostion());
|
||||
|
||||
}
|
||||
|
||||
@@ -89,6 +104,10 @@ HRESULT CBombard::Pre_Setting(CGameObject* pObject)
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
CWand* pWand = static_cast<CPlayer*>(m_pOwner)->Get_PartObject<CWand>();
|
||||
|
||||
if (pWand == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
CPartObject* pShootPt = Get_PartObject<CEffectParts>("Bombard_Shoot_Pt");
|
||||
@@ -96,9 +115,9 @@ HRESULT CBombard::Pre_Setting(CGameObject* pObject)
|
||||
|
||||
m_vCameraLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
pShootPt->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pLight_Projectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
pShootPt->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
m_pLight_Projectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
pCircle0->Set_Visible(true);
|
||||
pShootPt->Set_Visible(true);
|
||||
@@ -123,32 +142,6 @@ HRESULT CBombard::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CBombard::Ready_Child()
|
||||
{
|
||||
CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir, vOwnerLook * 2.f);
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = vDir;
|
||||
Desc.vLifeTime = { 0.f, 2.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -182,15 +175,16 @@ CGameObject* CBombard::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CBombard::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
_vector vPos = XMVectorSet(hitBuffer.block.position.x, hitBuffer.block.position.y, hitBuffer.block.position.z, 1.f);
|
||||
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
pPair.second->Set_Visible(true);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
|
||||
m_pLight_Projectile->Set_Visible(false);
|
||||
Get_PartObject<CEffectParts>("Bombard_Shoot_Pt")->Set_Visible(false);
|
||||
|
||||
@@ -199,18 +193,12 @@ void CBombard::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
|
||||
Get_PartObject<CEffectParts>("Bombard_Circle0")->Set_Visible(false);
|
||||
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
void CBombard::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pLight_Projectile);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
#include "pch.h"
|
||||
#include "BombardSide.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Player.h"
|
||||
#include "Wand.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CBombardSide::CBombardSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CBombardSide::CBombardSide(const CBombardSide& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBombardSide::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBombardSide::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/BombardaSide")))
|
||||
return E_FAIL;
|
||||
|
||||
m_wstrEffectName = L"BombardSide";
|
||||
|
||||
|
||||
m_pWandParticle = Get_PartObject<CEffectParts>("WandParticle_B_100");
|
||||
m_pWandLight = Get_PartObject<CEffectParts>("Wand_Light_B");
|
||||
m_pWandTrail = Get_PartObject<CTrailObject>();
|
||||
|
||||
SAFE_ADDREF(m_pWandLight);
|
||||
SAFE_ADDREF(m_pWandTrail);
|
||||
SAFE_ADDREF(m_pWandParticle);
|
||||
|
||||
m_fDuration = 1.f;
|
||||
|
||||
m_Events.emplace(0.4f, [&](){
|
||||
m_pWandTrail->Set_Visible(false);
|
||||
});
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBombardSide::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CBombardSide::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return;
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
m_pWandTrail->Get_Component<CTrail>()->Trail_Update(fTimeDelta, pWand->Get_WorldMatrix());
|
||||
m_pWandParticle->Get_Component<CTransform>()->Set_WorldMatrix(pWand->Get_WorldMatrix());
|
||||
|
||||
}
|
||||
|
||||
void CBombardSide::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBombardSide::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pOwner = pObject;
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pWandParticle->Set_Visible(true);
|
||||
|
||||
m_pWandLight->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
m_pWandTrail->Set_Visible(true);
|
||||
m_pWandTrail->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
/*_vector pPos = pPlayer->Get_WandPos().r[3];*/
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBombardSide::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBombardSide::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CBombardSide* CBombardSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBombardSide* pInstance = new CBombardSide(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBombardSide");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CBombardSide::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBombardSide* pInstance = new CBombardSide(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBombardSide");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBombardSide::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
}
|
||||
|
||||
void CBombardSide::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
Safe_Release(m_pWandLight);
|
||||
Safe_Release(m_pWandTrail);
|
||||
Safe_Release(m_pWandParticle);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CBombardSide::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CBombardSide::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
#include "Broom.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
#include "InfoInstance.h"
|
||||
CBroom::CBroom(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CUnit(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom::CBroom(const CBroom& Prototype)
|
||||
: CUnit(Prototype)
|
||||
: CUnit(Prototype),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -42,18 +43,29 @@ HRESULT CBroom::Initialize(void* pArg)
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, 10.f, 0.f, 1.f));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CBroom::Update(_float fTimeDelta)
|
||||
{
|
||||
Update_CameraCoordinateSystem();
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
|
||||
void CBroom::Late_Update(_float fTimeDelta)
|
||||
@@ -141,6 +153,15 @@ HRESULT CBroom::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom::Update_CameraCoordinateSystem()
|
||||
{
|
||||
_vector xmvCameraLook = XMVector3Normalize(XMVectorSetY(m_pGameInstance->Get_CameraLook(), 0.f));
|
||||
_vector xmvUp = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
XMStoreFloat3(&m_vCameraRightDir, XMVector3Normalize(XMVector3Cross(xmvUp, xmvCameraLook)));
|
||||
XMStoreFloat3(&m_vCameraLookDir, xmvCameraLook);
|
||||
m_pInfoInstance->Update_CameraCoordinateSystem(m_vCameraLookDir, m_vRimLightColor);
|
||||
}
|
||||
|
||||
CBroom* CBroom::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBroom* pInstance = new CBroom(pDevice, pContext);
|
||||
@@ -175,6 +196,15 @@ void CBroom::Free()
|
||||
|
||||
void CBroom::Describe_Entity()
|
||||
{
|
||||
|
||||
GUI::DragFloat("MaxSpeed", &m_fFlyMaxSpeed, 0.01f);
|
||||
GUI::DragFloat("Speed", &m_fSpeed, 0.01f);
|
||||
GUI::DragFloat("Accle", &m_fAccel, 0.01f);
|
||||
GUI::DragFloat("Decel", &m_fDecel, 0.01f);
|
||||
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -16,29 +16,33 @@ void CBuildingContainer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Priority_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CBuildingContainer::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
m_fCamDepth = XMVectorGetX(XMVector3Length(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMLoadFloat3(&m_vExtentWorldPosition)));
|
||||
m_fCamDepth = XMVectorGetX(XMVector3LengthSq(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMLoadFloat3(&m_vExtentWorldPosition)));
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CBuildingContainer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pOcclusionQueryCom->isDraw())
|
||||
// if (m_pOcclusionQueryCom->isDraw()){
|
||||
__super::Late_Update(fTimeDelta);
|
||||
//}
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this);
|
||||
//m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this);
|
||||
}
|
||||
|
||||
HRESULT CBuildingContainer::Render()
|
||||
@@ -196,8 +200,9 @@ void CBuildingContainer::Free()
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
SAFE_RELEASE(m_pOcclusionQueryCom);
|
||||
|
||||
for (auto& pCollision : m_ColiisonPartObjects)
|
||||
for (auto& pCollision : m_ColiisonPartObjects){
|
||||
SAFE_RELEASE(pCollision);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -35,13 +35,12 @@ void CCallBack_EffectHitBox_HitReport::onShapeHit(const PSX::PxControllerShapeHi
|
||||
switch (pTargetActorData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
// action
|
||||
break;
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
{
|
||||
switch (pTargetActorData->iSubKind)
|
||||
switch (PXOBJECT(pTargetActorData->iSubKind))
|
||||
{
|
||||
case ENUM_CLASS(PXOBJECT::WALL):
|
||||
case PXOBJECT::WALL:
|
||||
|
||||
/* OnCollision 함수에 넘길 값 */
|
||||
CollisionDesc.vWorldPos = XMVectorSet( (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f);
|
||||
@@ -51,7 +50,7 @@ void CCallBack_EffectHitBox_HitReport::onShapeHit(const PSX::PxControllerShapeHi
|
||||
|
||||
pOwnerActorData->pOwner->Get_Owner()->OnCollision(pTargetActorData->pOwner , &CollisionDesc);
|
||||
break;
|
||||
case ENUM_CLASS(PXOBJECT::GOBLIN_WARRIOR):
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
|
||||
/* OnCollision 함수에 넘길 값 */
|
||||
CollisionDesc.vWorldPos = XMVectorSet( (_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f);
|
||||
@@ -108,9 +107,9 @@ void CCallBack_EffectHitBox_HitReport::onControllerHit(const PSX::PxControllersH
|
||||
assert(false);
|
||||
break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
switch (pTargetActorData->iSubKind)
|
||||
switch (PXOBJECT(pTargetActorData->iSubKind))
|
||||
{
|
||||
case ENUM_CLASS(PXOBJECT::GOBLIN_WARRIOR):
|
||||
case PXOBJECT::GOBLIN_WARRIOR:
|
||||
|
||||
/* OnCollision 함수에 넘길 값 */
|
||||
CollisionDesc.vWorldPos = XMVectorSet((_float)vWorldPos.x, (_float)vWorldPos.y, (_float)vWorldPos.z, 1.f);
|
||||
|
||||
@@ -11,6 +11,14 @@ CCallBack_Playable_HitReport::~CCallBack_Playable_HitReport()
|
||||
{
|
||||
}
|
||||
|
||||
void CCallBack_Playable_HitReport::BeginFrame()
|
||||
{
|
||||
// 매 프레임 초기화
|
||||
m_vClimbNormal = { 0.f, 1.f, 0.f };
|
||||
m_bGroundHit = { false };
|
||||
m_fBestNormal = { 0.f };
|
||||
}
|
||||
|
||||
void CCallBack_Playable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit)
|
||||
{
|
||||
PSX::PxController* pController = hit.controller;
|
||||
@@ -32,49 +40,35 @@ void CCallBack_Playable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& h
|
||||
switch (pTargetActorData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
// action
|
||||
switch (PXOBJECT(pTargetActorData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::TERRAIN:
|
||||
case PXOBJECT::FLOOR:
|
||||
case PXOBJECT::ROAD:
|
||||
if (vWorldNormal.y > 0) {
|
||||
_float fDotValue = vWorldNormal.dot({ 0.f, 1.f, 0.f });
|
||||
if (m_fBestNormal < fDotValue) {
|
||||
m_bGroundHit = true;
|
||||
m_fBestNormal = fDotValue;
|
||||
m_vClimbNormal = { vWorldNormal.x, vWorldNormal.y, vWorldNormal.z };
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
{
|
||||
switch (pTargetActorData->iSubKind)
|
||||
switch (PXOBJECT(pTargetActorData->iSubKind))
|
||||
{
|
||||
case 23: // 무거운데 올라갈 수 있는 벽
|
||||
if (m_pGameInstance->Key_Pressing(DIK_E)) {
|
||||
pOwnerActorData->pOwner->Get_Component<CTransform>()->BookMomentum(fLength * XMVectorSet(0.f, 1.5f, 0.f, 0.f));
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_R)) {
|
||||
pOwnerActorData->pOwner->Get_Component<CTransform>()->BookMomentum(fLength * XMVectorSet(0.f, -1.f, 0.f, 0.f));
|
||||
}
|
||||
//pOwnerActorData->pOwner->Get_Component<CTransform>()->BookMomentum(XMVectorSet(0.f, 0.5f * GRAVITY, 0.f, 0.f));
|
||||
case PXOBJECT::END:
|
||||
break;
|
||||
case 24: // 문짝
|
||||
{
|
||||
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
|
||||
_float fDot = vDir.dot(PSX::PxVec3(0.f, 1.f, 0.f));
|
||||
if (fDot > 0) {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, 1.f, 0.f) * fLength * 100000.f, PSX::PxForceMode::eIMPULSE);
|
||||
}
|
||||
else {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, -1.f, 0.f) * fLength * 100000.f, PSX::PxForceMode::eIMPULSE);
|
||||
}
|
||||
} break;
|
||||
case 25: // 문짝
|
||||
{
|
||||
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
|
||||
_float fDot = vDir.dot(PSX::PxVec3(0.f, 1.f, 0.f));
|
||||
if (fDot > 0) {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, 1.f, 0.f) * fLength * 100000.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
else {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, -1.f, 0.f) * fLength * 100000.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
{
|
||||
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
|
||||
pDynamic->addForce(vDir * fLength * 100000.f, PSX::PxForceMode::eIMPULSE);
|
||||
}
|
||||
break;
|
||||
} break;
|
||||
}
|
||||
} break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
@@ -138,6 +132,20 @@ void CCallBack_Playable_HitReport::onObstacleHit(const PSX::PxControllerObstacle
|
||||
//}
|
||||
}
|
||||
|
||||
void CCallBack_Playable_HitReport::Set_CurrentSlop()
|
||||
{
|
||||
m_pController->Rewind_Grounded();
|
||||
if (m_bGroundHit)
|
||||
{
|
||||
m_pController->Set_OnGroundFlag(m_bGroundHit);
|
||||
float fDot = clamp(m_fBestNormal, -1.0f, 1.0f);
|
||||
float fAngleRad = acosf(fDot);
|
||||
float fAngleDeg = XMConvertToDegrees(fAngleRad);
|
||||
|
||||
m_pController->Set_CurrentSlope(fAngleDeg);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CCallBack_Playable_HitReport::Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject)
|
||||
{
|
||||
m_pController = pController;
|
||||
@@ -157,6 +165,16 @@ HRESULT CCallBack_Playable_HitReport::Finalize()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CCallBack_Playable_HitReport::IsOnGround()
|
||||
{
|
||||
return m_bGroundHit;
|
||||
}
|
||||
|
||||
_vector CCallBack_Playable_HitReport::Get_GroundVector()
|
||||
{
|
||||
return XMLoadFloat3(&m_vClimbNormal);
|
||||
}
|
||||
|
||||
CCallBack_Playable_HitReport* CCallBack_Playable_HitReport::Create()
|
||||
{
|
||||
return new CCallBack_Playable_HitReport();
|
||||
|
||||
@@ -63,33 +63,59 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_PGDN))
|
||||
{
|
||||
m_bLerp = !m_bLerp;
|
||||
}
|
||||
if (true == m_bMovable) {
|
||||
m_vAccDegreeXY.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
|
||||
m_vAccDegreeXY.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
|
||||
CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccDegreeXY);
|
||||
}
|
||||
|
||||
if (m_bLerp)
|
||||
{
|
||||
m_vPosLerpTimer.x += fTimeDelta;
|
||||
if (m_vPosLerpTimer.x > m_vPosLerpTimer.y) {
|
||||
m_vPosLerpTimer.x = 0.f;
|
||||
Start_LerpShoulderPos();
|
||||
}
|
||||
_vector vShoulderPos = XMVectorLerp(XMLoadFloat4(&m_StartPos), XMLoadFloat4(&m_DestPos), (m_vPosLerpTimer.x / m_vPosLerpTimer.y));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vShoulderPos);
|
||||
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
_vector vCameraLook = XMVector3Normalize(XMVector3Rotate(XMVectorSet(0.f, 0.f, 1.f, 0.f), vRotCameraq));
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
|
||||
}
|
||||
else
|
||||
{
|
||||
_vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance);
|
||||
_vector vShoulderPos = Get_WorldPostion();
|
||||
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
|
||||
}
|
||||
|
||||
_vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance);
|
||||
_vector vShoulderPos = Get_WorldPostion();
|
||||
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
|
||||
}
|
||||
|
||||
void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
{
|
||||
GUI::DragFloat3("Camera Shoulder Position",(_float*)&m_vShoulderPosRatio,0.01f);
|
||||
GUI::DragFloat("Camera Shoulder Length",&m_fCameraFocalLength, 0.01f);
|
||||
if (m_pGameInstance->Key_Up(DIK_INSERT)) {
|
||||
|
||||
m_pBinded_Camera->Toggle_Priority();
|
||||
@@ -110,8 +136,8 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
if (m_pGameInstance->Key_Up(DIK_P)) {
|
||||
m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio;
|
||||
m_vShoulderStartRatio.x *= -1.f;
|
||||
m_bLerp = true;
|
||||
m_vLerpTimer.x = 0.f;
|
||||
m_bShoulderLerp = true;
|
||||
m_vShoulderLerpTimer.x = 0.f;
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)) {
|
||||
m_pBinded_Camera->ZoomIn(fTimeDelta);
|
||||
@@ -128,12 +154,12 @@ void CCamPosition_Shoulder::Late_Update(_float fTimeDelta)
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
|
||||
return;
|
||||
}
|
||||
if (true == m_bLerp) {
|
||||
m_vLerpTimer.x += fTimeDelta;
|
||||
XMStoreFloat3(&m_vShoulderPosRatio, XMVectorLerp(XMLoadFloat3(&m_vShoulderStartRatio), XMLoadFloat3(&m_vShoulderOtherRatio), m_vLerpTimer.x / m_vLerpTimer.y));
|
||||
if (m_vLerpTimer.x > m_vLerpTimer.y) {
|
||||
m_bLerp = false;
|
||||
m_vLerpTimer.x = 0.f;
|
||||
if (true == m_bShoulderLerp) {
|
||||
m_vShoulderLerpTimer.x += fTimeDelta;
|
||||
XMStoreFloat3(&m_vShoulderPosRatio, XMVectorLerp(XMLoadFloat3(&m_vShoulderStartRatio), XMLoadFloat3(&m_vShoulderOtherRatio), m_vShoulderLerpTimer.x / m_vShoulderLerpTimer.y));
|
||||
if (m_vShoulderLerpTimer.x > m_vShoulderLerpTimer.y) {
|
||||
m_bShoulderLerp = false;
|
||||
m_vShoulderLerpTimer.x = 0.f;
|
||||
|
||||
m_vShoulderPosRatio = m_vShoulderOtherRatio;
|
||||
}
|
||||
@@ -196,6 +222,16 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CCamPosition_Shoulder::Start_LerpShoulderPos()
|
||||
{
|
||||
XMStoreFloat4(&m_StartPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
_vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
|
||||
|
||||
XMStoreFloat4(&m_DestPos, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance);
|
||||
}
|
||||
CCamPosition_Shoulder* CCamPosition_Shoulder::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCamPosition_Shoulder* pInstance = new CCamPosition_Shoulder(pDevice, pContext);
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#include "pch.h"
|
||||
#include "Camera_Debug.h"
|
||||
#include "Shader.h"
|
||||
#include "Layer.h"
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
CCamera_Debug::CCamera_Debug(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CCamera(pDevice, pContext)
|
||||
@@ -56,6 +59,15 @@ void CCamera_Debug::Update(_float fTimeDelta)
|
||||
if (m_pGameInstance->Key_Pressing(DIK_TAB)) {
|
||||
Set_InitialPos();
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)) {
|
||||
if (m_pGameInstance->Key_Up(DIK_SCROLL)) {
|
||||
CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_PLAYER);
|
||||
if (nullptr != pLayer) {
|
||||
CPlayer* pPlayer = pLayer->Get_Object<CPlayer>();
|
||||
pPlayer->Get_Component<CCharacter_Controller>()->Set_Position(Get_WorldPostion());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma region Angle
|
||||
|
||||
@@ -41,7 +41,6 @@ void CCamera_Gaze::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CCamera_Gaze::Update(_float fTimeDelta)
|
||||
{
|
||||
GUI::Text("CAM_GAZE_PRIORITY : %d", m_iPriority);
|
||||
if (false == m_bActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
#include "pch.h"
|
||||
#include "Current_Slot_Number.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CCurrent_Slot_Number::CCurrent_Slot_Number(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CCurrent_Slot_Number::CCurrent_Slot_Number(const CCurrent_Slot_Number& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Slot_Number::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Slot_Number::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 35.f;
|
||||
Desc.fSizeY = 35.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fOffSetX = 105.f;
|
||||
m_fOffSetY = 101.f;
|
||||
m_iCols = 4;
|
||||
UV();
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-805.f, 380.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_pVIBufferCom->Set_ImageUV(pUVDesc);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Slot_Number::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CCurrent_Slot_Number::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Slot_Number::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Slot_Number::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Slot_Number_UI_Instance"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Atlas_Number"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::UV()
|
||||
{
|
||||
pUVDesc[0].fUV = Meter_Index(1);
|
||||
pUVDesc[1].fUV = Meter_Index(2);
|
||||
pUVDesc[2].fUV = Meter_Index(3);
|
||||
pUVDesc[3].fUV = Meter_Index(4);
|
||||
}
|
||||
|
||||
_float4 CCurrent_Slot_Number::Meter_Index(_uint Number)
|
||||
{
|
||||
m_fIamge_Size = { 320.f, 128.f };
|
||||
|
||||
_uint iXCount = 5;
|
||||
_uint iYCount = 2;
|
||||
|
||||
_float frameWidth = 64.f;
|
||||
_float frameHeight = 64.f;
|
||||
|
||||
_uint frameX = Number % iXCount;
|
||||
_uint frameY = Number / iXCount;
|
||||
|
||||
_float4 UV;
|
||||
UV.x = frameX * frameWidth / m_fIamge_Size.x;
|
||||
UV.y = frameY * frameHeight / m_fIamge_Size.y;
|
||||
UV.z = UV.x + (frameWidth / m_fIamge_Size.x);
|
||||
UV.w = UV.y + (frameHeight / m_fIamge_Size.y);
|
||||
|
||||
return UV;
|
||||
}
|
||||
|
||||
CCurrent_Slot_Number* CCurrent_Slot_Number::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCurrent_Slot_Number* pInstance = new CCurrent_Slot_Number(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CCurrent_Slot_Number");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CCurrent_Slot_Number::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CCurrent_Slot_Number* pInstance = new CCurrent_Slot_Number(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSlot_Number");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CCurrent_Slot_Number::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,254 @@
|
||||
#include "pch.h"
|
||||
#include "Current_Spell_Slot.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CCurrent_Spell_Slot::CCurrent_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CCurrent_Spell_Slot::CCurrent_Spell_Slot(const CCurrent_Spell_Slot& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Spell_Slot::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Spell_Slot::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 105.f;
|
||||
Desc.fSizeY = 105.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAngle = XMConvertToRadians(-135);
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fOffSetX = 105.f;
|
||||
m_fOffSetY = 150.f;
|
||||
m_iCols = 4;
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-780.f, 340.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCurrent_Spell_Slot::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CCurrent_Spell_Slot::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CCurrent_Spell_Slot::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Spell_Slot::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::DEFAULT))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CCurrent_Spell_Slot::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CCurrent_Spell_Slot::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CCurrent_Spell_Slot::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CCurrent_Spell_Slot::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Spell_Slot::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Spell_Slot::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Current_Spell_Slot"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CCurrent_Spell_Slot* CCurrent_Spell_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCurrent_Spell_Slot* pInstance = new CCurrent_Spell_Slot(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CCurrent_Spell_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CCurrent_Spell_Slot::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CCurrent_Spell_Slot* pInstance = new CCurrent_Spell_Slot(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CCurrent_Spell_Slot::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CCurrent_Spell_Slot::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -6,6 +6,9 @@
|
||||
#include "PhysXEffectHitBox.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
CDecendo::CDecendo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
@@ -53,11 +56,7 @@ void CDecendo::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->RewindMomentum();
|
||||
}
|
||||
|
||||
XMStoreFloat4(&m_vStartPos, m_pProjectile->Get_WorldPostion());
|
||||
}
|
||||
|
||||
void CDecendo::Update(_float fTimeDelta)
|
||||
@@ -73,11 +72,6 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vCameraLook * 0.5f);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vCameraLook * 0.5f);
|
||||
}
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
|
||||
@@ -86,9 +80,14 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
|
||||
//TODO : 다시 위치 잡기
|
||||
if (true == m_pGameInstance->SphereCast(0.125f, XMLoadFloat4(&m_vStartPos), m_vCameraLook, XMVectorGetX(XMVector3Length(m_vCameraLook * 0.5f))
|
||||
, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, hitBuffer))
|
||||
{
|
||||
OnCollision();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CDecendo::Late_Update(_float fTimeDelta)
|
||||
@@ -98,6 +97,8 @@ void CDecendo::Late_Update(_float fTimeDelta)
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
XMStoreFloat4(&m_vEndPos, m_pProjectile->Get_WorldPostion());
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -120,12 +121,18 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
CWand* pWand = static_cast<CPlayer*>(m_pOwner)->Get_PartObject<CWand>();
|
||||
|
||||
if (pWand == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
CPartObject* pCircle0 = Get_PartObject<CEffectParts>();
|
||||
|
||||
/* 초기 객체 위치 초기화 */
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pProjectile->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
/* 초기 객체 비지블 */
|
||||
pCircle0->Set_Visible(true);
|
||||
@@ -163,24 +170,6 @@ HRESULT CDecendo::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CDecendo::Ready_Child()
|
||||
{
|
||||
CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -214,13 +203,13 @@ CGameObject* CDecendo::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CDecendo::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
_vector vPos = XMVectorSet(hitBuffer.block.position.x, hitBuffer.block.position.y, hitBuffer.block.position.z, 1.f);
|
||||
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
pPair.second->Set_Visible(true);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
|
||||
@@ -240,18 +229,12 @@ void CDecendo::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
void CDecendo::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pProjectile_Blur);
|
||||
SAFE_RELEASE(m_pProjectile);
|
||||
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
#include "pch.h"
|
||||
#include "DecendoSide.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Player.h"
|
||||
#include "Wand.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CDecendoSide::CDecendoSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CDecendoSide::CDecendoSide(const CDecendoSide& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDecendoSide::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CDecendoSide::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/DecendoSide")))
|
||||
return E_FAIL;
|
||||
|
||||
m_wstrEffectName = L"DecendoSide";
|
||||
|
||||
m_pWandLight = Get_PartObject<CEffectParts>("Wand_Light_R");
|
||||
m_pWandTrail = Get_PartObject<CTrailObject>();
|
||||
|
||||
SAFE_ADDREF(m_pWandLight);
|
||||
SAFE_ADDREF(m_pWandTrail);
|
||||
|
||||
m_fDuration = 1.f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDecendoSide::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CDecendoSide::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return;
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
m_pWandTrail->Get_Component<CTrail>()->Trail_Update(fTimeDelta, pWand->Get_WorldMatrix());
|
||||
|
||||
}
|
||||
|
||||
void CDecendoSide::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CDecendoSide::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pOwner = pObject;
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pWandLight->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
m_pWandTrail->Set_Visible(true);
|
||||
m_pWandTrail->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
/*_vector pPos = pPlayer->Get_WandPos().r[3];*/
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDecendoSide::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDecendoSide::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDecendoSide* CDecendoSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDecendoSide* pInstance = new CDecendoSide(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDecendoSide");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CDecendoSide::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDecendoSide* pInstance = new CDecendoSide(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDecendoSide");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDecendoSide::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
}
|
||||
|
||||
void CDecendoSide::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
Safe_Release(m_pWandLight);
|
||||
Safe_Release(m_pWandTrail);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CDecendoSide::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CDecendoSide::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ HRESULT CDummy_PhysXPlayable::Ready_Components(void* pArg)
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
|
||||
#include "pch.h"
|
||||
#include "Eessential_Spell.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CEessential_Spell::CEessential_Spell(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CEessential_Spell::CEessential_Spell(const CEessential_Spell& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 40.f;
|
||||
Desc.fSizeY = 40.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fOffSetX = 80.f;
|
||||
m_fOffSetY = 80.f;
|
||||
m_iCols = 4;
|
||||
UV();
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_pVIBufferCom->Set_ImageUV(pUVDesc);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CEessential_Spell::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CEessential_Spell::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CEessential_Spell::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::EESSENTIAL_SPELL))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CEessential_Spell::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CEessential_Spell::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CEessential_Spell::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CEessential_Spell::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
void CEessential_Spell::UV()
|
||||
{
|
||||
for (_uint i = 0; i < 8; ++i)
|
||||
{
|
||||
pUVDesc[i].fUV = Meter_Index(i);
|
||||
}
|
||||
}
|
||||
|
||||
_float4 CEessential_Spell::Meter_Index(_uint Number)
|
||||
{
|
||||
_float2 fImage_Size = _float2{ 512.f, 256.f};
|
||||
|
||||
_uint iXCount = 4;
|
||||
_uint iYCount = 2;
|
||||
|
||||
_float frameWidth = 128.f;
|
||||
_float frameHeight = 128.f;
|
||||
|
||||
_uint frameX = Number % iXCount;
|
||||
_uint frameY = Number / iXCount;
|
||||
|
||||
_float4 UV{};
|
||||
UV.x = frameX * frameWidth / fImage_Size.x;
|
||||
UV.y = frameY * frameHeight / fImage_Size.y;
|
||||
UV.z = UV.x + (frameWidth / fImage_Size.x);
|
||||
UV.w = UV.y + (frameHeight / fImage_Size.y);
|
||||
|
||||
return UV;
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Eessential_Spell"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Altas_Eessential"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CEessential_Spell* CEessential_Spell::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CEessential_Spell* pInstance = new CEessential_Spell(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CEessential_Spell");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CEessential_Spell::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CEessential_Spell* pInstance = new CEessential_Spell(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CEessential_Spell");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CEessential_Spell::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CEessential_Spell::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,300 @@
|
||||
#include "pch.h"
|
||||
#include "Eessential_Spell_Slot.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CEessential_Spell_Slot::CEessential_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CEessential_Spell_Slot::CEessential_Spell_Slot(const CEessential_Spell_Slot& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell_Slot::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell_Slot::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 65.f;
|
||||
Desc.fSizeY = 65.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fOffSetX = 80.f;
|
||||
m_fOffSetY = 80.f;
|
||||
m_iCols = 4;
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_fDelayTime = 0.5f;
|
||||
m_iPerSpell_Slot = -1;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CEessential_Spell_Slot::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CEessential_Spell_Slot::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
Hover(fTimeDelta);
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CEessential_Spell_Slot::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell_Slot::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::EESSENTIAL_SPELL_SOLT))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CEessential_Spell_Slot::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CEessential_Spell_Slot::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CEessential_Spell_Slot::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CEessential_Spell_Slot::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
void CEessential_Spell_Slot::Hover(_float fTimeDelta)
|
||||
{
|
||||
POINT ptMouse{};
|
||||
GetCursorPos(&ptMouse);
|
||||
ScreenToClient(g_hWnd, &ptMouse);
|
||||
_float2 fMouse;
|
||||
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
|
||||
fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f));
|
||||
|
||||
// 엘리먼트의 월드 위치를 더해주면 엘리먼트 좌표계 기준이 됨
|
||||
fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0];
|
||||
fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1];
|
||||
|
||||
|
||||
m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
CUIObject::HOVER_INFO Info;
|
||||
Info.iSlotID = 1;
|
||||
if (m_iSpellType == -1)
|
||||
{
|
||||
Info.iHover_Index = -1;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Hover"), &Info);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Info.iHover_Index = m_iSpellType + ENUM_CLASS(SKILL_TYPE::JAP);
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Hover"), &Info);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell_Slot::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEessential_Spell_Slot::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Eessential_Spell_Slot"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemBG"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionDiamondTriggerBack_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CEessential_Spell_Slot* CEessential_Spell_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CEessential_Spell_Slot* pInstance = new CEessential_Spell_Slot(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CEessential_Spell_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CEessential_Spell_Slot::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CEessential_Spell_Slot* pInstance = new CEessential_Spell_Slot(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CEessential_Spell_Slot");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CEessential_Spell_Slot::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CEessential_Spell_Slot::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -88,6 +88,11 @@ void CEffectParts::Late_Update(_float fTimeDelta)
|
||||
|
||||
}
|
||||
|
||||
_vector CEffectParts::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CEffectParts::Ready_Components(void* pArg)
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
#include "Protego.h"
|
||||
#include "Revelio.h"
|
||||
#include "Levioso.h"
|
||||
|
||||
#include "BombardSide.h"
|
||||
#include "LeviosoSide.h"
|
||||
#include "DecendoSide.h"
|
||||
|
||||
#include "NomalJapSide.h"
|
||||
#include "Lumos.h"
|
||||
|
||||
@@ -30,16 +35,18 @@ HRESULT CEffectPool::Initialize_Prototype()
|
||||
|
||||
HRESULT CEffectPool::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
if (FAILED(__super::Initialize(pArg))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Effect()))
|
||||
if (FAILED(Ready_Effect())) {
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -49,8 +56,6 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
++iter;
|
||||
}
|
||||
else
|
||||
@@ -67,8 +72,6 @@ void CEffectPool::Update(_float fTimeDelta)
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
++iter;
|
||||
}
|
||||
else
|
||||
@@ -81,7 +84,6 @@ void CEffectPool::Update(_float fTimeDelta)
|
||||
|
||||
void CEffectPool::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
for (auto iter = m_ActiveEffectList.begin(); iter != m_ActiveEffectList.end(); )
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
@@ -105,7 +107,9 @@ HRESULT CEffectPool::Render()
|
||||
|
||||
HRESULT CEffectPool::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
if (FAILED(__super::Ready_Components(nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -116,9 +120,7 @@ HRESULT CEffectPool::Bind_ShaderResources()
|
||||
|
||||
HRESULT CEffectPool::Ready_Effect()
|
||||
{
|
||||
|
||||
if(FAILED(Create_Effect(SKILL_TYPE::JAP, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CNomalJap* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CNomalJap>(iPrototypeLevel, nullptr);
|
||||
@@ -173,7 +175,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLevioso* pEffect = nullptr;
|
||||
|
||||
@@ -183,7 +185,7 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LUMOS, 10, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LUMOS, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLumos* pEffect = nullptr;
|
||||
|
||||
@@ -193,6 +195,36 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::BOMBARDA_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CBombardSide* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CBombardSide>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CLeviosoSide* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CLeviosoSide>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::DESCENDO_SIDE, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CDecendoSide* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CDecendoSide>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -202,8 +234,9 @@ HRESULT CEffectPool::Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPr
|
||||
{
|
||||
CEffect_Container* pEffect_Container = AddPrototypeEvent(iPrototypeLevel, iCloneLevel);
|
||||
|
||||
if (pEffect_Container == nullptr)
|
||||
if (pEffect_Container == nullptr) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_EffectList[ENUM_CLASS(eType)].push_back(pEffect_Container);
|
||||
|
||||
|
||||
@@ -208,11 +208,6 @@ void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
pPart.second->Set_Visible(false);
|
||||
}
|
||||
|
||||
if (m_pPhysHitBox != nullptr && m_pPhysHitBox->isDead() == false)
|
||||
{
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,10 @@ void CGoblin::Update(_float fTimeDelta)
|
||||
m_pRigidBody->ConvertToCCT(*m_pCharacter_Controller);
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
|
||||
void CGoblin::Late_Update(_float fTimeDelta)
|
||||
@@ -102,7 +106,7 @@ void CGoblin::Late_Update(_float fTimeDelta)
|
||||
m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_Actor()->getGlobalPose());
|
||||
}
|
||||
|
||||
m_pTransformCom->LookAt(XMLoadFloat4(&m_vTargetPos));
|
||||
m_pTransformCom->LookAt_Horizontal(XMLoadFloat4(&m_vTargetPos));
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
@@ -207,6 +211,7 @@ HRESULT CGoblin::Ready_Components()
|
||||
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;
|
||||
}
|
||||
@@ -286,6 +291,9 @@ void CGoblin::Free()
|
||||
|
||||
void CGoblin::Describe_Entity()
|
||||
{
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("GoblinMomentum %.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -81,6 +81,10 @@ HRESULT CInfoInstance::Load_MapObjects(const _char* pFilePath)
|
||||
{
|
||||
return m_pMapInfo->Load_MapObjects(pFilePath);
|
||||
}
|
||||
HRESULT CInfoInstance::Load_LightElements(const _char* pFilePath)
|
||||
{
|
||||
return m_pMapInfo->Load_LightElements(pFilePath);
|
||||
}
|
||||
#pragma endregion
|
||||
LEVEL CInfoInstance::Get_RestartLevel()
|
||||
{
|
||||
|
||||
@@ -57,7 +57,46 @@ void CLevel_Field::Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CLevel_Field::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("필드레벨"));
|
||||
_float fDeltaTimeSeconds = m_pGameInstance->Get_TimeDelta(TEXT("Timer_60"));
|
||||
|
||||
static _float fAccumulatedTimeSeconds = 0.0f;
|
||||
static _uint iFrameCountForFps = 0;
|
||||
static _float fCurrentFps = 0.0f;
|
||||
static _float fAverageFrameTimeMilliseconds = 0.0f;
|
||||
|
||||
fAccumulatedTimeSeconds += fDeltaTimeSeconds;
|
||||
++iFrameCountForFps;
|
||||
|
||||
if (fAccumulatedTimeSeconds >= 1.0f)
|
||||
{
|
||||
if (fAccumulatedTimeSeconds > 0.0f)
|
||||
{
|
||||
fCurrentFps = static_cast<_float>(iFrameCountForFps) / fAccumulatedTimeSeconds;
|
||||
if (fCurrentFps > 0.0f)
|
||||
{
|
||||
fAverageFrameTimeMilliseconds = 1000.0f / fCurrentFps;
|
||||
}
|
||||
}
|
||||
|
||||
fAccumulatedTimeSeconds = 0.0f;
|
||||
iFrameCountForFps = 0;
|
||||
}
|
||||
|
||||
_float fCurrentFrameTimeMilliseconds = fDeltaTimeSeconds * 1000.0f;
|
||||
|
||||
_tchar szWindowTitle[256] = {};
|
||||
|
||||
// 현재 프레임 시간 + 평균 FPS / 평균 프레임 타임(ms)
|
||||
_stprintf_s(
|
||||
szWindowTitle,
|
||||
TEXT("필드레벨입니다 | Frame: %.3f ms | Avg: %.3f ms | FPS: %.1f"),
|
||||
fCurrentFrameTimeMilliseconds,
|
||||
fAverageFrameTimeMilliseconds,
|
||||
fCurrentFps
|
||||
);
|
||||
|
||||
SetWindowText(g_hWnd, szWindowTitle);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,17 +6,23 @@
|
||||
#include "Camera_Debug.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Spell_Canvas.h"
|
||||
#include "Layer.h"
|
||||
#include "Player.h"
|
||||
#include "SkyBox.h"
|
||||
#include "Broom.h"
|
||||
#include "Dummy_PhysXWall.h"
|
||||
#include "Dummy_PhysXPlayable.h"
|
||||
#include "Goblin.h"
|
||||
#include "Terrain.h"
|
||||
#include "EffectPool.h"
|
||||
#include "InstancedProp.h"
|
||||
|
||||
#pragma region ACTOR
|
||||
#include "Player.h"
|
||||
#include "Troll.h"
|
||||
#include "Goblin.h"
|
||||
#pragma endregion
|
||||
|
||||
|
||||
CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
{
|
||||
@@ -38,7 +44,12 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Layer_UI(LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Reday_Layer_EffectPool())) { //플레이어보다 먼저 생성해야함!
|
||||
//플레이어보다 먼저 생성해야함!
|
||||
if (FAILED(Reday_Layer_EffectPool())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
// 이것도 플레이어보다 먼저 생성해야함!
|
||||
if (FAILED(Ready_Layer_Item(LAYER_ITEM))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Layer_Player(LAYER_PLAYER))) {
|
||||
@@ -82,7 +93,46 @@ void CLevel_GamePlay::Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CLevel_GamePlay::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("게임플레이레벨입니다"));
|
||||
_float fDeltaTimeSeconds = m_pGameInstance->Get_TimeDelta(TEXT("Timer_60"));
|
||||
|
||||
static _float fAccumulatedTimeSeconds = 0.0f;
|
||||
static _uint iFrameCountForFps = 0;
|
||||
static _float fCurrentFps = 0.0f;
|
||||
static _float fAverageFrameTimeMilliseconds = 0.0f;
|
||||
|
||||
fAccumulatedTimeSeconds += fDeltaTimeSeconds;
|
||||
++iFrameCountForFps;
|
||||
|
||||
if (fAccumulatedTimeSeconds >= 1.0f)
|
||||
{
|
||||
if (fAccumulatedTimeSeconds > 0.0f)
|
||||
{
|
||||
fCurrentFps = static_cast<_float>(iFrameCountForFps) / fAccumulatedTimeSeconds;
|
||||
if (fCurrentFps > 0.0f)
|
||||
{
|
||||
fAverageFrameTimeMilliseconds = 1000.0f / fCurrentFps;
|
||||
}
|
||||
}
|
||||
|
||||
fAccumulatedTimeSeconds = 0.0f;
|
||||
iFrameCountForFps = 0;
|
||||
}
|
||||
|
||||
_float fCurrentFrameTimeMilliseconds = fDeltaTimeSeconds * 1000.0f;
|
||||
|
||||
_tchar szWindowTitle[256] = {};
|
||||
|
||||
// 현재 프레임 시간 + 평균 FPS / 평균 프레임 타임(ms)
|
||||
_stprintf_s(
|
||||
szWindowTitle,
|
||||
TEXT("게임플레이레벨입니다 | Frame: %.3f ms | Avg: %.3f ms | FPS: %.1f"),
|
||||
fCurrentFrameTimeMilliseconds,
|
||||
fAverageFrameTimeMilliseconds,
|
||||
fCurrentFps
|
||||
);
|
||||
|
||||
SetWindowText(g_hWnd, szWindowTitle);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -110,9 +160,13 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
|
||||
/* Map Containters */
|
||||
/* 테스트용 맵 */
|
||||
|
||||
CInfoInstance::GetInstance()->Load_MapObjects("ClientTest");
|
||||
/* 전체 맵 */
|
||||
// CInfoInstance::GetInstance()->Load_MapObjects("Map1124");
|
||||
//CInfoInstance::GetInstance()->Load_MapObjects("Map1129");
|
||||
|
||||
/* 조명 오브젝트 */
|
||||
CInfoInstance::GetInstance()->Load_LightElements("LightElement");
|
||||
|
||||
|
||||
CInstancedProp::INSTANCE_PROP_DESC Desc = {};
|
||||
@@ -120,21 +174,26 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
/* InstanceProp Oak_Tree*/
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* BearBerry */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGamePlay_Canvas>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_UI))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGamePlay_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -184,15 +243,19 @@ HRESULT CLevel_GamePlay::Ready_Markers()
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, strLayerTag,nullptr,nullptr,&m_pBroom)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, m_pBroom))){
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Item(const _wstring& strLayerTag)
|
||||
{
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, LAYER_ITEM, nullptr, nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -223,7 +286,9 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTroll>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -231,10 +296,10 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
HRESULT CLevel_GamePlay::Reday_Layer_EffectPool()
|
||||
{
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함!
|
||||
//플레이어보다 먼저 생성해야함!
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, LAYER_EFFECTPOOL))) {
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,46 @@ void CLevel_Logo::Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CLevel_Logo::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("로고레벨입니다"));
|
||||
_float fDeltaTimeSeconds = m_pGameInstance->Get_TimeDelta(TEXT("Timer_60"));
|
||||
|
||||
static _float fAccumulatedTimeSeconds = 0.0f;
|
||||
static _uint iFrameCountForFps = 0;
|
||||
static _float fCurrentFps = 0.0f;
|
||||
static _float fAverageFrameTimeMilliseconds = 0.0f;
|
||||
|
||||
fAccumulatedTimeSeconds += fDeltaTimeSeconds;
|
||||
++iFrameCountForFps;
|
||||
|
||||
if (fAccumulatedTimeSeconds >= 1.0f)
|
||||
{
|
||||
if (fAccumulatedTimeSeconds > 0.0f)
|
||||
{
|
||||
fCurrentFps = static_cast<_float>(iFrameCountForFps) / fAccumulatedTimeSeconds;
|
||||
if (fCurrentFps > 0.0f)
|
||||
{
|
||||
fAverageFrameTimeMilliseconds = 1000.0f / fCurrentFps;
|
||||
}
|
||||
}
|
||||
|
||||
fAccumulatedTimeSeconds = 0.0f;
|
||||
iFrameCountForFps = 0;
|
||||
}
|
||||
|
||||
_float fCurrentFrameTimeMilliseconds = fDeltaTimeSeconds * 1000.0f;
|
||||
|
||||
_tchar szWindowTitle[256] = {};
|
||||
|
||||
// 현재 프레임 시간 + 평균 FPS / 평균 프레임 타임(ms)
|
||||
_stprintf_s(
|
||||
szWindowTitle,
|
||||
TEXT("로고 레벨입니다 | Frame: %.3f ms | Avg: %.3f ms | FPS: %.1f"),
|
||||
fCurrentFrameTimeMilliseconds,
|
||||
fAverageFrameTimeMilliseconds,
|
||||
fCurrentFps
|
||||
);
|
||||
|
||||
SetWindowText(g_hWnd, szWindowTitle);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,46 @@ void CLevel_Restart::Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CLevel_Restart::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("리스타트레벨"));
|
||||
_float fDeltaTimeSeconds = m_pGameInstance->Get_TimeDelta(TEXT("Timer_60"));
|
||||
|
||||
static _float fAccumulatedTimeSeconds = 0.0f;
|
||||
static _uint iFrameCountForFps = 0;
|
||||
static _float fCurrentFps = 0.0f;
|
||||
static _float fAverageFrameTimeMilliseconds = 0.0f;
|
||||
|
||||
fAccumulatedTimeSeconds += fDeltaTimeSeconds;
|
||||
++iFrameCountForFps;
|
||||
|
||||
if (fAccumulatedTimeSeconds >= 1.0f)
|
||||
{
|
||||
if (fAccumulatedTimeSeconds > 0.0f)
|
||||
{
|
||||
fCurrentFps = static_cast<_float>(iFrameCountForFps) / fAccumulatedTimeSeconds;
|
||||
if (fCurrentFps > 0.0f)
|
||||
{
|
||||
fAverageFrameTimeMilliseconds = 1000.0f / fCurrentFps;
|
||||
}
|
||||
}
|
||||
|
||||
fAccumulatedTimeSeconds = 0.0f;
|
||||
iFrameCountForFps = 0;
|
||||
}
|
||||
|
||||
_float fCurrentFrameTimeMilliseconds = fDeltaTimeSeconds * 1000.0f;
|
||||
|
||||
_tchar szWindowTitle[256] = {};
|
||||
|
||||
// 현재 프레임 시간 + 평균 FPS / 평균 프레임 타임(ms)
|
||||
_stprintf_s(
|
||||
szWindowTitle,
|
||||
TEXT("리스타트레벨입니다 | Frame: %.3f ms | Avg: %.3f ms | FPS: %.1f"),
|
||||
fCurrentFrameTimeMilliseconds,
|
||||
fAverageFrameTimeMilliseconds,
|
||||
fCurrentFps
|
||||
);
|
||||
|
||||
SetWindowText(g_hWnd, szWindowTitle);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ void CLevioso::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->RewindMomentum();
|
||||
}
|
||||
|
||||
XMStoreFloat4(&m_vStartPos, m_pLeviosoPJ_0->Get_WorldPostion());
|
||||
|
||||
}
|
||||
|
||||
void CLevioso::Update(_float fTimeDelta)
|
||||
@@ -75,21 +75,18 @@ void CLevioso::Update(_float fTimeDelta)
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
m_pLeviosoPJ_0->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.25f);
|
||||
m_pLeviosoPJ_1->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.25f);
|
||||
|
||||
|
||||
m_pTrail_PT_0->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.25f);
|
||||
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vOwnerLook * 1.f);
|
||||
if (true == m_pGameInstance->SphereCast(0.125f, XMLoadFloat4(&m_vStartPos), m_vOwnerLook, XMVectorGetX(XMVector3Length(m_vOwnerLook * 1.f))
|
||||
, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, hitBuffer))
|
||||
{
|
||||
OnCollision();
|
||||
}
|
||||
|
||||
|
||||
_matrix WorldMat = m_pTrail_PT_0->Get_Component<CTransform>()->Get_XMWorldMatrix();
|
||||
|
||||
m_pLeviosoTrail->Trail_Update(WorldMat, fTimeDelta);
|
||||
@@ -110,7 +107,7 @@ void CLevioso::Late_Update(_float fTimeDelta)
|
||||
|
||||
//m_pLeviosoTrail->Get_Component<CTrail>()->Fixed_Trail(WandWorld);
|
||||
|
||||
|
||||
XMStoreFloat4(&m_vEndPos, m_pLeviosoPJ_0->Get_WorldPostion());
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
@@ -176,24 +173,6 @@ HRESULT CLevioso::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CLevioso::Ready_Child()
|
||||
{
|
||||
CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vLifeTime = { 0.f, 1.5f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -227,14 +206,13 @@ CGameObject* CLevioso::Clone(void* pArg, CGameObject* pOwner)
|
||||
|
||||
void CLevioso::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
_vector vPos = XMVectorSet(hitBuffer.block.position.x, hitBuffer.block.position.y, hitBuffer.block.position.z, 1.f);
|
||||
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
pPair.second->Set_Visible(true);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, CollisionDesc->vWorldPos);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
__super::m_fAccTime = 0.f;
|
||||
@@ -250,18 +228,12 @@ void CLevioso::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
m_pLeviosoPJ_1->Set_Visible(false);
|
||||
m_pTrail_PT_0->Set_Visible(false);
|
||||
m_pLeviosoTrail->Set_Visible(false);
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
}
|
||||
|
||||
void CLevioso::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
if(m_pPhysHitBox != nullptr)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pLeviosoPJ_0);
|
||||
SAFE_RELEASE(m_pLeviosoPJ_1);
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
#include "pch.h"
|
||||
#include "LeviosoSide.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Player.h"
|
||||
#include "Wand.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CLeviosoSide::CLeviosoSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CLeviosoSide::CLeviosoSide(const CLeviosoSide& rhs)
|
||||
: CEffect_Container(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CLeviosoSide::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLeviosoSide::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/LeviosoSide")))
|
||||
return E_FAIL;
|
||||
|
||||
m_wstrEffectName = L"LeviosoSide";
|
||||
|
||||
|
||||
m_pWandLight = Get_PartObject<CEffectParts>("Wand_Light_P");
|
||||
m_pWandTrail = Get_PartObject<CTrailObject>();
|
||||
|
||||
SAFE_ADDREF(m_pWandLight);
|
||||
SAFE_ADDREF(m_pWandTrail);
|
||||
|
||||
m_fDuration = 1.f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLeviosoSide::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CLeviosoSide::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return;
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
m_pWandTrail->Get_Component<CTrail>()->Trail_Update(fTimeDelta, pWand->Get_WorldMatrix());
|
||||
|
||||
}
|
||||
|
||||
void CLeviosoSide::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLeviosoSide::Pre_Setting(CGameObject* pObject)
|
||||
{
|
||||
if (pObject == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pOwner = pObject;
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
CWand* pWand = static_cast<CWand*>(m_pOwner);
|
||||
|
||||
if (pWand == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_pWandLight->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
m_pWandTrail->Set_Visible(true);
|
||||
m_pWandTrail->Get_Component<CTrail>()->Reset_Trail();
|
||||
|
||||
/*_vector pPos = pPlayer->Get_WandPos().r[3];*/
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLeviosoSide::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLeviosoSide::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLeviosoSide* CLeviosoSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CLeviosoSide* pInstance = new CLeviosoSide(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CNomalJapSide");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CLeviosoSide::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CLeviosoSide* pInstance = new CLeviosoSide(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CNomalJapSide");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CLeviosoSide::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
}
|
||||
|
||||
void CLeviosoSide::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
Safe_Release(m_pWandLight);
|
||||
Safe_Release(m_pWandTrail);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CLeviosoSide::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CLeviosoSide::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,8 +57,11 @@ HRESULT CLight_Main::Ready_Components()
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::DIRECTIONAL;
|
||||
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
/*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.3f, 0.3f, 0.5f, 0.f);
|
||||
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.pDirection = m_pTransformCom->Get_StatePtr(STATE::LOOK);
|
||||
LightDesc.iLevel = NEXT_LEVEL;
|
||||
@@ -68,8 +71,12 @@ HRESULT CLight_Main::Ready_Components()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pGameInstance->Add_Light(NEXT_LEVEL, m_pLightCom);
|
||||
|
||||
|
||||
_float4 vColor = _float4(0.1f, 0.1f, 0.15f, 0.5f);
|
||||
m_pGameInstance->Set_FogColor(vColor);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -98,6 +98,7 @@ HRESULT CLumos::Pre_Setting(CGameObject* pObject)
|
||||
if (pWand == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pLumos_Light->Set_Visible(true);
|
||||
m_pLumos_Light->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
@@ -117,7 +117,7 @@ HRESULT CMagic_Icon::Render()
|
||||
|
||||
_vector CMagic_Icon::Get_WorldPostion()
|
||||
{
|
||||
return m_pOwner->Get_WorldPostion();
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CMagic_Icon::Bind_ShaderResources()
|
||||
|
||||
@@ -220,6 +220,10 @@ HRESULT CMagic_Item::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom6->Bind_ShaderResource(m_pShaderCom, "g_MaskingTexture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -317,6 +321,10 @@ HRESULT CMagic_Item::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_tillingSmokes"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom6), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -361,6 +369,7 @@ void CMagic_Item::Free()
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom3);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom4);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom5);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom6);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "MapContainer.h"
|
||||
#include "PartObject.h"
|
||||
#include "MapObject_Collision.h"
|
||||
|
||||
//#include "MapObject_LOD.h"
|
||||
|
||||
@@ -44,6 +45,10 @@ void CMapContainer::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CMapContainer::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -57,7 +62,33 @@ HRESULT CMapContainer::Render()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapContainer::ReadyForPhysX()
|
||||
{
|
||||
vector<class CPartObject*>::iterator iter = m_ColiisonPartObjects.begin();
|
||||
for (; iter != m_ColiisonPartObjects.end(); ++iter) {
|
||||
CMapObject_Collision* pObject = static_cast<CMapObject_Collision*>(*iter);
|
||||
pObject->ReadyForPhysX();
|
||||
}
|
||||
}
|
||||
|
||||
void CMapContainer::ConvertToPhysX()
|
||||
{
|
||||
vector<class CPartObject*>::iterator iter = m_ColiisonPartObjects.begin();
|
||||
for (; iter != m_ColiisonPartObjects.end(); ++iter) {
|
||||
CMapObject_Collision* pObject = static_cast<CMapObject_Collision*>(*iter);
|
||||
pObject->ConvertToPhysX();
|
||||
}
|
||||
}
|
||||
|
||||
void CMapContainer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CMapContainer::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
#include "pch.h"
|
||||
#include "MapElement.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
CMapElement::CMapElement(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CMapElement::CMapElement(const CMapElement& rhs)
|
||||
: CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CMapElement::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CMapElement::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CMapElement::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMapElement::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CMapElement::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,310 @@
|
||||
#include "pch.h"
|
||||
#include "MapElement_Light.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
#include "Terrain.h"
|
||||
#include "Layer.h"
|
||||
#include "VIBuffer_Terrain.h"
|
||||
|
||||
CMapElement_Light::CMapElement_Light(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMapElement{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CMapElement_Light::CMapElement_Light(const CMapElement_Light& rhs)
|
||||
: CMapElement(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Light::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Light::Initialize(void* pArg)
|
||||
{
|
||||
MAPELEMENT_LIGHT_DESC* pDesc = static_cast<MAPELEMENT_LIGHT_DESC*>(pArg);
|
||||
|
||||
m_iMaxLodLevel = pDesc->iMaxLodLevel;
|
||||
m_fBloomStrength = pDesc->fBloomStregth;
|
||||
m_iGlassMeshIndex = pDesc->iGlassMeshIndex;
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
}
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(pDesc->vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Light::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CMapElement_Light::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CMapElement_Light::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius()))
|
||||
{
|
||||
if (m_isLightOn)
|
||||
{
|
||||
_float fDistance = XMVectorGetX(XMVector3LengthSq(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - m_pTransformCom->Get_State(STATE::POSITION)));
|
||||
if (m_LightAdded_Distance > fDistance) // 카메라 범위 안
|
||||
{
|
||||
if (!m_isLightAdded)
|
||||
{
|
||||
m_isLightAdded = true;
|
||||
m_pGameInstance->Add_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_isLightAdded)
|
||||
{
|
||||
m_isLightAdded = false;
|
||||
m_pGameInstance->Delete_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
}
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this);
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Light::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (true == m_isLightOn && m_iGlassMeshIndex == i)
|
||||
continue;
|
||||
|
||||
if (m_iGlassMeshIndex == i)
|
||||
{
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(m_iGlassMeshIndex, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_DiffuseTexture", m_pGlassTextureCom->Get_SRV(0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_GlassTexture", m_pMaskTextureCom->Get_SRV(0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fGlassRatio", &m_fGlassRatio, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::GLASS)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Light::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
{
|
||||
CModel* pModel = { nullptr };
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
|
||||
reinterpret_cast<CComponent**>(&pModel))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelComs.push_back(pModel);
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Texture */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("LightPost_Emissive"),
|
||||
reinterpret_cast<CComponent**>(&m_pEmissiveTextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Texture */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("LightPost_Mask"),
|
||||
reinterpret_cast<CComponent**>(&m_pMaskTextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Texture */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("LightPost_Base"),
|
||||
reinterpret_cast<CComponent**>(&m_pGlassTextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
MAPELEMENT_LIGHT_DESC* pDesc = static_cast<MAPELEMENT_LIGHT_DESC*>(pArg);
|
||||
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::POINT;
|
||||
|
||||
memcpy(&LightDesc.vDiffuse, &pDesc->vDiffuse, sizeof(_float4));
|
||||
memcpy(&LightDesc.vAmbient, &pDesc->vAmbient, sizeof(_float4));
|
||||
memcpy(&LightDesc.vSpecular, &pDesc->vSpecular, sizeof(_float4));
|
||||
memcpy(&LightDesc.vPosOffset, &pDesc->vPosOffset, sizeof(_float4));
|
||||
|
||||
LightDesc.fRange = pDesc->fRange;
|
||||
LightDesc.iLevel = NEXT_LEVEL;
|
||||
LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION);
|
||||
|
||||
/* Com_Light*/
|
||||
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &LightDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (false == pDesc->isPow)
|
||||
m_pLightCom->Switch_LightAttenationMethod();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Light::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Light::Render_Bloom()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBloomStrength", &m_fBloomStrength, sizeof(_float))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_EmissiveTexture", m_pEmissiveTextureCom->Get_SRV(0))))
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_DiffuseTexture", m_pGlassTextureCom->Get_SRV(0))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::BLOOM)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelComs[m_iLodIndex]->Render(m_iGlassMeshIndex))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Light::Toggle_Light()
|
||||
{
|
||||
if (m_isLightOn)
|
||||
m_pGameInstance->Delete_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
else
|
||||
m_pGameInstance->Add_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
|
||||
m_isLightAdded = m_isLightOn = !m_isLightOn;
|
||||
}
|
||||
|
||||
CMapElement_Light* CMapElement_Light::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMapElement_Light* pInstance = new CMapElement_Light(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMapElement_Light");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CMapElement_Light::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CMapElement_Light* pInstance = new CMapElement_Light(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CMapElement_Light");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CMapElement_Light::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pLightCom);
|
||||
SAFE_RELEASE(m_pEmissiveTextureCom);
|
||||
SAFE_RELEASE(m_pMaskTextureCom);
|
||||
SAFE_RELEASE(m_pGlassTextureCom);
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
for (auto& pModel : m_pModelComs)
|
||||
SAFE_RELEASE(pModel);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CMapElement_Light::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif // DEBUG
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "MAPPartObject.h"
|
||||
#include "MapObject_Render.h"
|
||||
#include "MapObject_Collision.h"
|
||||
#include "MapElement_Light.h"
|
||||
#include "Layer.h"
|
||||
|
||||
CMapInfo::CMapInfo()
|
||||
{
|
||||
@@ -14,6 +16,41 @@ CMapInfo::CMapInfo()
|
||||
|
||||
void CMapInfo::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
static _bool s_bConverted = { false };
|
||||
static _bool s_bReadyToCreate = { false };
|
||||
|
||||
if (true != s_bConverted || true != s_bReadyToCreate) {
|
||||
CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_BACKGROUND);
|
||||
if (nullptr == pLayer) {
|
||||
return;
|
||||
}
|
||||
const list<CGameObject*>* pObjects = pLayer->Get_Objects();
|
||||
|
||||
if (false == s_bReadyToCreate) {
|
||||
s_bReadyToCreate = true;
|
||||
list<CGameObject*>::const_iterator iter = pObjects->begin();
|
||||
for (; iter != pObjects->end(); ++iter) {
|
||||
CMapContainer* pContainer = dynamic_cast<CMapContainer*>(*iter);
|
||||
if (nullptr != pContainer) {
|
||||
pContainer->ReadyForPhysX();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (false == s_bConverted) {
|
||||
s_bConverted = true;
|
||||
list<CGameObject*>::const_iterator iter = pObjects->begin();
|
||||
for (; iter != pObjects->end(); ++iter) {
|
||||
CMapContainer* pContainer = dynamic_cast<CMapContainer*>(*iter);
|
||||
if (nullptr != pContainer) {
|
||||
pContainer->ConvertToPhysX();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CMapInfo::Change_Level()
|
||||
@@ -55,14 +92,17 @@ HRESULT CMapInfo::Load_MapObjects(const _char* pFileName)
|
||||
{
|
||||
Load_StreetContainer(Container, &pContainerObject);
|
||||
}
|
||||
else
|
||||
else {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Load_MapRenderObjects(Container, pContainerObject)))
|
||||
if (FAILED(Load_MapRenderObjects(Container, pContainerObject))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Load_MapCollisionObjects(Container, pContainerObject)))
|
||||
if (FAILED(Load_MapCollisionObjects(Container, pContainerObject))){
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
@@ -210,8 +250,9 @@ HRESULT CMapInfo::Load_MapRenderObjects(tinyxml2::XMLElement* Container, CMapCon
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
if (FAILED(pContainerObject->Add_Part<CMapObject_Render>(strKey, g_iStaticLevel, nullptr, &Desc)))
|
||||
if (FAILED(pContainerObject->Add_Part<CMapObject_Render>(strKey, g_iStaticLevel, nullptr, &Desc))){
|
||||
return E_FAIL;
|
||||
}
|
||||
#pragma endregion
|
||||
}
|
||||
|
||||
@@ -259,13 +300,102 @@ HRESULT CMapInfo::Load_MapCollisionObjects(tinyxml2::XMLElement* Container, CMap
|
||||
|
||||
pContainerObject->Add_Collision<CMapObject_Collision>(g_iStaticLevel, &Desc);
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Load_LightElements(const _char* pFileName)
|
||||
{
|
||||
tinyxml2::XMLDocument xmlDoc;
|
||||
|
||||
string strPath = "../Bin/Resources/Data/Map/" + string(pFileName) + ".xml";
|
||||
|
||||
if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
|
||||
return E_FAIL;
|
||||
|
||||
tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("MapLightObjects");
|
||||
|
||||
if (nullptr == root)
|
||||
{
|
||||
MSG_BOX("Failed to Find root");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
|
||||
{
|
||||
CMapElement_Light::MAPELEMENT_LIGHT_DESC Desc = {};
|
||||
|
||||
/* Model Prototypes */
|
||||
Object->QueryUnsignedAttribute("Lod_Level", &Desc.iMaxLodLevel);
|
||||
|
||||
string strTag = {};
|
||||
for (auto* PrototypeTag = Object->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
|
||||
{
|
||||
strTag = PrototypeTag->GetText();
|
||||
|
||||
Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
|
||||
}
|
||||
|
||||
/* Transform */
|
||||
auto* Position = Object->FirstChildElement("Position");
|
||||
Position->QueryFloatAttribute("x", &Desc.vPosition.x);
|
||||
Position->QueryFloatAttribute("y", &Desc.vPosition.y);
|
||||
Position->QueryFloatAttribute("z", &Desc.vPosition.z);
|
||||
|
||||
auto* Scale = Object->FirstChildElement("Scale");
|
||||
Scale->QueryFloatAttribute("x", &Desc.vScale.x);
|
||||
Scale->QueryFloatAttribute("y", &Desc.vScale.y);
|
||||
Scale->QueryFloatAttribute("z", &Desc.vScale.z);
|
||||
|
||||
auto* Rotation = Object->FirstChildElement("Rotation");
|
||||
Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
|
||||
Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
|
||||
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
|
||||
|
||||
/* Light Desc */
|
||||
auto* Diffuse = Object->FirstChildElement("Diffuse");
|
||||
Diffuse->QueryFloatAttribute("x", &Desc.vDiffuse.x);
|
||||
Diffuse->QueryFloatAttribute("y", &Desc.vDiffuse.y);
|
||||
Diffuse->QueryFloatAttribute("z", &Desc.vDiffuse.z);
|
||||
|
||||
auto* Ambient = Object->FirstChildElement("Ambient");
|
||||
Ambient->QueryFloatAttribute("x", &Desc.vAmbient.x);
|
||||
Ambient->QueryFloatAttribute("y", &Desc.vAmbient.y);
|
||||
Ambient->QueryFloatAttribute("z", &Desc.vAmbient.z);
|
||||
|
||||
auto* Specular = Object->FirstChildElement("Specular");
|
||||
Specular->QueryFloatAttribute("x", &Desc.vSpecular.x);
|
||||
Specular->QueryFloatAttribute("y", &Desc.vSpecular.y);
|
||||
Specular->QueryFloatAttribute("z", &Desc.vSpecular.z);
|
||||
|
||||
auto* PosOffset = Object->FirstChildElement("PosOffset");
|
||||
PosOffset->QueryFloatAttribute("x", &Desc.vPosOffset.x);
|
||||
PosOffset->QueryFloatAttribute("y", &Desc.vPosOffset.y);
|
||||
PosOffset->QueryFloatAttribute("z", &Desc.vPosOffset.z);
|
||||
|
||||
auto* Info = Object->FirstChildElement("Info");
|
||||
Info->QueryUnsignedAttribute("GlassIndex", &Desc.iGlassMeshIndex);
|
||||
Info->QueryFloatAttribute("BloomStrength", &Desc.fBloomStregth);
|
||||
Info->QueryFloatAttribute("Range", &Desc.fRange);
|
||||
_uint iPow = {};
|
||||
Info->QueryUnsignedAttribute("Pow", &iPow);
|
||||
|
||||
Desc.isPow = 0 == iPow ? false : true;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Light>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Light"), &Desc)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
MSG_BOX("Successed to Load File");
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
|
||||
{
|
||||
m_pGameInstance = CGameInstance::GetInstance();
|
||||
@@ -303,3 +433,49 @@ void CMapInfo::Free()
|
||||
SAFE_RELEASE(m_pContext);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CMapInfo::Describe_Entity()
|
||||
{
|
||||
CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_BACKGROUND);
|
||||
if (nullptr == pLayer) {
|
||||
return;
|
||||
}
|
||||
static _bool s_bConverted = { false };
|
||||
static _bool s_bReadyToCreate = { false };
|
||||
|
||||
const list<CGameObject*>* pObjects = pLayer->Get_Objects();
|
||||
|
||||
GUI::Begin("MapInfoDesc");
|
||||
GUI::SetNextItemWidth(80.f);
|
||||
GUI::BeginChild("CollisonPartObjects");
|
||||
GUI::SetNextItemWidth(80.f);
|
||||
if (false == s_bReadyToCreate) {
|
||||
if (GUI::Button("Ready_StaticMeshesForPhyX_ALL")) {
|
||||
s_bReadyToCreate = true;
|
||||
list<CGameObject*>::const_iterator iter = pObjects->begin();
|
||||
for (; iter != pObjects->end(); ++iter) {
|
||||
CMapContainer* pContainer = dynamic_cast<CMapContainer*>(*iter);
|
||||
if (nullptr != pContainer) {
|
||||
pContainer->ReadyForPhysX();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (false == s_bConverted) {
|
||||
if (GUI::Button("Convert_StaticMeshesForPhyX_ALL")) {
|
||||
s_bConverted = true;
|
||||
list<CGameObject*>::const_iterator iter = pObjects->begin();
|
||||
for (; iter != pObjects->end(); ++iter) {
|
||||
CMapContainer* pContainer = dynamic_cast<CMapContainer*>(*iter);
|
||||
if (nullptr != pContainer) {
|
||||
pContainer->ConvertToPhysX();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
GUI::EndChild();
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -51,13 +51,15 @@ HRESULT CMapObject_Collision::Initialize(void* pArg)
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
|
||||
{
|
||||
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
|
||||
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[iIndex]);
|
||||
}
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
if (FAILED(__super::Initialize(pArg))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
if (FAILED(Ready_Components())){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(pDesc->vScale);
|
||||
@@ -70,33 +72,81 @@ HRESULT CMapObject_Collision::Initialize(void* pArg)
|
||||
|
||||
_wstring CMapObject_Collision::Get_PrototypeTag(_uint iLodIndex)
|
||||
{
|
||||
if (m_iMaxLodLevel < iLodIndex)
|
||||
if (m_iMaxLodLevel < iLodIndex){
|
||||
return m_ModelPrototypeTags[0];
|
||||
}
|
||||
|
||||
return m_ModelPrototypeTags[iLodIndex];
|
||||
}
|
||||
|
||||
void CMapObject_Collision::ReadyForPhysX()
|
||||
{
|
||||
if (true == m_bConverted) {
|
||||
return;
|
||||
}
|
||||
m_bConverted = true;
|
||||
|
||||
for (_uint iIndexLOD = 0; iIndexLOD < m_iMaxLodLevel + 1; ++iIndexLOD)
|
||||
{
|
||||
CModel* pModel = m_pModelComs[iIndexLOD];
|
||||
|
||||
if (FAILED(pModel->Ready_PhysXMeshes(XMLoadFloat4x4(&m_CombinedWorldMatrix)))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CMapObject_Collision::ConvertToPhysX()
|
||||
{
|
||||
if (true == m_bReadyToCreatePhysX) {
|
||||
return;
|
||||
}
|
||||
m_bReadyToCreatePhysX = true;
|
||||
|
||||
m_RigidBodies.resize(m_iMaxLodLevel + 1);
|
||||
for (_uint iIndexLOD = 0; iIndexLOD < m_iMaxLodLevel + 1; ++iIndexLOD)
|
||||
{
|
||||
CModel* pModel = m_pModelComs[iIndexLOD];
|
||||
|
||||
_uint iNumMeshes = pModel->Get_NumMeshes();
|
||||
|
||||
for (_uint iIndex = 0; iIndex < iNumMeshes; ++iIndex)
|
||||
{
|
||||
_wstring wstrName = CMyTools::ToWstring(pModel->Get_MeshName(iIndex)) + to_wstring(iIndex);
|
||||
CRigidBody_Static* pRigidBody = { nullptr };
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
Desc.pMeshName = wstrName.c_str();
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, wstrName, (CComponent**)&pRigidBody, &Desc))) {
|
||||
assert(false);
|
||||
}
|
||||
m_RigidBodies[iIndexLOD].push_back(pRigidBody);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CMapObject_Collision::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components();
|
||||
|
||||
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
|
||||
for (_uint iIndexLOD = 0; iIndexLOD < m_iMaxLodLevel + 1; ++iIndexLOD)
|
||||
{
|
||||
CModel* pModel = { nullptr };
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
|
||||
reinterpret_cast<CComponent**>(&pModel))))
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[iIndexLOD],
|
||||
reinterpret_cast<CComponent**>(&pModel)))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelComs.push_back(pModel);
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))){
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -151,9 +201,15 @@ void CMapObject_Collision::Free()
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
for (auto& pModel : m_pModelComs)
|
||||
Safe_Release(pModel);
|
||||
m_pModelComs.clear();
|
||||
for (auto& pModel : m_pModelComs){
|
||||
SAFE_RELEASE(pModel);
|
||||
} m_pModelComs.clear();
|
||||
|
||||
for (_uint i = 0; i < m_RigidBodies.size(); ++i) {
|
||||
for (_uint j = 0; j < m_RigidBodies[i].size(); ++j) {
|
||||
SAFE_RELEASE(m_RigidBodies[i][j]);
|
||||
}
|
||||
} m_RigidBodies.clear();
|
||||
|
||||
m_ModelPrototypeTags.clear();
|
||||
m_ModelPathIndices.clear();
|
||||
|
||||
@@ -59,10 +59,6 @@ void CNomalJap::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->RewindMomentum();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CNomalJap::Update(_float fTimeDelta)
|
||||
@@ -80,15 +76,24 @@ void CNomalJap::Update(_float fTimeDelta)
|
||||
|
||||
_vector vDirection = XMLoadFloat3(&m_vDirection);
|
||||
|
||||
//_vector vStartPos = Get_WorldPostion();
|
||||
//_float3 vfStartPos = {};
|
||||
//XMStoreFloat3(&vfStartPos, Get_WorldPostion());
|
||||
|
||||
// 선속도
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Translation(vDirection * m_fLinearSpeed * fTimeDelta);
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(vDirection * m_fLinearSpeed * fTimeDelta);
|
||||
|
||||
//_vector vEndPos = Get_WorldPostion();
|
||||
|
||||
//_float3 vfEndPos = {};
|
||||
//XMStoreFloat3(&vfEndPos, Get_WorldPostion());
|
||||
|
||||
//_float3 vDir = {};
|
||||
//XMStoreFloat3(&vDir, vEndPos - vStartPos);
|
||||
|
||||
//m_pGameInstance->SphereCast(0.125f, vfStartPos, vDir, XMVectorGetX(XMVector3Length(vEndPos - vStartPos)), )
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(vDirection * m_fLinearSpeed * fTimeDelta);
|
||||
}
|
||||
|
||||
if (false == m_bTrailPulseEnded && m_fAccTime > m_fDuration * 0.3f) {
|
||||
m_bTrailPulseEnded = true;
|
||||
@@ -104,11 +109,10 @@ void CNomalJap::Update(_float fTimeDelta)
|
||||
SAFE_RELEASE(m_pTargetUnit);
|
||||
}
|
||||
|
||||
MoveHitBox(fTimeDelta);
|
||||
return;
|
||||
}
|
||||
if (true == m_bTrailPulseEnded) {
|
||||
MoveHitBox(fTimeDelta);
|
||||
|
||||
return;
|
||||
}
|
||||
_vector vRotateUp = XMLoadFloat3(&m_vRotateUp);
|
||||
@@ -117,24 +121,14 @@ void CNomalJap::Update(_float fTimeDelta)
|
||||
// 각속도
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Translation(vRotateUp * 0.6f * sinf(m_fAngularSpeed * m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(vRotateUp * 0.6f * sinf(m_fAngularSpeed * m_fAccTime));
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(vRotateUp * 0.6f * sinf(m_fAngularSpeed * m_fAccTime));
|
||||
MoveHitBox(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CNomalJap::MoveHitBox(Engine::_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CCharacter_Controller>()->Move(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CNomalJap::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
if (m_bVisible == false){
|
||||
return;
|
||||
}
|
||||
|
||||
Get_PartObject<CTrailObject>()->Trail_Update(m_pProjectile->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
@@ -226,23 +220,7 @@ HRESULT CNomalJap::Ready_Components(void* pArg)
|
||||
|
||||
HRESULT CNomalJap::Ready_Child()
|
||||
{
|
||||
CPhysXEffectHitBox::PHYSXDUMMY_DESC Desc{};
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_NORMALJAP);
|
||||
Desc.vDeltaPos = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -295,20 +273,12 @@ 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));
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
}
|
||||
|
||||
void CNomalJap::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
if (m_pPhysHitBox != nullptr){
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pTargetUnit);
|
||||
Safe_Release(m_pProjectile);
|
||||
Safe_Release(m_pProjectile_Side);
|
||||
|
||||
@@ -112,6 +112,7 @@ HRESULT CPhysXEffectHitBox::Ready_Components(void* pArg)
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_EffectHitBox_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_EffectHitBox_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;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "CamPosition_Shoulder.h"
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
#include "Monster.h"
|
||||
#include "Broom.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
@@ -59,10 +60,11 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
Load_KeyFrame();
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
m_pBroomModel = static_cast<CGameObject*>(pArg)->Get_Component<CModel>();
|
||||
m_pBroom = m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_ITEM)->Get_Object<CBroom>();
|
||||
m_pBroomModel = m_pBroom->Get_Component<CModel>();
|
||||
m_pBroomTransform = m_pBroom->Get_Component<CTransform>();
|
||||
SAFE_ADDREF(m_pBroom);
|
||||
SAFE_ADDREF(m_pBroomModel);
|
||||
m_pBroomTransform = static_cast<CGameObject*>(pArg)->Get_Component<CTransform>();
|
||||
SAFE_ADDREF(m_pBroomTransform);
|
||||
|
||||
Add_FSM();
|
||||
@@ -108,6 +110,7 @@ void CPlayer::Priority_Update(_float fTimeDelta)
|
||||
m_pTransformCom->RewindMomentum();
|
||||
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CPlayer::Update(_float fTimeDelta)
|
||||
@@ -119,15 +122,19 @@ void CPlayer::Update(_float fTimeDelta)
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
Play_Event();
|
||||
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
{ // 세트
|
||||
m_pCallBack_HitReport->BeginFrame();
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
TestKeyInput(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -198,7 +205,7 @@ void CPlayer::Render_CameraCoordinateSystem()
|
||||
GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z);
|
||||
GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z);
|
||||
|
||||
_float fButtonSize = 25.f;
|
||||
_float fButtonSize = 45.f;
|
||||
GUI::Button("##0", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##2", { fButtonSize, fButtonSize });
|
||||
@@ -255,6 +262,17 @@ HRESULT CPlayer::Ready_Components()
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
LightDesc.eType = LIGHT::POINT;
|
||||
LightDesc.fRange = 10.f;
|
||||
LightDesc.iLevel = NEXT_LEVEL;
|
||||
LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION);
|
||||
LightDesc.vAmbient = CMyTools::ColorRGB_A_HEXtoFLOAT4(0xffffff, 1.f);
|
||||
LightDesc.vDiffuse = CMyTools::ColorRGB_A_HEXtoFLOAT4(0xffffff, 1.f);
|
||||
LightDesc.vSpecular = CMyTools::ColorRGB_A_HEXtoFLOAT4(0xffffff, 1.f);
|
||||
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &LightDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
@@ -262,7 +280,7 @@ HRESULT CPlayer::Ready_Components()
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::PLAYER);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.17f;
|
||||
Desc.fContactOffset = 0.01f;
|
||||
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.bAutoStepping = { true };
|
||||
Desc.fStepOffset = { 0.05f };
|
||||
@@ -271,6 +289,7 @@ HRESULT CPlayer::Ready_Components()
|
||||
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;
|
||||
}
|
||||
@@ -350,7 +369,7 @@ void CPlayer::SetGravity()
|
||||
eCollisionFlags;
|
||||
if ( false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_DOWN)
|
||||
&& false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_SIDES)) {
|
||||
if (false == m_pFSM->IsEnable(STATEANIM::JUMP)) { // 벽에 닿지 않았는데 점프 중이 아닐 땐 중력 on
|
||||
if (false == m_pFSM->IsEnable(FSMSTATE::JUMP)) { // 벽에 닿지 않았는데 점프 중이 아닐 땐 중력 on
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
else { // 점프 중일 땐 off
|
||||
@@ -452,6 +471,7 @@ void CPlayer::Free()
|
||||
}
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pLightCom);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
SAFE_RELEASE(m_pCamPosition_TopDown_FollowPart);
|
||||
@@ -460,11 +480,13 @@ void CPlayer::Free()
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
SAFE_RELEASE(m_pBroomModel);
|
||||
SAFE_RELEASE(m_pBroomTransform);
|
||||
SAFE_RELEASE(m_pBroom);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CPlayer::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("PLAYER_DESC");
|
||||
m_pCharacter_Controller->Describe_Entity();
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
@@ -497,11 +519,14 @@ void CPlayer::Describe_Entity()
|
||||
GUI::Text(AnimList.c_str());
|
||||
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_TrackProgressRatio(417));
|
||||
|
||||
GUI::Checkbox("Render", &m_bVisible);
|
||||
|
||||
GUI::Text("%d", m_iStateMask);
|
||||
|
||||
m_pLightCom->Describe_Entity();
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CamPosition_Shoulder.h"
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
#include "Broom.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
@@ -435,16 +436,26 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
xmvInputDir = XMVector3Normalize(xmvInputDir);
|
||||
|
||||
_float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
|
||||
GUI::Text("%.1f, %.1f", vInputDir.x, vInputDir.y);
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
|
||||
_float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir);
|
||||
_float absDir = fabsf(vDir);
|
||||
|
||||
_float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x;
|
||||
|
||||
_vector vCameraLook = XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f);
|
||||
|
||||
_vector vCameraRight = XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f);
|
||||
|
||||
_float2 fCamLook = { XMVectorGetX(vCameraLook), XMVectorGetZ(vCameraLook) };
|
||||
|
||||
vCameraRight = XMVector3Normalize(vCameraRight);
|
||||
|
||||
_float angle = CMyTools::Get_Direction2D(vCurLook, fCamLook);
|
||||
|
||||
_float degree = XMConvertToDegrees(angle);
|
||||
|
||||
_bool bSkipAngleCheck = { false };
|
||||
if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK)) {
|
||||
if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first &&
|
||||
@@ -457,7 +468,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
}
|
||||
if (!bSkipAngleCheck) {
|
||||
_float absDir = fabsf(vDir);
|
||||
if (absDir <= XMConvertToRadians(90.f)) {
|
||||
if (absDir < XMConvertToRadians(80.f)) {
|
||||
if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
@@ -476,13 +487,18 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_LEFT];
|
||||
if (degree > 35.f && degree < 55.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
else if (degree < -125.f && degree > -145.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_LEFT];
|
||||
}
|
||||
|
||||
/*if (m_pFSM->IsEnable(FSMSTATE::WALK))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_LEFT];
|
||||
}*/
|
||||
m_fAmount = 0.5f;
|
||||
m_bRatio = true;
|
||||
}
|
||||
@@ -493,13 +509,18 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_RIGHT];
|
||||
if (degree < -35.f && degree > -55.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
else if (degree > 125.f && degree < 145.f)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_RIGHT];
|
||||
}
|
||||
|
||||
/*if (m_pFSM->IsEnable(FSMSTATE::WALK))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_RIGHT];
|
||||
}*/
|
||||
m_fAmount = 0.5f;
|
||||
m_bRatio = true;
|
||||
}
|
||||
@@ -710,13 +731,45 @@ void CPlayer::Behavior_CombatEnter()
|
||||
{
|
||||
switch (m_eSpell)
|
||||
{
|
||||
case STATEANIM::ACCIO:
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL];
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA_SIDE, Get_PartObject<CWand>()); },
|
||||
0.f);
|
||||
|
||||
break;
|
||||
|
||||
case STATEANIM::DESCENDO:
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL];
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO_SIDE, Get_PartObject<CWand>()); },
|
||||
0.f);
|
||||
|
||||
break;
|
||||
case STATEANIM::DEPULSO:
|
||||
pairAnimInfo = m_Animation[STATEANIM::DEPULSO];
|
||||
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this); },
|
||||
0.2f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO_SIDE, Get_PartObject<CWand>()); },
|
||||
0.f);
|
||||
|
||||
m_eSpell = STATEANIM::END;
|
||||
|
||||
break;
|
||||
case STATEANIM::DIFFINDO:
|
||||
pairAnimInfo = m_Animation[STATEANIM::DIFFINDO];
|
||||
|
||||
|
||||
|
||||
m_eSpell = STATEANIM::END;
|
||||
break;
|
||||
case STATEANIM::DISILLUSION_ENTER:
|
||||
@@ -774,7 +827,12 @@ void CPlayer::Behavior_CombatEnter()
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::SPELL];
|
||||
}
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_V)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::MAPHELP);
|
||||
@@ -800,6 +858,10 @@ void CPlayer::Behavior_CombatEnter()
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
}
|
||||
|
||||
m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first,ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L));
|
||||
}
|
||||
|
||||
@@ -876,8 +938,12 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
}
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_Second_AnimationIndex(m_Animation[STATEANIM::POTION].first, ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L));
|
||||
}
|
||||
}
|
||||
@@ -892,8 +958,14 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::ACCIO];
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this);m_eSpell = STATEANIM::END; },
|
||||
0.25f);
|
||||
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::BOMBARDA, this);},
|
||||
0.15f);
|
||||
|
||||
|
||||
|
||||
m_eSpell = STATEANIM::END;
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
break;
|
||||
@@ -901,11 +973,23 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::DESCENDO];
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, this);m_eSpell = STATEANIM::END; },
|
||||
[this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::DESCENDO, this);},
|
||||
0.1f);
|
||||
|
||||
m_eSpell = STATEANIM::END;
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
break;
|
||||
|
||||
case STATEANIM::DEPULSO:
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::DEPULSO];
|
||||
|
||||
|
||||
m_eSpell = STATEANIM::END;
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -978,6 +1062,7 @@ void CPlayer::Behavior_HitExit()
|
||||
void CPlayer::Behavior_Broom_RideEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::BROOM_RIDE);
|
||||
m_pBroom->Set_Ride(true);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
@@ -986,44 +1071,100 @@ void CPlayer::Behavior_Broom_RideEnter()
|
||||
HRESULT CPlayer::Behavior_Broom_RideExitCheck()
|
||||
{
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT].first)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_MOUNT_END];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, true);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
/*if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}*/
|
||||
|
||||
if (SUCCEEDED(InputMove()))
|
||||
if (m_pGameInstance->Key_Down(DIK_LSHIFT))
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
else
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE);
|
||||
m_bHoverToggle = !m_bHoverToggle;
|
||||
}
|
||||
if (!m_pFSM->IsEnable(FSMSTATE::DISMOUNT))
|
||||
{
|
||||
if (m_bHoverToggle)
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_FWD);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_LEFT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_RIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_HOVER_IDLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_FWD);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_LEFT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_RIGHT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_LCONTROL))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DOWN);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_SPACE))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_UP);
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_FWD);
|
||||
}
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_N)) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DISMOUNT);
|
||||
m_pFSM->Enable_State(FSMSTATE::DISMOUNT);
|
||||
m_pBroom->Set_Ride(false);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_DISMOUNT].first)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_Broom_RideExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE);
|
||||
m_pFSM->Disable_State(FSMSTATE::BROOM_RIDE | FSMSTATE::DISMOUNT);
|
||||
}
|
||||
|
||||
void CPlayer::Player_InterpTurn(_float fTimeDelta)
|
||||
@@ -1050,6 +1191,8 @@ void CPlayer::Player_InterpTurn(_float fTimeDelta)
|
||||
|
||||
_float degree = XMConvertToDegrees(angle);
|
||||
|
||||
GUI::Text("Degree: %.3f", degree);
|
||||
|
||||
_vector xmvInput = XMVectorZero();
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
@@ -1185,33 +1328,57 @@ void CPlayer::Add_FSM()
|
||||
|
||||
#pragma region Behavior_Broom_Ride
|
||||
{
|
||||
|
||||
CState_Broom_Ride::STATE_BROOM_RIDE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_Broom_RideEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_RideExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_Broom_RideExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
if (m_pFSM->IsEnable(FSMSTATE::DISMOUNT))
|
||||
return;
|
||||
|
||||
if (m_bHoverToggle)
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pBroomTransform->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.03f);
|
||||
m_pBroomTransform->Turn(m_pBroomTransform->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.02f);
|
||||
}
|
||||
_matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
|
||||
_matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
|
||||
|
||||
XMVECTOR Scale, Rot, Trans;
|
||||
_vector Scale, Rot, Trans;
|
||||
|
||||
XMMatrixDecompose(&Scale, &Rot, &Trans, BoneLocal);
|
||||
|
||||
_matrix BoneNoScale = XMMatrixRotationQuaternion(Rot) * XMMatrixTranslationFromVector(Trans);
|
||||
static _float3 OffsetPos = { 0.f, 0.f, 0.f };
|
||||
GUI::DragFloat3("BroomOffset", (_float*)&OffsetPos, 0.01f);
|
||||
_matrix Offset = XMMatrixTranslation(OffsetPos.x,
|
||||
OffsetPos.y, OffsetPos.z);
|
||||
|
||||
m_OffsetPos = { 0.f, 1.09f, 0.f };
|
||||
|
||||
GUI::DragFloat3("BroomOffset", (_float*)&m_OffsetPos, 0.01f);
|
||||
_matrix Offset = XMMatrixTranslation(m_OffsetPos.x,
|
||||
m_OffsetPos.y, m_OffsetPos.z);
|
||||
|
||||
_matrix SocketWorld = BoneNoScale * Offset* BroomWorld;
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(SocketWorld);
|
||||
m_pCharacter_Controller->Set_Position(SocketWorld.r[3]);
|
||||
|
||||
_matrix FixRot = XMMatrixRotationY(XMConvertToRadians(180.f));
|
||||
|
||||
_matrix FinalWorld = FixRot * SocketWorld;
|
||||
|
||||
_vector SourS, SourR, SourT;
|
||||
_vector DestS, DestR, DestT;
|
||||
XMMatrixDecompose(&SourS, &SourR, &SourT, FinalWorld);
|
||||
XMMatrixDecompose(&DestS, &DestR, &DestT, m_pTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
_vector finalS = XMVectorLerp(SourS, DestS,fTimeDelta*0.7f);
|
||||
_vector finalR = XMQuaternionSlerp(SourR,DestR, fTimeDelta * 0.7f);
|
||||
_vector finalT = XMVectorLerp(SourT,DestT, fTimeDelta * 0.7f);
|
||||
|
||||
_matrix finalMat = XMMatrixAffineTransformation(finalS, XMVectorZero(), finalR, finalT);
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(finalMat);
|
||||
m_pCharacter_Controller->Set_Position(FinalWorld.r[3]);
|
||||
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::BROOM_RIDE, CState_Broom_Ride::Create(&Desc));
|
||||
@@ -1267,7 +1434,7 @@ void CPlayer::Set_Anim()
|
||||
m_Animation[STATEANIM::DESCENDO] = { 857,false };
|
||||
m_Animation[STATEANIM::DEPULSO] = { 858,false };
|
||||
m_Animation[STATEANIM::DIFFINDO] = { 862,false };
|
||||
m_Animation[STATEANIM::LUMOS] = { 909,true };
|
||||
m_Animation[STATEANIM::LUMOS] = { 910,true };
|
||||
m_Animation[STATEANIM::LUMOS_STOP] = { 912,false };
|
||||
m_Animation[STATEANIM::DISILLUSION_ENTER] = { 585,false };
|
||||
m_Animation[STATEANIM::DISILLUSION_EXIT] = { 586,false };
|
||||
@@ -1277,13 +1444,23 @@ void CPlayer::Set_Anim()
|
||||
m_Animation[STATEANIM::HIT_L] = { 1124,false };
|
||||
m_Animation[STATEANIM::HIT_R] = { 1125,false };
|
||||
|
||||
m_Animation[STATEANIM::BROOM_IDLE] = { 679,true };
|
||||
m_Animation[STATEANIM::BROOM_FWD] = { 680,true };
|
||||
m_Animation[STATEANIM::BROOM_IDLE] = { 710,true };
|
||||
m_Animation[STATEANIM::BROOM_FWD] = { 711,true };
|
||||
m_Animation[STATEANIM::BROOM_LEFT] = { 713,true };
|
||||
m_Animation[STATEANIM::BROOM_RIGHT] = { 714,true };
|
||||
m_Animation[STATEANIM::BROOM_DOWN] = { 712,true };
|
||||
m_Animation[STATEANIM::BROOM_UP] = { 715,true };
|
||||
|
||||
m_Animation[STATEANIM::BROOM_MOUNT] = { 734,false };
|
||||
m_Animation[STATEANIM::BROOM_MOUNT_END] = { 737,false };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_START] = { 699,false };
|
||||
m_Animation[STATEANIM::BROOM_DISMOUNT] = { 738,false };
|
||||
|
||||
|
||||
m_Animation[STATEANIM::BROOM_HOVER_IDLE] = { 703,true };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_FWD] = { 700,true };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_LEFT] = { 701,true };
|
||||
m_Animation[STATEANIM::BROOM_HOVER_RIGHT] = { 702,true };
|
||||
|
||||
|
||||
m_Animation[STATEANIM::JOG_AIM_STOP_L] = { 295,false };
|
||||
@@ -1291,6 +1468,20 @@ void CPlayer::Set_Anim()
|
||||
m_Animation[STATEANIM::JOG_AIM_STOP_BWD] = { 444,false };
|
||||
|
||||
//루모스 스탑 912
|
||||
|
||||
//713 왼쪽 슬로우
|
||||
//714 오른쪽
|
||||
//712 아래
|
||||
//715 위
|
||||
|
||||
|
||||
|
||||
// 호버 앞 700
|
||||
// 호버 좌 701
|
||||
// 호버 우 702
|
||||
|
||||
//738 착지
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,9 +40,8 @@ HRESULT CPotion::Initialize(void* pArg)
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_vImageSlotPos = _float2(45.f,45.f);
|
||||
m_vImageSize = _float2(32.f,32.f);
|
||||
m_bActive = true;
|
||||
m_vImageSlotPos = _float2(45.f, 45.f);
|
||||
m_vImageSize = _float2(32.f, 32.f);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
#include "pch.h"
|
||||
#include "Skill_Data.h"
|
||||
#include "GameObject.h"
|
||||
#include "UIObject.h"
|
||||
#include "tinyxml2.h"
|
||||
|
||||
;
|
||||
|
||||
CSkill_Data::CSkill_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSkill_Data::CSkill_Data(const CSkill_Data& rhs)
|
||||
:CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Initialize(void* pArg)
|
||||
{
|
||||
auto* pInfo = static_cast<CUIObject::SPELLINFO*>(pArg);
|
||||
|
||||
tinyxml2::XMLDocument doc;
|
||||
tinyxml2::XMLError Error = doc.LoadFile("../Bin/Resources/Data/UI/Spell/SpellInfo.xml");
|
||||
if (Error != tinyxml2::XML_SUCCESS)
|
||||
return E_FAIL;
|
||||
|
||||
tinyxml2::XMLElement* pSpellInfo = doc.FirstChildElement("SpellInfo");
|
||||
if (!pSpellInfo)
|
||||
return E_FAIL;
|
||||
|
||||
tinyxml2::XMLElement* pSpell = pSpellInfo->FirstChildElement("Spell");
|
||||
while (pSpell)
|
||||
{
|
||||
int id = 0;
|
||||
pSpell->QueryIntAttribute("Spell_ID", &id);
|
||||
|
||||
if (id < 0 || id > 34)
|
||||
{
|
||||
pSpell = pSpell->NextSiblingElement("Spell");
|
||||
continue;
|
||||
}
|
||||
|
||||
pInfo[id].iSpell_ID = id;
|
||||
pInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name"));
|
||||
pInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name"));
|
||||
pSpell->QueryIntAttribute("Spell_Type", &pInfo[id].iSpell_Type);
|
||||
pSpell->QueryIntAttribute("Skill_Type", &pInfo[id].iSkill_Type);
|
||||
pSpell->QueryFloatAttribute("Spell_Cooltime", &pInfo[id].fSpell_CoolTime);
|
||||
pSpell->QueryFloatAttribute("Duration", &pInfo[id].fDuration);
|
||||
pSpell->QueryIntAttribute("AnimNum", &pInfo[id].iAnimNum);
|
||||
pInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo"));
|
||||
int lock = 0, equip = 0;
|
||||
pSpell->QueryIntAttribute("Spell_Lock", &lock);
|
||||
pSpell->QueryIntAttribute("Equip_Spell", &equip);
|
||||
pInfo[id].bSpell_Lock = lock != 0;
|
||||
pInfo[id].bEquip_Spell = equip != 0;
|
||||
|
||||
pSpell = pSpell->NextSiblingElement("Spell");
|
||||
}
|
||||
|
||||
//pInfo = SpellInfo;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//const CUIObject::SPELLINFO& CSkill_Data::Get_Info(_uint SpellID) const
|
||||
//{
|
||||
// return SpellInfo[SpellID];
|
||||
//}
|
||||
|
||||
void CSkill_Data::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CSkill_Data::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CSkill_Data::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSkill_Data::Get_WorldPostion()
|
||||
{
|
||||
return _vector();
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSkill_Data::Ready_Components(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSkill_Data* CSkill_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSkill_Data* pInstance = new CSkill_Data(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSkill_Data");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSkill_Data::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSkill_Data* pInstance = new CSkill_Data(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSkill_Data");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSkill_Data::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
}
|
||||
|
||||
void CSkill_Data::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Anim.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_Anim::CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Anim::CSpell_Anim(const CSpell_Anim& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Anim::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Anim::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 590.f;
|
||||
Desc.fY = -100.f;
|
||||
Desc.fSizeX = 470.f;
|
||||
Desc.fSizeY = 250.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 9.f;
|
||||
m_fSortZ = 0.01f;
|
||||
m_iTotalFrames = 120;
|
||||
m_fFrameTime = 0.1f;
|
||||
m_iCurrentFrame = 0;
|
||||
m_bAnim_Start = false;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Anim::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Anim::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
m_bAnim_Start = false;
|
||||
}
|
||||
|
||||
|
||||
if (m_bAnim_Start == true)
|
||||
{
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iCurrentFrame = 0;
|
||||
}
|
||||
|
||||
if (m_fTime >= m_fFrameTime)
|
||||
{
|
||||
m_iCurrentFrame++;
|
||||
m_fTime -= m_fFrameTime;
|
||||
|
||||
if (m_iCurrentFrame >= m_iTotalFrames)
|
||||
m_iCurrentFrame = 0;
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Anim::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
if (m_pDiffuse_TextureCom != nullptr)
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Anim::Render()
|
||||
{
|
||||
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Anim::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_Anim::Set_FadeIn()
|
||||
{
|
||||
if (!m_bFadeIn && m_fAlpha < 1.f)
|
||||
{
|
||||
m_bFadeIn = true;
|
||||
m_bFadeOut = false;
|
||||
}
|
||||
m_bAnim_Start = true;
|
||||
}
|
||||
|
||||
void CSpell_Anim::Change_Image(_int SpellID)
|
||||
{
|
||||
_wstring pImageName = static_cast<CUIObject*>(m_pOwner)->Get_Info(SpellID).pImage_Name;
|
||||
m_iTotalFrames = static_cast<CUIObject*>(m_pOwner)->Get_Info(SpellID).iAnimNum;
|
||||
if (m_pDiffuse_TextureCom)
|
||||
{
|
||||
Remove_Component<CTexture>();
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
}
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, pImageName, reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom))))
|
||||
return;
|
||||
}
|
||||
|
||||
void CSpell_Anim::Set_SkillType(_int eType)
|
||||
{
|
||||
if (eType != -1 && eType != m_iPerSpell)
|
||||
{
|
||||
m_iPerSpell = eType;
|
||||
m_iCurrentFrame = 0;
|
||||
Change_Image(eType);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpell_Anim::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", m_iCurrentFrame)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Anim::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Arresto_Momentum"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
CSpell_Anim* CSpell_Anim::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Anim* pInstance = new CSpell_Anim(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Anim");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Anim::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Anim* pInstance = new CSpell_Anim(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Anim");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Anim::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Anim::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,138 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Canvas.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Spell_Panel.h"
|
||||
|
||||
CSpell_Canvas::CSpell_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CCanvasObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Canvas::CSpell_Canvas(const CSpell_Canvas& rhs)
|
||||
:CCanvasObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Canvas::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Canvas::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 1920.f;
|
||||
Desc.fSizeY = 1080.f;
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Panel(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Canvas::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Canvas::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Canvas::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible) {
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Canvas::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Canvas::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Canvas::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Canvas::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Canvas::Ready_Panel(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CSpell_Panel**>(&m_pSpell_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("Spell_Panel"), m_pSpell_Panel);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Canvas::Clear_Penel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CSpell_Canvas* CSpell_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Canvas* pInstance = new CSpell_Canvas(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Canvas");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Canvas::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Canvas* pInstance = new CSpell_Canvas(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Canvas");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Canvas::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Canvas::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,239 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Header.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_Header::CSpell_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Header::CSpell_Header(const CSpell_Header& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = -385.f;
|
||||
Desc.fSizeX = 512.f;
|
||||
Desc.fSizeY = 64.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_fMoveSpeed = 5.f;
|
||||
m_fLerpX = m_fX;
|
||||
m_fLerpY = 45;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Header::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Header::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
{
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
}
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_iSpellType != -1)
|
||||
{
|
||||
m_iSkillType = static_cast<CUIObject*>(m_pOwner)->Get_Info(m_iSpellType).iSpell_Type;
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Header::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELL_HEADER)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Header::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSkillType, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_LighthouseHeaderBack"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_Header* CSpell_Header::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Header* pInstance = new CSpell_Header(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Header");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Header::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Header* pInstance = new CSpell_Header(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Header");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Header::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Header::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,225 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Header_Line.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_Header_Line::CSpell_Header_Line(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Header_Line::CSpell_Header_Line(const CSpell_Header_Line& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header_Line::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header_Line::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = -345.f;
|
||||
Desc.fSizeX = 487.f;
|
||||
Desc.fSizeY = 18.f;
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Header_Line::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Header_Line::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
{
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
}
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Header_Line::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header_Line::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Header_Line::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header_Line::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header_Line::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Header_Line"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_Header_Line* CSpell_Header_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Header_Line* pInstance = new CSpell_Header_Line(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Header_Line");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Header_Line::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Header_Line* pInstance = new CSpell_Header_Line(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Header");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Header_Line::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Header_Line::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,302 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Hover.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_Hover::CSpell_Hover(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Hover::CSpell_Hover(const CSpell_Hover& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 105.f;
|
||||
Desc.fSizeY = 105.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fOffSetX = 120.f;
|
||||
m_fOffSetY = 122.f;
|
||||
m_iCols = 4;
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Hover::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Hover::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_pVIBufferCom->Set_Hover_Index(m_iSpellType);
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Hover::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::SPELL_HOVER))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Hover::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_Hover::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CSpell_Hover::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_Hover::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom3->Bind_ShaderResource(m_pShaderCom, "g_Texture3", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom4->Bind_ShaderResource(m_pShaderCom, "g_Texture4", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom5->Bind_ShaderResource(m_pShaderCom, "g_Texture5", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_IconButtonOutline"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_IconButtonHighlight"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_GoldLeaf"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Goldleaf_Large"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom3), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_IconButton"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom4), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SelectedPresetBorder"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom5), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_Hover* CSpell_Hover::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Hover* pInstance = new CSpell_Hover(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Hover");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Hover::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Hover* pInstance = new CSpell_Hover(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Hover");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Hover::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom3);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom4);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom5);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Hover::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,266 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Hover_Effect.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_Hover_Effect::CSpell_Hover_Effect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Hover_Effect::CSpell_Hover_Effect(const CSpell_Hover_Effect& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover_Effect::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover_Effect::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 115.f;
|
||||
Desc.fSizeY = 115.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fOffSetX = 120.f;
|
||||
m_fOffSetY = 122.f;
|
||||
m_iCols = 4;
|
||||
m_fSortZ = 0.02f;
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Hover_Effect::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Hover_Effect::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
m_pVIBufferCom->Set_Hover_Index(m_iSpellType);
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Hover_Effect::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover_Effect::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::SPELL_SLOT_EFFECT))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Hover_Effect::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_Hover_Effect::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CSpell_Hover_Effect::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_Hover_Effect::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover_Effect::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_MaskTexture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CSpell_Hover_Effect::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SelectedBorderMask"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_VFX_T_WhispLine_D"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_Hover_Effect* CSpell_Hover_Effect::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Hover_Effect* pInstance = new CSpell_Hover_Effect(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Hover_Effect");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Hover_Effect::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Hover_Effect* pInstance = new CSpell_Hover_Effect(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Hover_Effect");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Hover_Effect::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Hover_Effect::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,304 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_List.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_List::CSpell_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_List::CSpell_List(const CSpell_List& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_List::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_List::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 105.f;
|
||||
Desc.fSizeY = 105.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fOffSetX = 120.f;
|
||||
m_fOffSetY = 122.f;
|
||||
m_iCols = 4;
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_fDelayTime = 0.5f;
|
||||
m_iPerSpell_Slot = -1;
|
||||
Color();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_List::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_List::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
Hover(fTimeDelta);
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_List::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CSpell_List::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::COLOR))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_List::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_List::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CSpell_List::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_List::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_List::Color()
|
||||
{
|
||||
m_pVIBufferCom->Set_Index_Renge_Color(0, 3, _float4(255.f / 255.f, 255.f / 255.f, 0.f / 255.f, 1.f));
|
||||
m_pVIBufferCom->Set_Index_Renge_Color(4, 7, _float4(150.f / 255.f, 120.f / 255.f, 240.f / 255.f, 1.f));
|
||||
m_pVIBufferCom->Set_Index_Renge_Color(8, 12, _float4(190.f / 255.f, 46.f / 255.f, 34.f / 255.f, 1.f));
|
||||
m_pVIBufferCom->Set_Index_Renge_Color(13, 16, _float4(24.f / 255.f, 190.f / 255.f, 255.f / 255.f, 1.f));
|
||||
m_pVIBufferCom->Set_Index_Renge_Color(17, 19, _float4(200.f / 255.f, 220.f / 255.f, 150.f / 255.f, 1.f));
|
||||
m_pVIBufferCom->Set_Index_Renge_Color(20, 22, _float4(50.f / 255.f, 150.f / 255.f, 110.f / 255.f, 1.f));
|
||||
m_pVIBufferCom->Set_Index_Renge_Color(23, 25, _float4(24.f / 255.f, 190.f / 255.f, 255.f / 255.f, 1.f));
|
||||
}
|
||||
|
||||
void CSpell_List::Hover(_float fTimeDelta)
|
||||
{
|
||||
POINT ptMouse{};
|
||||
GetCursorPos(&ptMouse);
|
||||
ScreenToClient(g_hWnd, &ptMouse);
|
||||
_float2 fMouse;
|
||||
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
|
||||
fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f));
|
||||
|
||||
// 엘리먼트의 월드 위치를 더해주면 엘리먼트 좌표계 기준이 됨
|
||||
fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0];
|
||||
fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1];
|
||||
|
||||
m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
|
||||
CUIObject::HOVER_INFO Info;
|
||||
Info.iSlotID = 0;
|
||||
if (m_iSpellType == -1)
|
||||
{
|
||||
Info.iHover_Index = -1;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Hover"), &Info);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Info.iHover_Index = m_iSpellType;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Hover"), &Info);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
HRESULT CSpell_List::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_List::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SpellType_Generic"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_List* CSpell_List::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_List* pInstance = new CSpell_List(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_List");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_List::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_List* pInstance = new CSpell_List(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_List");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_List::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_List::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,288 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_List_Image.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_List_Image::CSpell_List_Image(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_List_Image::CSpell_List_Image(const CSpell_List_Image& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_List_Image::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_List_Image::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeY = 90.f;
|
||||
Desc.fSizeX = 90.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fOffSetX = 120.f;
|
||||
m_fOffSetY = 122.f;
|
||||
m_iCols = 4;
|
||||
UV();
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_pVIBufferCom->Set_ImageUV(pUVDesc);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_List_Image::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_List_Image::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_List_Image::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpell_List_Image::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::EESSENTIAL_SPELL))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_List_Image::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_List_Image::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CSpell_List_Image::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_List_Image::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_List_Image::UV()
|
||||
{
|
||||
for (_uint i = 0; i < 26; ++i)
|
||||
{
|
||||
pUVDesc[i].fUV = Meter_Index(i);
|
||||
}
|
||||
}
|
||||
|
||||
_float4 CSpell_List_Image::Meter_Index(_uint Number)
|
||||
{
|
||||
_float2 fImage_Size = { 1024.f, 1792.f };
|
||||
|
||||
_uint iCountX = 4;
|
||||
_uint iCountY = 7;
|
||||
|
||||
_float iImageX = 256.f;
|
||||
_float iImageY = 256.f;
|
||||
|
||||
_uint iframeX = Number % iCountX;
|
||||
_uint iframeY = Number / iCountX;
|
||||
|
||||
_float2 UVStart;
|
||||
UVStart.x = iframeX * iImageX / fImage_Size.x;
|
||||
UVStart.y = iframeY * iImageY / fImage_Size.y;
|
||||
|
||||
_float2 UVEnd;
|
||||
UVEnd.x = UVStart.x + (iImageX / fImage_Size.x);
|
||||
UVEnd.y = UVStart.y + (iImageY / fImage_Size.y);
|
||||
|
||||
_float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y };
|
||||
return UV;
|
||||
}
|
||||
|
||||
HRESULT CSpell_List_Image::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_List_Image::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List_Image"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Atlas_Widget_Spell"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_List_Image* CSpell_List_Image::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_List_Image* pInstance = new CSpell_List_Image(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_List_Image");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_List_Image::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_List_Image* pInstance = new CSpell_List_Image(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_List_Image");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_List_Image::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_List_Image::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,349 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Panel.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Current_Spell_Slot.h"
|
||||
#include "Spell_List.h"
|
||||
#include "Eessential_Spell_Slot.h"
|
||||
#include "Eessential_Spell.h"
|
||||
#include "Spell_List_Image.h"
|
||||
#include "Spell_State.h"
|
||||
#include "Spell_Hover.h"
|
||||
#include "Spell_Hover_Effect.h"
|
||||
#include "Spell_Preview.h"
|
||||
#include "Spell_Vidio_Border.h"
|
||||
#include "Current_Slot_Number.h"
|
||||
#include "Spell_Header.h"
|
||||
#include "Spell_Header_Line.h"
|
||||
//#include "Spell_Data.h"
|
||||
#include "Spell_Anim.h"
|
||||
|
||||
CSpell_Panel::CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Panel::CSpell_Panel(const CSpell_Panel& rhs)
|
||||
:CPanelObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Panel::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Panel::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 960.f;
|
||||
Desc.fY = 540.f;
|
||||
Desc.fSizeX = g_iWinSizeX;
|
||||
Desc.fSizeY = g_iWinSizeY;
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Element(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
m_fCanvasAlpha = 1.f;
|
||||
m_fSortZ = 0.04f;
|
||||
m_iSpellType = -1;
|
||||
m_iPendingSpell = -1;
|
||||
m_fDelayTime = 1.f;
|
||||
Add_Function(TEXT("Hover"), [this](void* p) {this->Slot_Chack(p); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_iSpellType != -1)
|
||||
{
|
||||
m_fHoverTimer += fTimeDelta;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fHoverTimer = 0.f;
|
||||
Function_Callback(TEXT("FadeOut"));
|
||||
}
|
||||
|
||||
if (m_fHoverTimer >= m_fDelayTime && m_iPendingSpell != m_iSpellType)
|
||||
{
|
||||
m_iPendingSpell = m_iSpellType;
|
||||
Function_Callback(TEXT("FadeIn"));
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Panel::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpell_Panel::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Panel::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
const CUIObject::SPELLINFO CSpell_Panel::Get_Info(_int Index)
|
||||
{
|
||||
return m_Info[Index];
|
||||
}
|
||||
|
||||
void CSpell_Panel::Slot_Chack(void* pArg)
|
||||
{
|
||||
CUIObject::HOVER_INFO* Info = static_cast<CUIObject::HOVER_INFO*>(pArg);
|
||||
|
||||
_int iSlot = Info->iSlotID;
|
||||
m_iHoverSlot[iSlot] = Info->iHover_Index;
|
||||
|
||||
int finalHover = -1;
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (m_iHoverSlot[i] != -1)
|
||||
{
|
||||
finalHover = m_iHoverSlot[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_iSpellType = finalHover;
|
||||
Function_Callback(TEXT("Slot_Hover"), &m_iSpellType);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Panel::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Spell_Widget"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCurrent_Spell_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CCurrent_Spell_Slot**>(&m_pCurrent_Spell_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Current_Spell_Slot"), m_pCurrent_Spell_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_List>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_List**>(&m_pSpell_List))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_List"), m_pSpell_List);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEessential_Spell_Slot>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CEessential_Spell_Slot**>(&m_pEessential_Spell_Slot))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Eessential_Spell_Slot"), m_pEessential_Spell_Slot);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEessential_Spell>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CEessential_Spell**>(&m_pEessential_Spell))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Eessential_Spell"), m_pEessential_Spell);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_List_Image>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_List_Image**>(&m_pSpell_List_Image))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_List_Image"), m_pSpell_List_Image);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_State>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_State**>(&m_pSpell_State))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_State"), m_pSpell_State);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Hover>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Hover**>(&m_pSpell_Hover))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Hover"), m_pSpell_Hover);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Hover_Effect>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Hover_Effect**>(&m_pSpell_Hover_Effect))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Hover_Effect"), m_pSpell_Hover_Effect);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Preview>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Preview**>(&m_pSpell_Preview))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Preview"), m_pSpell_Preview);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Vidio_Border>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Vidio_Border**>(&m_pSpell_Vidio_Border))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Vidio_Border"), m_pSpell_Vidio_Border);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCurrent_Slot_Number>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CCurrent_Slot_Number**>(&m_pCurrent_Slot_Number))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Current_Slot_Number"), m_pCurrent_Slot_Number);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header**>(&m_pSpell_Header))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Header"), m_pSpell_Header);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header_Line>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header_Line**>(&m_pSpell_Header_Line))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Header_Line"), m_pSpell_Header_Line);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Anim>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Anim**>(&m_pSpell_Anim))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Anim"), m_pSpell_Anim);
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Data>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, m_Info, nullptr, reinterpret_cast<CSpell_Data**>(&m_pSpell_Data))))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_Panel* CSpell_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Panel* pInstance = new CSpell_Panel(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Panel::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Panel* pInstance = new CSpell_Panel(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Panel::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Panel::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,288 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Preview.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
|
||||
CSpell_Preview::CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Preview::CSpell_Preview(const CSpell_Preview& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Preview::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Preview::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 400.f;
|
||||
Desc.fY = -365.f;
|
||||
Desc.fSizeX = 128.f;
|
||||
Desc.fSizeY = 128.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
// y값 최소 270 최대 410
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f);
|
||||
m_fTopY = m_fY - m_vScale.y * 0.5f;
|
||||
SizeUpX(512.f);
|
||||
SizeUpY(270.f);
|
||||
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
|
||||
m_fSortZ = 0.02f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Preview::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Preview::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Preview::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpell_Preview::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELL_PREVIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Preview::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_Preview::SizeUpX(_float fSizeX)
|
||||
{
|
||||
_float fX = (fSizeX - m_vScale.x) * 0.5f;
|
||||
m_fSizeX = fSizeX;
|
||||
m_fX += fX;
|
||||
m_fLerpX += fX;
|
||||
|
||||
}
|
||||
|
||||
void CSpell_Preview::SizeUpY(_float fSizeY)
|
||||
{
|
||||
_float prevY = m_fY;
|
||||
m_fSizeY = fSizeY;
|
||||
m_fY = m_fTopY + fSizeY * 0.5f;
|
||||
|
||||
_float deltaY = m_fY - prevY;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CSpell_Preview::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vHeaderBack, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Preview::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_SpellWidgetPanelBack"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Goldleaf_Large"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_TooltipBorder_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom2), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_LighthouseHeaderBack"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom3), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_Preview* CSpell_Preview::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Preview* pInstance = new CSpell_Preview(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Preview");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Preview::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Preview* pInstance = new CSpell_Preview(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Preview");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Preview::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom2);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom3);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Preview::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -197,7 +197,7 @@ HRESULT CSpell_Slot::Bind_ShaderResources()
|
||||
|
||||
HRESULT CSpell_Slot::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Instance"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_Slot"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,271 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_State.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_State::CSpell_State(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_State::CSpell_State(const CSpell_State& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_State::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_State::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 105.f;
|
||||
Desc.fSizeY = 105.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fOffSetX = 120.f;
|
||||
m_fOffSetY = 122.f;
|
||||
m_iCols = 4;
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_State::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_State::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
Hover();
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_State::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpell_State::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIINTANCE::ALPHABLEND))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_State::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_State::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CSpell_State::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_State::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_State::Hover()
|
||||
{
|
||||
POINT ptMouse{};
|
||||
GetCursorPos(&ptMouse);
|
||||
ScreenToClient(g_hWnd, &ptMouse);
|
||||
_float2 fMouse;
|
||||
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
|
||||
fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f));
|
||||
|
||||
// 엘리먼트의 월드 위치를 더해주면 엘리먼트 좌표계 기준이 됨
|
||||
fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0];
|
||||
fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1];
|
||||
|
||||
m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
|
||||
}
|
||||
|
||||
HRESULT CSpell_State::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_State::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Spell_List"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_NewLock"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_State* CSpell_State::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_State* pInstance = new CSpell_State(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_State");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_State::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_State* pInstance = new CSpell_State(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_State");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_State::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_State::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -184,7 +184,7 @@ HRESULT CSpell_UI::Render()
|
||||
|
||||
_vector CSpell_UI::Get_WorldPostion()
|
||||
{
|
||||
return m_pOwner->Get_WorldPostion();
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpell_UI::Bind_ShaderResources()
|
||||
|
||||
@@ -0,0 +1,244 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Vidio_Border.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Spell_Anim.h"
|
||||
|
||||
CSpell_Vidio_Border::CSpell_Vidio_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_Vidio_Border::CSpell_Vidio_Border(const CSpell_Vidio_Border& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_Vidio_Border::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Vidio_Border::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 590.f;
|
||||
Desc.fY = -100.f;
|
||||
Desc.fSizeX = 520.f;
|
||||
Desc.fSizeY = 275.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 9.f;
|
||||
m_fMoveSpeed = 5.f;
|
||||
m_fLerpX = m_fX;
|
||||
m_fLerpY = 45;
|
||||
m_bStart = false;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Vidio_Border::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Vidio_Border::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_bStart = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
if (m_fAlpha >= 0.3f)
|
||||
m_bStart = true;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CSpell_Vidio_Border::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Vidio_Border::Render()
|
||||
{
|
||||
if (m_bStart == true)
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_Vidio_Border::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Vidio_Border::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Vidio_Border::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_TalentVideoBorder"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpell_Vidio_Border* CSpell_Vidio_Border::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_Vidio_Border* pInstance = new CSpell_Vidio_Border(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_Vidio_Border");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_Vidio_Border::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_Vidio_Border* pInstance = new CSpell_Vidio_Border(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Vidio_Border");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_Vidio_Border::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CSpell_Vidio_Border::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -16,24 +16,27 @@ void CStreetContainer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Priority_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CStreetContainer::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CStreetContainer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects)
|
||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||
pCollisiton->Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CStreetContainer::Render()
|
||||
@@ -109,8 +112,9 @@ void CStreetContainer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& pCollision : m_ColiisonPartObjects)
|
||||
for (auto& pCollision : m_ColiisonPartObjects){
|
||||
SAFE_RELEASE(pCollision);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -0,0 +1,324 @@
|
||||
#include "pch.h"
|
||||
#include "Troll.h"
|
||||
|
||||
#include "Troll_Weapon.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_Dodge.h"
|
||||
#include "State_Jump.h"
|
||||
#include "State_Land.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#pragma endregion
|
||||
|
||||
CTroll::CTroll(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMonster(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CTroll::CTroll(const CTroll& Prototype)
|
||||
: CMonster(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CTroll::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CTroll::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(30.f, 10.f, 30.f, 1.f));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CTroll::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
if (true == m_pCharacter_Controller->IsActive()) {
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_vStunTimer.x = 0.f;
|
||||
}
|
||||
else {
|
||||
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
|
||||
|
||||
}
|
||||
|
||||
void CTroll::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Late_Update(fTimeDelta);
|
||||
if (true == m_pCharacter_Controller->IsActive()) {
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
}
|
||||
else {
|
||||
m_pTransformCom->Set_WorldMatrix(m_pRigidBody->Get_Actor()->getGlobalPose());
|
||||
}
|
||||
|
||||
m_pTransformCom->LookAt_Horizontal(XMLoadFloat4(&m_vTargetPos));
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CTroll::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
_uint iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT);
|
||||
if (true == m_bDrawOutLine) {
|
||||
iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::OUTLINE_WRITE);
|
||||
}
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(iShaderPass))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (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
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
_vector vWorldPos = {}; // 접촉지점
|
||||
_vector vWorldNomal = {}; // 접촉노말
|
||||
_vector vHitDir = {}; // 시도한 move 방향
|
||||
_float fLength = {}; // 작용된 힘
|
||||
|
||||
m_pCharacter_Controller->ConvertToDO(*m_pRigidBody);
|
||||
m_pRigidBody->Add_Force(vHitDir * fLength * 100.f, PSX::PxForceMode::eIMPULSE);
|
||||
|
||||
}
|
||||
|
||||
void CTroll::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CTroll::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_Troll_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::TROLL);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.1f;
|
||||
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.05f };
|
||||
Desc.fRadius = 1.2f;
|
||||
Desc.fHeight = 1.5f;
|
||||
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;
|
||||
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::TROLL);
|
||||
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());
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CTroll::Ready_Parts()
|
||||
{
|
||||
CTroll_Weapon::TROLLWEAPON_DESC Troll_WeaponDesc{};
|
||||
|
||||
Troll_WeaponDesc.pParentTransform = m_pTransformCom;
|
||||
Troll_WeaponDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||
|
||||
if (FAILED(Add_PartObject<CTroll_Weapon>("Troll_Weapon", g_iStaticLevel, nullptr, &Troll_WeaponDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CTroll::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;
|
||||
}
|
||||
|
||||
CTroll* CTroll::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CTroll* pInstance = new CTroll(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CTroll");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CTroll::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CTroll* pInstance = new CTroll(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CTroll");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CTroll::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);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CTroll::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Troll");
|
||||
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
|
||||
GUI::End();
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,190 @@
|
||||
#include "pch.h"
|
||||
#include "Troll.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Player.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_Dodge.h"
|
||||
#include "State_Jump.h"
|
||||
#include "State_Land.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#pragma endregion
|
||||
|
||||
|
||||
void CTroll::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 CTroll::Behavior_IdleExitCheck()
|
||||
{
|
||||
if (m_fTargetDistance <= 15.f)
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_IdleExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
void CTroll::Behavior_MoveEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
|
||||
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
||||
m_pFSM->Enable_State(FSMSTATE::JOG);
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CTroll::Behavior_MoveExitCheck()
|
||||
{
|
||||
if (m_fTargetDistance <= 7.f &&m_fTargetDistance !=0.f)
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_MoveExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK);
|
||||
}
|
||||
|
||||
void CTroll::Behavior_CombatEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
|
||||
m_pFSM->Enable_State(FSMSTATE::COMBAT);
|
||||
|
||||
m_pFSM->Enable_State(FSMSTATE::SKILL2);
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::SKILL2];
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CTroll::Behavior_CombatExitCheck()
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_CombatExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SKILL | FSMSTATE::SKILL2);
|
||||
}
|
||||
|
||||
|
||||
void CTroll::Add_FSM()
|
||||
{
|
||||
#pragma region Behavior_Movement_NotFocus
|
||||
{
|
||||
CState_Idle::STATE_IDLE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_IdleEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_IdleExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
|
||||
}
|
||||
{
|
||||
CState_Move::STATE_MOVE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D)) { m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); };
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma region Behavior_Combat_NotFocus
|
||||
{
|
||||
CState_Combat::STATE_COMBAT_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_CombatEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_CombatExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_CombatExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::COMBAT, CState_Combat::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma region Behavior_Combat_Focus
|
||||
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
|
||||
void CTroll::Set_Anim()
|
||||
{
|
||||
m_Animation[STATEANIM::IDLE] = { 16,true };
|
||||
|
||||
m_Animation[STATEANIM::WALK_FWD] = { 22,true };
|
||||
|
||||
m_Animation[STATEANIM::JOG_FWD] = { 103,true };
|
||||
|
||||
m_Animation[STATEANIM::DODGE_LEFT] = { 125, false };
|
||||
m_Animation[STATEANIM::DODGE_RIGHT] = { 126, false };
|
||||
m_Animation[STATEANIM::SPRINT] = { 90, true };
|
||||
|
||||
m_Animation[STATEANIM::SKILL] = { 70,false };
|
||||
m_Animation[STATEANIM::SKILL2] = { 66,false }; // 도끼 찍기
|
||||
|
||||
m_Animation[STATEANIM::HIT_FWD] = { 353, false };
|
||||
m_Animation[STATEANIM::HIT_BWD] = { 167, false }; //
|
||||
m_Animation[STATEANIM::HIT_BWD2] = { 168, false }; //
|
||||
m_Animation[STATEANIM::HIT_BWD3] = { 169, false }; //
|
||||
m_Animation[STATEANIM::HIT_BWD4] = { 351, false };
|
||||
m_Animation[STATEANIM::HIT_L] = { 354, false };
|
||||
m_Animation[STATEANIM::HIT_R] = { 355, false };
|
||||
|
||||
m_Animation[STATEANIM::KNOCKDOWN_BWD] = { 165, false }; //
|
||||
m_Animation[STATEANIM::KNOCKDOWN_BWD_SPLT] = { 375, false };
|
||||
m_Animation[STATEANIM::KNOCKDOWN_BWD_SPLT_HOLD] = { 370, false };
|
||||
m_Animation[STATEANIM::KNOCKDOWN_FWD] = { 371, false };
|
||||
m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT] = { 372, false };
|
||||
m_Animation[STATEANIM::KNOCKDOWN_FWD_SPLT_HOLD] = { 373, false };
|
||||
|
||||
m_Animation[STATEANIM::GETUP_BWD] = { 330, false };
|
||||
m_Animation[STATEANIM::GETUP_FWD] = { 332, false };
|
||||
m_Animation[STATEANIM::GETUP_L] = { 334, false };
|
||||
m_Animation[STATEANIM::GETUP_L_FD] = { 336, false };
|
||||
m_Animation[STATEANIM::GETUP_L_FU] = { 338, false };
|
||||
m_Animation[STATEANIM::GETUP_R] = { 340, false };
|
||||
m_Animation[STATEANIM::GETUP_R_FD] = { 342, false };
|
||||
m_Animation[STATEANIM::GETUP_R_FU] = { 344, false };
|
||||
m_Animation[STATEANIM::GETUP_SLOUCH] = { 346, false };
|
||||
|
||||
m_Animation[STATEANIM::KNOCKBACK] = { 377, true };
|
||||
m_Animation[STATEANIM::KNOCKBACK2] = { 378, true };
|
||||
m_Animation[STATEANIM::TUMBLE] = { 379, true };
|
||||
m_Animation[STATEANIM::TUMBLE2] = { 380, true };
|
||||
m_Animation[STATEANIM::PETRIFICUSED_START] = { 383, false };
|
||||
|
||||
m_Animation[STATEANIM::DEAD_BWD] = { 317, false };
|
||||
m_Animation[STATEANIM::DEAD_BWD2] = { 318, false };
|
||||
m_Animation[STATEANIM::DEAD_FWD] = { 319, false };
|
||||
m_Animation[STATEANIM::DEAD_FWD2] = { 320, false };
|
||||
m_Animation[STATEANIM::DEAD_L] = { 321, false };
|
||||
m_Animation[STATEANIM::DEAD_L2] = { 322, false };
|
||||
m_Animation[STATEANIM::DEAD_R] = { 323, false };
|
||||
m_Animation[STATEANIM::DEAD_R2] = { 324, false };
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
#include "pch.h"
|
||||
#include "Troll_Weapon.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "TrailObject.h"
|
||||
#include "EffectParts.h"
|
||||
|
||||
CTroll_Weapon::CTroll_Weapon(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CPartObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CTroll_Weapon::CTroll_Weapon(const CTroll_Weapon& Prototype)
|
||||
: CPartObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CTroll_Weapon::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CTroll_Weapon::Initialize(void* pArg)
|
||||
{
|
||||
TROLLWEAPON_DESC* pDesc = static_cast<TROLLWEAPON_DESC*> (pArg);
|
||||
m_pSocketMatrices = pDesc->pSocketMatrices;
|
||||
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll_Weapon::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
_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()));
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CTroll_Weapon::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Combined_BoneMatrix();
|
||||
|
||||
}
|
||||
|
||||
void CTroll_Weapon::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CTroll_Weapon::Render()
|
||||
{
|
||||
if (!m_pModelCom)
|
||||
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->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CTroll_Weapon::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Troll_Weapon_Model"),
|
||||
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 CTroll_Weapon::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
CTroll_Weapon* CTroll_Weapon::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CTroll_Weapon* pInstance = new CTroll_Weapon(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CTroll_Weapon");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CTroll_Weapon::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CTroll_Weapon* pInstance = new CTroll_Weapon(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CTroll_Weapon");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CTroll_Weapon::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CTroll_Weapon::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -98,8 +98,8 @@ HRESULT CWand::Render()
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGripShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Green, nullptr, true);
|
||||
m_pSubShape->Draw(XMLoadFloat4x4(&m_pWandTipMatrix), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Purple, nullptr, true);
|
||||
//m_pGripShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Green, nullptr, true);
|
||||
//m_pSubShape->Draw(XMLoadFloat4x4(&m_pWandTipMatrix), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Purple, nullptr, true);
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -32,7 +32,7 @@ class CBombard final : public CEffect_Container
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CPartObject* m_pLight_Projectile = {};
|
||||
class CEffectParts* m_pLight_Projectile = {};
|
||||
_vector m_vCameraLook = {};
|
||||
public:
|
||||
static CBombard* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBombardSide final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CBombardSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBombardSide(const CBombardSide& rhs);
|
||||
virtual ~CBombardSide() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
class CEffectParts* m_pWandLight = { nullptr };
|
||||
class CTrailObject* m_pWandTrail = { nullptr };
|
||||
class CEffectParts* m_pWandParticle = { nullptr };
|
||||
|
||||
public:
|
||||
static CBombardSide* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -19,14 +19,34 @@ class CBroom final : public CUnit
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
void Set_Ride(_bool bRide) { m_bRide = bRide; }
|
||||
|
||||
private:
|
||||
_bool m_bSprintToggle = { false };
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
_bool m_bHoverToggle = { true };
|
||||
_bool m_bWalkToggle = { false };
|
||||
|
||||
_bool m_bRide = {false};
|
||||
|
||||
_float m_fSpeed = 0.f;
|
||||
_float m_fTurnSpeed = 0.f;
|
||||
_float m_fTargetSpeed = 0.f;
|
||||
_float m_fTurnMaxSpeed = 7.f;
|
||||
_float m_fFlyMaxSpeed = 15.f;
|
||||
_float m_fHoverMaxSpeed = 7.f;
|
||||
_float m_fAccel = 1.f;
|
||||
_float m_fDecel = 1.f;
|
||||
_float m_fTurnDecel = 0.3f;
|
||||
|
||||
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
|
||||
_float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
void Update_CameraCoordinateSystem();
|
||||
|
||||
public:
|
||||
static CBroom* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
@@ -36,6 +56,7 @@ class CBroom final : public CUnit
|
||||
#endif // _DEBUG
|
||||
|
||||
#pragma region STATE
|
||||
void Camera_InterpTurn(_float fTimeDelta);
|
||||
virtual void Add_FSM();
|
||||
virtual void Set_Anim();
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ class CCallBack_Playable_HitReport final : public PSX::PxUserControllerHitReport
|
||||
public:
|
||||
~CCallBack_Playable_HitReport();
|
||||
|
||||
void BeginFrame();
|
||||
|
||||
public:
|
||||
// PxUserControllerHitReport을(를) 통해 상속됨
|
||||
// 충돌알림!!
|
||||
@@ -28,14 +30,21 @@ class CCallBack_Playable_HitReport final : public PSX::PxUserControllerHitReport
|
||||
|
||||
virtual void onObstacleHit(const PSX::PxControllerObstacleHit& hit) override; // 사용자 정의 장애물과 부딪힌 경우
|
||||
|
||||
void Set_CurrentSlop();
|
||||
|
||||
public:
|
||||
HRESULT Initialize(CCharacter_Controller* pController, CRigidBody_Dynamic* pPartDynamicObject);
|
||||
HRESULT Finalize();
|
||||
_bool IsOnGround();
|
||||
_vector Get_GroundVector();
|
||||
private:
|
||||
CCharacter_Controller* m_pController = { nullptr };
|
||||
CRigidBody_Dynamic* m_pPartDynamicBody = { nullptr };
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
|
||||
_float3 m_vClimbNormal = { 0.f, 1.f, 0.f };
|
||||
_float m_fBestNormal = { 0.f };
|
||||
_bool m_bGroundHit = { false };
|
||||
public:
|
||||
static CCallBack_Playable_HitReport* Create();
|
||||
};
|
||||
|
||||
@@ -34,6 +34,7 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components(void* pArg);
|
||||
HRESULT Ready_SubParts();
|
||||
void Start_LerpShoulderPos();
|
||||
|
||||
_bool m_bMovable = { true };
|
||||
_float m_fMouseSensor = { 0.5f };
|
||||
@@ -46,10 +47,15 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
_float3 m_vShoulderStartRatio = { 1.f, 2.f, -1.f };
|
||||
_float3 m_vShoulderOtherRatio = { 1.f, 2.f, -1.f };
|
||||
|
||||
_bool m_bLerp = { false };
|
||||
_float2 m_vLerpTimer = { 0.f, 1.f };
|
||||
_bool m_bShoulderLerp = { false };
|
||||
_float2 m_vShoulderLerpTimer = { 0.f, 1.f };
|
||||
|
||||
_float2 m_vPosLerpTimer = { 0.f, 0.16f };
|
||||
_float4 m_StartPos = { };
|
||||
_float4 m_DestPos = { };
|
||||
|
||||
_bool m_bZoomIn = { false };
|
||||
_bool m_bLerp = {};
|
||||
|
||||
|
||||
CCamPosition_Target* m_pTarget_LookPart = { nullptr };
|
||||
|
||||
@@ -8,13 +8,13 @@ namespace Client
|
||||
|
||||
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ, END };
|
||||
enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END };
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, END };
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, END };
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR, TRAIL_BLOOM, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, END };
|
||||
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
@@ -24,9 +24,9 @@ namespace Client
|
||||
BOMBARDA, INCENDIO, DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA,
|
||||
CONJURING_SPELL, ALTERING_SPELL, EVANESCO, AVADA_KEDAVRA, CRUCIO, IMPERIO,
|
||||
BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, JAP, REVELIO, PROTEGO, STUPEFY,
|
||||
|
||||
ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS,
|
||||
|
||||
JAP_SIDE
|
||||
JAP_SIDE, BOMBARDA_SIDE , DESCENDO_SIDE , LEVIOSO_SIDE
|
||||
,END
|
||||
};
|
||||
enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END };
|
||||
@@ -49,93 +49,4 @@ namespace Client {
|
||||
NOCOLLIDE,
|
||||
END,
|
||||
};
|
||||
enum class PXOBJECT : _uint {
|
||||
#pragma region NOT_DEFINE
|
||||
NOT_DEFINE = 000,
|
||||
#pragma endregion
|
||||
#pragma region PLAYER
|
||||
PLAYER = 010,
|
||||
#pragma endregion
|
||||
#pragma region MONSTER
|
||||
MONSTER = 030,
|
||||
GOBLIN_WARRIOR, // 031
|
||||
GOBLIN_MAGICIAN,
|
||||
GOBLIN_THEIF,
|
||||
TROLL,
|
||||
PENSIVE_GUARDIAN,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region HOSTILE_HITBOX
|
||||
HOSTILE_HITBOX = 100,
|
||||
GOBLIN_SMASH,
|
||||
GOBLIN_DAGGER,
|
||||
GOBLIN_SHIELD_BREAK_MELEE,
|
||||
GOBLIN_SHIELD_BREAK_MAGIC,
|
||||
GOBLIN_NORMAL_MAGIC,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region ALLY_HITBOX
|
||||
ALLY_HITBOX = 200,
|
||||
SKILL_REVAILIO,
|
||||
SKILL_ACCIO,
|
||||
SKILL_DEPULSO,
|
||||
SKILL_DEPULSO_OBSTACLE,
|
||||
SKILL_DEPULSO_OBSTACLE_FLAMED,
|
||||
SKILL_NORMALJAP,
|
||||
SKILL_NORMALJAP_FINAL,
|
||||
SKILL_BOMBARD_STRIKE,
|
||||
SKILL_BOMBARD_FLAME,
|
||||
SKILL_INCENDIO_STRIKE,
|
||||
SKILL_INCENDIO_SPREAD,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region NEUTRAL_HITBOX
|
||||
NEUTRAL_HITBOX = 300,
|
||||
FLAMED_FLOOR,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region ENVIRIONMENT
|
||||
ENVIRIONMENT = 400,
|
||||
TERRAIN,
|
||||
WATER,
|
||||
WALL,
|
||||
WALL_BREAKABLE,
|
||||
WALL_CLIMBABLE,
|
||||
DOOR,
|
||||
BUILDING,
|
||||
BOX,
|
||||
#pragma endregion
|
||||
#pragma region NPC
|
||||
NPC = 500,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region ITEM
|
||||
ITEM = 600,
|
||||
DROPITEM = 630,
|
||||
TRAP = 660,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region TRIGGERBOX
|
||||
TRIGGERBOX = 700,
|
||||
|
||||
|
||||
CINEMATIC = 770,
|
||||
CINEMATIC_INTRO,
|
||||
CINEMATIC_HOGSMEADE_ENTER,
|
||||
CINEMATIC_TROLL_ENCOUNTER,
|
||||
CINEMATIC_TROLL_DEAD,
|
||||
#pragma endregion
|
||||
#pragma region REGION
|
||||
REGION = 800,
|
||||
HOGWARTS,
|
||||
HOGSMEADE,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region NOCOLLIDE
|
||||
NOCOLLIDE = 900,
|
||||
GAIL,
|
||||
|
||||
#pragma endregion
|
||||
END = 999
|
||||
};
|
||||
}
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace Client {
|
||||
#define LAYER_DOT TEXT("Layer_Dot")
|
||||
#define LAYER_CELL TEXT("Layer_Cell")
|
||||
#define LAYER_TRIGGER TEXT("Layer_Trigger")
|
||||
#define LAYER_ITEM TEXT("Layer_Item")
|
||||
#define LAYER_EFFECTPOOL TEXT("Layer_EffectPool")
|
||||
#define LAYER_LIGHT TEXT("Layer_Light")
|
||||
|
||||
#define LAYER_MAPOBJECTMANAGER TEXT("Layer_MapObjectManager")
|
||||
|
||||
@@ -19,11 +19,14 @@ namespace Client
|
||||
typedef struct tagSpellInfo
|
||||
{
|
||||
_uint iSpell_ID{};
|
||||
_wstring pSpell_Name{};
|
||||
_wstring pSpell_Name;
|
||||
_uint iSpell_Type{};
|
||||
_uint iSpell_CoolTime{};
|
||||
_uint iSkill_Type{};
|
||||
_float fSpell_CoolTime{};
|
||||
_float fDuration{};
|
||||
_uint iAnimNum{};
|
||||
_wstring pSpellInfo;
|
||||
_bool bSpell_Lock = false;
|
||||
_bool bEquip_Spell = false;
|
||||
|
||||
}SPELLINFO;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CCurrent_Slot_Number final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CCurrent_Slot_Number(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CCurrent_Slot_Number(const CCurrent_Slot_Number& rhs);
|
||||
virtual ~CCurrent_Slot_Number() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
virtual void SizeUpX(_float fSizeX) override;
|
||||
virtual void SizeUpY(_float fSizeY) override;
|
||||
virtual void SizeUpdate(_float fSizeX, _float fSizeY) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
void UV();
|
||||
_float4 Meter_Index(_uint Number);
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
|
||||
CVIBuffer_UI_Instance::UI_ATLAS_DESC pUVDesc[4];
|
||||
|
||||
_float2 m_fIamge_Size{};
|
||||
_float m_fOffSetX{};
|
||||
_float m_fOffSetY{};
|
||||
_uint m_iCols{};
|
||||
|
||||
public:
|
||||
static CCurrent_Slot_Number* 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,57 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CCurrent_Spell_Slot final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CCurrent_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CCurrent_Spell_Slot(const CCurrent_Spell_Slot& rhs);
|
||||
virtual ~CCurrent_Spell_Slot() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
virtual void SizeUpX(_float fSizeX) override;
|
||||
virtual void SizeUpY(_float fSizeY) override;
|
||||
virtual void SizeUpdate(_float fSizeX, _float fSizeY) override;
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_float m_fOffSetX{};
|
||||
_float m_fOffSetY{};
|
||||
_uint m_iCols{};
|
||||
|
||||
public:
|
||||
static CCurrent_Spell_Slot* 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,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CDecendoSide final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CDecendoSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDecendoSide(const CDecendoSide& rhs);
|
||||
virtual ~CDecendoSide() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
class CEffectParts* m_pWandLight = { nullptr };
|
||||
class CTrailObject* m_pWandTrail = { nullptr };
|
||||
|
||||
public:
|
||||
static CDecendoSide* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,61 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CEessential_Spell final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CEessential_Spell(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CEessential_Spell(const CEessential_Spell& rhs);
|
||||
virtual ~CEessential_Spell() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
public:
|
||||
virtual void SizeUpX(_float fSizeX) override;
|
||||
virtual void SizeUpY(_float fSizeY) override;
|
||||
virtual void SizeUpdate(_float fSizeX, _float fSizeY) override;
|
||||
|
||||
void UV();
|
||||
_float4 Meter_Index(_uint Number);
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
|
||||
CVIBuffer_UI_Instance::UI_ATLAS_DESC pUVDesc[8];
|
||||
|
||||
_float m_fOffSetX{};
|
||||
_float m_fOffSetY{};
|
||||
_uint m_iCols{};
|
||||
|
||||
public:
|
||||
static CEessential_Spell* 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 // _DEBUGe;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CEessential_Spell_Slot final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CEessential_Spell_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CEessential_Spell_Slot(const CEessential_Spell_Slot& rhs);
|
||||
virtual ~CEessential_Spell_Slot() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
virtual void SizeUpX(_float fSizeX) override;
|
||||
virtual void SizeUpY(_float fSizeY) override;
|
||||
virtual void SizeUpdate(_float fSizeX, _float fSizeY) override;
|
||||
|
||||
|
||||
private:
|
||||
void Hover(_float fTimeDelta);
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_float m_fOffSetX{};
|
||||
_float m_fOffSetY{};
|
||||
_uint m_iCols{};
|
||||
|
||||
_float m_fHoverTime{};
|
||||
_int m_iPerSpell_Slot{};
|
||||
|
||||
|
||||
public:
|
||||
static CEessential_Spell_Slot* 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
|
||||
@@ -21,12 +21,16 @@ class CEffectParts final : public CEffectObject
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
|
||||
|
||||
public:
|
||||
static CEffectParts* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -25,6 +25,8 @@ class CEffect_Container abstract : public CContainerObject
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject);
|
||||
HRESULT Load_Package(const _char* pPath);
|
||||
|
||||
public:
|
||||
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
@@ -35,8 +37,9 @@ class CEffect_Container abstract : public CContainerObject
|
||||
void Update_Event(_float fTimeDelta);
|
||||
HRESULT Reset_EffectParts();
|
||||
protected:
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
_float4 m_vStartPos = {};
|
||||
_float4 m_vEndPos = {};
|
||||
PSX::PxSweepBuffer hitBuffer = {};
|
||||
protected:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
|
||||
@@ -40,6 +40,10 @@ class CInfoInstance final : public CBase
|
||||
#pragma endregion
|
||||
#pragma region MAP_INFO
|
||||
HRESULT Load_MapObjects(const _char* pFilePath);
|
||||
HRESULT Load_LightElements(const _char* pFilePath);
|
||||
#pragma endregion
|
||||
#pragma region Spell_INFO
|
||||
HRESULT Load_SpellInfo(const _char* pFilePath);
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ class CLevel_GamePlay final : public CLevel
|
||||
HRESULT Ready_Layer_Camera();
|
||||
HRESULT Ready_Layer_Sound();
|
||||
HRESULT Ready_Layer_Player(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Item(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_SkyBox(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Monster();
|
||||
HRESULT Reday_Layer_EffectPool();
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CLeviosoSide final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CLeviosoSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CLeviosoSide(const CLeviosoSide& rhs);
|
||||
virtual ~CLeviosoSide() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
class CEffectParts* m_pWandLight = { nullptr };
|
||||
class CTrailObject* m_pWandTrail = { nullptr };
|
||||
|
||||
public:
|
||||
static CLeviosoSide* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -40,7 +40,7 @@ class CLoader final : public CBase
|
||||
|
||||
private:
|
||||
HRESULT Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function<HRESULT(_wstring, const _char*)> AddPrototypeEvent);
|
||||
future<void> Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag, vector<FOLDER_LOAD*>** OutContents);
|
||||
future<vector<FOLDER_LOAD*>*> Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag);
|
||||
future<pair<_wstring, CModel*>*> Deferred_ModelLoad(MODEL eType, const _char* pDirectoryPath, _fmatrix PreTransform, const _tchar* pPrototypeTag);
|
||||
public:
|
||||
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
|
||||
|
||||
@@ -41,6 +41,7 @@ class CMagic_Item final : public CElementObject
|
||||
CTexture* m_pDiffuse_TextureCom3 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom4 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom5 = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom6 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@ class CMapContainer abstract : public CContainerObject
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
void ReadyForPhysX();
|
||||
void ConvertToPhysX();
|
||||
|
||||
public:
|
||||
template<typename T>
|
||||
HRESULT Add_Part(const _string& strPartKey, _uint iPrototypeLevelIndex, T** ppOut, void* pArg = nullptr) {
|
||||
@@ -53,10 +56,14 @@ class CMapContainer abstract : public CContainerObject
|
||||
protected:
|
||||
_uint m_iMaxLodLevel = {};
|
||||
|
||||
vector<class CPartObject*> m_ColiisonPartObjects;
|
||||
vector<class CPartObject*> m_ColiisonPartObjects = {};
|
||||
|
||||
public:
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CModel;
|
||||
class CShader;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CMapElement abstract : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagMapElement_Desc {
|
||||
_uint iRenderType{};
|
||||
CTransform* pParentTransform = { nullptr };
|
||||
_float3 vScale;
|
||||
_float3 vRotation;
|
||||
_float3 vPosition;
|
||||
_uint iMaxLodLevel{};
|
||||
vector<_wstring> ModelPrototypeTags;
|
||||
vector<_uint>* pModelPathIndices = { nullptr };
|
||||
}MAPELEMENT_DESC;
|
||||
|
||||
protected:
|
||||
CMapElement(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMapElement(const CMapElement& rhs);
|
||||
virtual ~CMapElement() = 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;
|
||||
|
||||
protected:
|
||||
_uint m_iMaxLodLevel = {};
|
||||
_uint m_iLodIndex = {};
|
||||
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
vector<CModel*> m_pModelComs;
|
||||
vector<_wstring> m_ModelPrototypeTags;
|
||||
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
public:
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) PURE;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,73 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "MapElement.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CLight;
|
||||
class CTexture;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CMapElement_Light : public CMapElement
|
||||
{
|
||||
public:
|
||||
typedef struct MapElement_Light_Desc : MAPELEMENT_DESC
|
||||
{
|
||||
_bool isPow;
|
||||
_uint iGlassMeshIndex;
|
||||
_float fBloomStregth;
|
||||
_float fRange;
|
||||
_float4 vPosOffset;
|
||||
_float4 vDiffuse;
|
||||
_float4 vAmbient;
|
||||
_float4 vSpecular;
|
||||
}MAPELEMENT_LIGHT_DESC;
|
||||
|
||||
private:
|
||||
CMapElement_Light(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMapElement_Light(const CMapElement_Light& rhs);
|
||||
virtual ~CMapElement_Light() = 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;
|
||||
|
||||
HRESULT Render_Bloom()override;
|
||||
void Toggle_Light();
|
||||
|
||||
private:
|
||||
CLight* m_pLightCom = { nullptr };
|
||||
CTexture* m_pEmissiveTextureCom = { nullptr };
|
||||
CTexture* m_pMaskTextureCom = { nullptr };
|
||||
CTexture* m_pGlassTextureCom = { nullptr };
|
||||
|
||||
_bool m_isLightOn = { true };
|
||||
_bool m_isLightAdded = { false };
|
||||
_uint m_iGlassMeshIndex = {};
|
||||
_float m_fBloomStrength = { 1.f };
|
||||
_float m_fGlassRatio = { 0.5f };
|
||||
|
||||
_float m_LightAdded_Distance = { 5000.f };
|
||||
|
||||
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 CMapElement_Light* 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
|
||||
@@ -22,6 +22,7 @@ class CMapInfo final : public CBase
|
||||
HRESULT Load_StreetContainer(tinyxml2::XMLElement* Container, class CMapContainer** ppContainerObject);
|
||||
HRESULT Load_MapRenderObjects(tinyxml2::XMLElement* Container, class CMapContainer* pContainerObject);
|
||||
HRESULT Load_MapCollisionObjects(tinyxml2::XMLElement* Container, class CMapContainer* pContainerObject);
|
||||
HRESULT Load_LightElements(const _char* pFileName);
|
||||
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
@@ -35,6 +36,10 @@ class CMapInfo final : public CBase
|
||||
public:
|
||||
static CMapInfo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex);
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -20,12 +20,16 @@ class CMapObject_Collision final : public CMapPartObject // 충돌용 Mesh
|
||||
|
||||
public:
|
||||
virtual _wstring Get_PrototypeTag(_uint iLodIndex = 0);
|
||||
|
||||
void ReadyForPhysX();
|
||||
void ConvertToPhysX();
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
vector<vector<CRigidBody_Static*>> m_RigidBodies;
|
||||
vector<CModel*> m_pModelComs;
|
||||
|
||||
_uint m_iLodIndex = {};
|
||||
_bool m_bReadyToCreatePhysX = { false };
|
||||
_bool m_bConverted = { false };
|
||||
|
||||
vector<_wstring> m_ModelPrototypeTags;
|
||||
vector<_uint> m_ModelPathIndices = { };
|
||||
|
||||
@@ -30,7 +30,7 @@ class CMapObject_Render final : public CMapPartObject // Render PartObject
|
||||
|
||||
private:
|
||||
MAPOBJECT_RENDER_TYPE m_Type = {};
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
vector<CModel*> m_pModelComs;
|
||||
|
||||
_uint m_iLodIndex = {};
|
||||
|
||||
@@ -18,7 +18,6 @@ class CNomalJap final : public CEffect_Container
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
void MoveHitBox(Engine::_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ class CPlayer final : public CUnit
|
||||
|
||||
_bool m_bSprintToggle = { false };
|
||||
_bool m_bWalkToggle = { false };
|
||||
_bool m_bHoverToggle = { true };
|
||||
|
||||
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
|
||||
_float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
|
||||
@@ -49,9 +50,12 @@ class CPlayer final : public CUnit
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
class CCallBack_Playable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
class CCallBack_Playable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CLight* m_pLightCom = { nullptr };
|
||||
LIGHT_DESC LightDesc = {};
|
||||
|
||||
class CModel* m_pBroomModel = { nullptr };
|
||||
class CTransform* m_pBroomTransform = { nullptr };
|
||||
class CBroom* m_pBroom = { nullptr };
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
@@ -96,6 +100,7 @@ class CPlayer final : public CUnit
|
||||
vector<PendingEvent> m_PendingEvents;
|
||||
|
||||
|
||||
_float3 m_OffsetPos = {};
|
||||
_float m_fAmount = { 1.f };
|
||||
_float m_fInputTime = {};
|
||||
_bool m_bRatio = { false };
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameInstance;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSkill_Data final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagSpellInfo
|
||||
{
|
||||
_int iSpell_ID{};
|
||||
_string pSpell_Name;
|
||||
_string pImage_Name;
|
||||
_int iSpell_Type{};
|
||||
_int iSkill_Type{};
|
||||
_float fSpell_CoolTime{};
|
||||
_float fDuration{};
|
||||
_int iAnimNum{};
|
||||
_string pSpellInfo;
|
||||
_bool bSpell_Lock = false;
|
||||
_bool bEquip_Spell = false;
|
||||
}SPELLINFO;
|
||||
private:
|
||||
CSkill_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSkill_Data(const CSkill_Data& rhs);
|
||||
virtual ~CSkill_Data() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
//const SPELLINFO& Get_Info(_uint SpellID) const;
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pSpell_Panel = { nullptr };
|
||||
|
||||
SPELLINFO SpellInfo = {};
|
||||
public:
|
||||
static CSkill_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,62 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSpell_Anim final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpell_Anim(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpell_Anim(const CSpell_Anim& rhs);
|
||||
virtual ~CSpell_Anim() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
public:
|
||||
virtual void Set_FadeIn() override;
|
||||
|
||||
private:
|
||||
void Change_Image(_int SpellID);
|
||||
virtual void Set_SkillType(_int eType) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDesendo_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_int m_iTotalFrames{}; // 전체 프레임 수
|
||||
_float m_fFrameTime{}; // 한 프레임당 시간(초)
|
||||
_int m_iCurrentFrame{}; // 현재 보여줄 프레임
|
||||
|
||||
_int m_iPerSpell{};
|
||||
_bool m_bAnim_Start = { false };
|
||||
public:
|
||||
static CSpell_Anim* 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,50 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "CanvasObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSpell_Canvas final : public CCanvasObject
|
||||
{
|
||||
private:
|
||||
CSpell_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpell_Canvas(const CSpell_Canvas& rhs);
|
||||
virtual ~CSpell_Canvas() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Ready_Panel(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Clear_Penel();
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pSpell_Panel = { nullptr };
|
||||
public:
|
||||
static CSpell_Canvas* 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,49 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSpell_Header final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpell_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpell_Header(const CSpell_Header& rhs);
|
||||
virtual ~CSpell_Header() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_int m_iSkillType{};
|
||||
public:
|
||||
static CSpell_Header* 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,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CSpell_Header_Line final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpell_Header_Line(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpell_Header_Line(const CSpell_Header_Line& rhs);
|
||||
virtual ~CSpell_Header_Line() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
public:
|
||||
static CSpell_Header_Line* 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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user