Merge branch 'Develope' into Bloom
This commit is contained in:
@@ -25,7 +25,7 @@ void CBuildingContainer::Update(_float fTimeDelta)
|
|||||||
{
|
{
|
||||||
__super::Update(fTimeDelta);
|
__super::Update(fTimeDelta);
|
||||||
|
|
||||||
m_fCamDepth = XMVectorGetX(XMVector3LengthSq(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMLoadFloat3(&m_vExtentWorldPosition)));
|
m_fCamDepth = XMVectorGetX(XMVector3LengthSq(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMVectorSetW(XMLoadFloat3(&m_vExtentWorldPosition), 1.f)));
|
||||||
|
|
||||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
for (auto& pCollisiton : m_ColiisonPartObjects){
|
||||||
pCollisiton->Update(fTimeDelta);
|
pCollisiton->Update(fTimeDelta);
|
||||||
@@ -34,15 +34,21 @@ void CBuildingContainer::Update(_float fTimeDelta)
|
|||||||
|
|
||||||
void CBuildingContainer::Late_Update(_float fTimeDelta)
|
void CBuildingContainer::Late_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
// if (m_pOcclusionQueryCom->isDraw()){
|
if (m_pGameInstance->isIn_WorldFrustum(XMVectorSetW(XMLoadFloat3(&m_vExtentWorldPosition), 1.f), m_fRadius)) {
|
||||||
__super::Late_Update(fTimeDelta);
|
if (m_fCamDepth > 3000.f)
|
||||||
//}
|
{
|
||||||
|
if (m_pOcclusionQueryCom->isDraw())
|
||||||
|
__super::Late_Update(fTimeDelta);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
__super::Late_Update(fTimeDelta);
|
||||||
|
|
||||||
for (auto& pCollisiton : m_ColiisonPartObjects){
|
m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this);
|
||||||
pCollisiton->Late_Update(fTimeDelta);
|
|
||||||
|
for (auto& pCollisiton : m_ColiisonPartObjects) {
|
||||||
|
pCollisiton->Late_Update(fTimeDelta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CBuildingContainer::Render()
|
HRESULT CBuildingContainer::Render()
|
||||||
@@ -142,6 +148,9 @@ HRESULT CBuildingContainer::Ready_Components(void* pArg)
|
|||||||
vRadius.y = (pDesc->vContainerMax.y - pDesc->vContainerMin.y) * 0.5f;
|
vRadius.y = (pDesc->vContainerMax.y - pDesc->vContainerMin.y) * 0.5f;
|
||||||
vRadius.z = (pDesc->vContainerMax.z - pDesc->vContainerMin.z) * 0.5f;
|
vRadius.z = (pDesc->vContainerMax.z - pDesc->vContainerMin.z) * 0.5f;
|
||||||
|
|
||||||
|
m_fRadius = max(vRadius.x, vRadius.y);
|
||||||
|
m_fRadius = max(m_fRadius, vRadius.z);
|
||||||
|
|
||||||
m_vExtentWorldPosition.x = pDesc->vContainerMin.x + vRadius.x;
|
m_vExtentWorldPosition.x = pDesc->vContainerMin.x + vRadius.x;
|
||||||
m_vExtentWorldPosition.y = pDesc->vContainerMin.y + vRadius.y;
|
m_vExtentWorldPosition.y = pDesc->vContainerMin.y + vRadius.y;
|
||||||
m_vExtentWorldPosition.z = pDesc->vContainerMin.z + vRadius.z;
|
m_vExtentWorldPosition.z = pDesc->vContainerMin.z + vRadius.z;
|
||||||
|
|||||||
@@ -94,6 +94,9 @@ void CGoblin::Update(_float fTimeDelta)
|
|||||||
Describe_Entity();
|
Describe_Entity();
|
||||||
#endif // _DEBUG
|
#endif // _DEBUG
|
||||||
|
|
||||||
|
for (_uint i = 0; i < ENUM_CLASS(GOBLIN_SKILL::END); i++)
|
||||||
|
m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGoblin::Late_Update(_float fTimeDelta)
|
void CGoblin::Late_Update(_float fTimeDelta)
|
||||||
@@ -290,9 +293,33 @@ void CGoblin::Free()
|
|||||||
|
|
||||||
void CGoblin::Describe_Entity()
|
void CGoblin::Describe_Entity()
|
||||||
{
|
{
|
||||||
|
GUI::Begin("Goblin");
|
||||||
|
|
||||||
|
GUI::Checkbox("LookAt", &m_bLookAt);
|
||||||
|
|
||||||
|
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||||
|
GUI::Text(AnimList.c_str());
|
||||||
|
|
||||||
|
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||||
|
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||||
|
|
||||||
_float4 vMomentum = {};
|
_float4 vMomentum = {};
|
||||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||||
GUI::Text("GoblinMomentum %.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||||
|
|
||||||
|
_float3 Pos;
|
||||||
|
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||||
|
|
||||||
|
if (GUI::DragFloat3("Pos", (_float*)&Pos))
|
||||||
|
{
|
||||||
|
m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance);
|
||||||
|
|
||||||
|
|
||||||
|
GUI::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _DEBUG
|
#endif // _DEBUG
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ void CGoblin::Behavior_IdleEnter()
|
|||||||
|
|
||||||
HRESULT CGoblin::Behavior_IdleExitCheck()
|
HRESULT CGoblin::Behavior_IdleExitCheck()
|
||||||
{
|
{
|
||||||
if (m_fTargetDistance <= 15.f)
|
if (m_fTargetDistance <= 20.f)
|
||||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||||
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
@@ -38,19 +38,32 @@ void CGoblin::Behavior_IdleExit()
|
|||||||
void CGoblin::Behavior_MoveEnter()
|
void CGoblin::Behavior_MoveEnter()
|
||||||
{
|
{
|
||||||
pair<_uint, _bool> pairAnimInfo = {};
|
pair<_uint, _bool> pairAnimInfo = {};
|
||||||
|
|
||||||
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
||||||
|
|
||||||
m_pFSM->Enable_State(FSMSTATE::JOG);
|
m_pFSM->Enable_State(FSMSTATE::JOG);
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_START];
|
||||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
|
||||||
|
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CGoblin::Behavior_MoveExitCheck()
|
HRESULT CGoblin::Behavior_MoveExitCheck()
|
||||||
{
|
{
|
||||||
if (m_fTargetDistance <= 7.f &&m_fTargetDistance !=0.f)
|
pair<_uint, _bool> pairAnimInfo = {};
|
||||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||||
|
if (iCurrAnimIndex == m_Animation[STATEANIM::JOG_START].first)
|
||||||
|
{
|
||||||
|
if (m_pModelCom->IsFinishedAnim())
|
||||||
|
{
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||||
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iCurrAnimIndex == m_Animation[STATEANIM::JOG_FWD].first) {
|
||||||
|
if (m_fTargetDistance <= 10.f && m_fTargetDistance != 0.f)
|
||||||
|
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
@@ -63,28 +76,103 @@ void CGoblin::Behavior_MoveExit()
|
|||||||
void CGoblin::Behavior_CombatEnter()
|
void CGoblin::Behavior_CombatEnter()
|
||||||
{
|
{
|
||||||
pair<_uint, _bool> pairAnimInfo = {};
|
pair<_uint, _bool> pairAnimInfo = {};
|
||||||
|
|
||||||
m_pFSM->Enable_State(FSMSTATE::COMBAT);
|
m_pFSM->Enable_State(FSMSTATE::COMBAT);
|
||||||
|
|
||||||
m_pFSM->Enable_State(FSMSTATE::SKILL2);
|
m_bLookAt = true;
|
||||||
|
if (m_fTargetDistance <= 3.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SLAM)] <= 0.f)
|
||||||
|
{
|
||||||
|
m_pFSM->Enable_State(FSMSTATE::SLAM);
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::SLAM];
|
||||||
|
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SLAM)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SLAM)];
|
||||||
|
}
|
||||||
|
else if (m_fTargetDistance <= 5.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] <= 0.f)
|
||||||
|
{
|
||||||
|
m_pFSM->Enable_State(FSMSTATE::SWING);
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::SWING_FWD];
|
||||||
|
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)];
|
||||||
|
}
|
||||||
|
else if (m_fTargetDistance >= 5.f && m_fTargetDistance <= 10.f && m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::THROW)] <= 0.f)
|
||||||
|
{
|
||||||
|
m_pFSM->Enable_State(FSMSTATE::SKILL);
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::SKILL];
|
||||||
|
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::THROW)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::THROW)];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||||
|
}
|
||||||
|
|
||||||
pairAnimInfo = m_Animation[STATEANIM::SKILL2];
|
|
||||||
|
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CGoblin::Behavior_CombatExitCheck()
|
HRESULT CGoblin::Behavior_CombatExitCheck(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
|
pair<_uint, _bool> pairAnimInfo = {};
|
||||||
|
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||||
|
|
||||||
|
if (m_pFSM->IsEnable(FSMSTATE::SLAM))
|
||||||
|
{
|
||||||
|
m_pFSM->Disable_State(FSMSTATE::SLAM);
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::SLAM];
|
||||||
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||||
|
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SLAM)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SLAM)];
|
||||||
|
Add_Event(pairAnimInfo.first,
|
||||||
|
[this]() {m_bLookAt = false; },
|
||||||
|
0.2f);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_pFSM->IsEnable(FSMSTATE::SWING))
|
||||||
|
{
|
||||||
|
|
||||||
|
_float fDesiredRange = 1.5f;
|
||||||
|
_float dist = m_fTargetDistance;
|
||||||
|
|
||||||
|
if (dist > fDesiredRange)
|
||||||
|
{
|
||||||
|
_vector vPos = Get_WorldPostion();
|
||||||
|
_vector vDistance = XMLoadFloat4(&m_vTargetPos) - vPos;
|
||||||
|
vDistance = XMVector4Normalize(vDistance);
|
||||||
|
_float step = min(dist - fDesiredRange, 1.5f);
|
||||||
|
|
||||||
|
m_pTransformCom->AccumulateMomentum(vDistance * step * fTimeDelta);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pFSM->Disable_State(FSMSTATE::SWING);
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::SWING_FWD];
|
||||||
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||||
|
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::SWING)];
|
||||||
|
Add_Event(pairAnimInfo.first,
|
||||||
|
[this]() {m_bLookAt = false; },
|
||||||
|
0.2f);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_pFSM->IsEnable(FSMSTATE::SKILL))
|
||||||
|
{
|
||||||
|
m_pFSM->Disable_State(FSMSTATE::SKILL);
|
||||||
|
pairAnimInfo = m_Animation[STATEANIM::SKILL];
|
||||||
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||||
|
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::THROW)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::THROW)];
|
||||||
|
Add_Event(pairAnimInfo.first,
|
||||||
|
[this]() {m_bLookAt = false; },
|
||||||
|
0.2f);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_pModelCom->IsFinishedAnim())
|
if (m_pModelCom->IsFinishedAnim())
|
||||||
{
|
{
|
||||||
|
m_bLookAt = true;
|
||||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||||
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGoblin::Behavior_CombatExit()
|
void CGoblin::Behavior_CombatExit()
|
||||||
{
|
{
|
||||||
m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SKILL | FSMSTATE::SKILL2);
|
m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SLAM | FSMSTATE::SKILL | FSMSTATE::SWING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -107,10 +195,7 @@ void CGoblin::Add_FSM()
|
|||||||
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
||||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); };
|
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); };
|
||||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
Desc.funcPriorityUpdate = nullptr;
|
||||||
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;
|
Desc.funcLateUpdate = nullptr;
|
||||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||||
}
|
}
|
||||||
@@ -120,7 +205,7 @@ void CGoblin::Add_FSM()
|
|||||||
CState_Combat::STATE_COMBAT_DESC Desc{};
|
CState_Combat::STATE_COMBAT_DESC Desc{};
|
||||||
Desc.pOwner = this;
|
Desc.pOwner = this;
|
||||||
Desc.funcEnterEvent = [this]() { Behavior_CombatEnter(); };
|
Desc.funcEnterEvent = [this]() { Behavior_CombatEnter(); };
|
||||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_CombatExitCheck(); };
|
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_CombatExitCheck(fTimedelta); };
|
||||||
Desc.funcExitEvent = [this]() { Behavior_CombatExit(); };
|
Desc.funcExitEvent = [this]() { Behavior_CombatExit(); };
|
||||||
Desc.funcPriorityUpdate = nullptr;
|
Desc.funcPriorityUpdate = nullptr;
|
||||||
Desc.funcLateUpdate = nullptr;
|
Desc.funcLateUpdate = nullptr;
|
||||||
@@ -141,18 +226,21 @@ void CGoblin::Set_Anim()
|
|||||||
m_Animation[STATEANIM::IDLE_TURN_R] = { 30, false };
|
m_Animation[STATEANIM::IDLE_TURN_R] = { 30, false };
|
||||||
|
|
||||||
m_Animation[STATEANIM::WALK_FWD] = { 50,true };
|
m_Animation[STATEANIM::WALK_FWD] = { 50,true };
|
||||||
|
m_Animation[STATEANIM::WALK_START] = { 57,false };
|
||||||
m_Animation[STATEANIM::WALK_STOP] = { 58,false };
|
m_Animation[STATEANIM::WALK_STOP] = { 58,false };
|
||||||
m_Animation[STATEANIM::WALK_BWD] = { 49, true };
|
m_Animation[STATEANIM::WALK_BWD] = { 49, true };
|
||||||
|
|
||||||
m_Animation[STATEANIM::JOG_FWD] = { 46,true };
|
m_Animation[STATEANIM::JOG_FWD] = { 147,true };
|
||||||
|
m_Animation[STATEANIM::JOG_START] = { 157,false };
|
||||||
m_Animation[STATEANIM::JOG_BWD] = { 154,false };
|
m_Animation[STATEANIM::JOG_BWD] = { 154,false };
|
||||||
|
|
||||||
m_Animation[STATEANIM::DODGE_LEFT] = { 125, false };
|
m_Animation[STATEANIM::DODGE_LEFT] = { 125, false };
|
||||||
m_Animation[STATEANIM::DODGE_RIGHT] = { 126, false };
|
m_Animation[STATEANIM::DODGE_RIGHT] = { 126, false };
|
||||||
m_Animation[STATEANIM::SPRINT] = { 90, true };
|
m_Animation[STATEANIM::SPRINT] = { 90, true };
|
||||||
|
|
||||||
m_Animation[STATEANIM::SKILL] = { 70,false }; // 도끼 스윙
|
m_Animation[STATEANIM::SLAM] = { 439,false }; // 도끼 찍기
|
||||||
m_Animation[STATEANIM::SKILL2] = { 85,false }; // 나이프 던지기
|
m_Animation[STATEANIM::SKILL] = { 85,false }; // 나이프 던지기
|
||||||
|
m_Animation[STATEANIM::SWING_FWD] = { 444,false }; // 도끼 스윙
|
||||||
|
|
||||||
m_Animation[STATEANIM::HIT_FWD] = { 353, false };
|
m_Animation[STATEANIM::HIT_FWD] = { 353, false };
|
||||||
m_Animation[STATEANIM::HIT_BWD] = { 352, false };
|
m_Animation[STATEANIM::HIT_BWD] = { 352, false };
|
||||||
@@ -193,4 +281,23 @@ void CGoblin::Set_Anim()
|
|||||||
m_Animation[STATEANIM::DEAD_L2] = { 322, false };
|
m_Animation[STATEANIM::DEAD_L2] = { 322, false };
|
||||||
m_Animation[STATEANIM::DEAD_R] = { 323, false };
|
m_Animation[STATEANIM::DEAD_R] = { 323, false };
|
||||||
m_Animation[STATEANIM::DEAD_R2] = { 324, false };
|
m_Animation[STATEANIM::DEAD_R2] = { 324, false };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 걷기 시작 57
|
||||||
|
// 걷기 루프 50
|
||||||
|
// 뛰기 시작 157
|
||||||
|
// 뛰기 루프 45
|
||||||
|
// 나이프 던지기 85
|
||||||
|
// 도끼 공격 444
|
||||||
|
// 도끼 공격 후 76
|
||||||
|
// 도끼 찍기 439
|
||||||
|
//
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,6 +185,66 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* SM_HM_OwlPost_Window_A */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
///* WA_Rectangle_Double_A */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
///* WC_Retangle_Double_A */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
///* WA_Square_Double_C */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* Quid_Window_A */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* Ollivanders_Box_Window */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* WC_L_DoubleS_A */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* WC_Round_Double_A */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* SM_HM_Door1a */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* SM_HM_Door1a */
|
||||||
|
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
|
||||||
|
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -468,6 +468,12 @@ HRESULT CLoader::Loading_For_GamePlay()
|
|||||||
".bin", false
|
".bin", false
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
{/* Doors */
|
||||||
|
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||||
|
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Doors",
|
||||||
|
".bin", false
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
@@ -1825,21 +1831,83 @@ HRESULT CLoader::Loading_For_GamePlay()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma region MAP_INSTANCE
|
||||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA */
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA */
|
||||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"),
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"),
|
||||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_MedA.bin",
|
"../Bin/Resources/Models/InstanceProp/SM_OakTree_MedA.bin",
|
||||||
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A */
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A */
|
||||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"),
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"),
|
||||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
"../Bin/Resources/Models/InstanceProp/SM_BearBerry_A.bin",
|
"../Bin/Resources/Models/InstanceProp/SM_BearBerry_A.bin",
|
||||||
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_OwlPost_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Rectangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Retangle_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleA_L_Square_Double_C.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_Quid_Window_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_Ollivanders_Box_Window.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_L_Double_Single_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_WindowsStyleC_Round_Double_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_Door1a.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b*/
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"),
|
||||||
|
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||||
|
"../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||||
|
return E_FAIL;
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
/* For.Prototype_Component_VIBuffer_Box */
|
/* For.Prototype_Component_VIBuffer_Box */
|
||||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Box"),
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Box"),
|
||||||
CVIBuffer_Box::Create(m_pDevice, m_pContext))))
|
CVIBuffer_Box::Create(m_pDevice, m_pContext))))
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ void CTerrain::Late_Update(_float fTimeDelta)
|
|||||||
{
|
{
|
||||||
//if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
//if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||||
m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this);
|
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -331,29 +331,29 @@ void CTroll::Free()
|
|||||||
|
|
||||||
void CTroll::Describe_Entity()
|
void CTroll::Describe_Entity()
|
||||||
{
|
{
|
||||||
GUI::Begin("Troll");
|
//GUI::Begin("Troll");
|
||||||
|
|
||||||
GUI::Checkbox("LookAt", &m_bLookAt);
|
//GUI::Checkbox("LookAt", &m_bLookAt);
|
||||||
|
|
||||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
//string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||||
GUI::Text(AnimList.c_str());
|
//GUI::Text(AnimList.c_str());
|
||||||
|
|
||||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
//GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
//GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||||
|
|
||||||
_float4 vMomentum = {};
|
//_float4 vMomentum = {};
|
||||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
//XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
//GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||||
|
|
||||||
_float3 Pos;
|
//_float3 Pos;
|
||||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
//XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||||
|
|
||||||
if (GUI::DragFloat3("Pos",(_float*)&Pos))
|
//if (GUI::DragFloat3("Pos",(_float*)&Pos))
|
||||||
{
|
//{
|
||||||
m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos));
|
// m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos));
|
||||||
}
|
//}
|
||||||
|
|
||||||
GUI::End();
|
//GUI::End();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void CTroll::Behavior_MoveEnter()
|
|||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CTroll::Behavior_MoveExitCheck()
|
HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
pair<_uint, _bool> pairAnimInfo = {};
|
pair<_uint, _bool> pairAnimInfo = {};
|
||||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||||
@@ -82,8 +82,8 @@ void CTroll::Behavior_CombatEnter()
|
|||||||
m_bLookAt = true;
|
m_bLookAt = true;
|
||||||
if (m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f)
|
if (m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f)
|
||||||
{
|
{
|
||||||
m_pFSM->Enable_State(FSMSTATE::SKILL);
|
m_pFSM->Enable_State(FSMSTATE::SLAM);
|
||||||
pairAnimInfo = m_Animation[STATEANIM::SKILL];
|
pairAnimInfo = m_Animation[STATEANIM::SLAM];
|
||||||
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
|
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
|
||||||
}
|
}
|
||||||
else if (m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] <= 0.f)
|
else if (m_fTargetDistance <= 12.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] <= 0.f)
|
||||||
@@ -137,10 +137,10 @@ HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta)
|
|||||||
pair<_uint, _bool> pairAnimInfo = {};
|
pair<_uint, _bool> pairAnimInfo = {};
|
||||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||||
|
|
||||||
if (m_pFSM->IsEnable(FSMSTATE::SKILL))
|
if (m_pFSM->IsEnable(FSMSTATE::SLAM))
|
||||||
{
|
{
|
||||||
m_pFSM->Disable_State(FSMSTATE::SKILL);
|
m_pFSM->Disable_State(FSMSTATE::SLAM);
|
||||||
pairAnimInfo = m_Animation[STATEANIM::SKILL];
|
pairAnimInfo = m_Animation[STATEANIM::SLAM];
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||||
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
|
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)];
|
||||||
Add_Event(pairAnimInfo.first,
|
Add_Event(pairAnimInfo.first,
|
||||||
@@ -185,7 +185,7 @@ HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta)
|
|||||||
|
|
||||||
void CTroll::Behavior_CombatExit()
|
void CTroll::Behavior_CombatExit()
|
||||||
{
|
{
|
||||||
m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SKILL | FSMSTATE::SKILL2 |FSMSTATE::SWING |FSMSTATE::BACKHAND_SWING);
|
m_pFSM->Disable_State(FSMSTATE::COMBAT | FSMSTATE::SLAM |FSMSTATE::SWING |FSMSTATE::BACKHAND_SWING);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTroll::Behavior_RushEnter()
|
void CTroll::Behavior_RushEnter()
|
||||||
@@ -210,6 +210,7 @@ HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta)
|
|||||||
m_bLookAt = false;
|
m_bLookAt = false;
|
||||||
pairAnimInfo = m_Animation[STATEANIM::RUSH_LOOP];
|
pairAnimInfo = m_Animation[STATEANIM::RUSH_LOOP];
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||||
|
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -221,7 +222,6 @@ HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta)
|
|||||||
m_pFSM->Disable_State(FSMSTATE::RUSH);
|
m_pFSM->Disable_State(FSMSTATE::RUSH);
|
||||||
pairAnimInfo = m_Animation[STATEANIM::RUSH_END];
|
pairAnimInfo = m_Animation[STATEANIM::RUSH_END];
|
||||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||||
m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)] = m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@@ -282,8 +282,6 @@ HRESULT CTroll::Behavior_ThrowExitCheck(_float fTimeDelta)
|
|||||||
if (m_pModelCom->IsFinishedAnim())
|
if (m_pModelCom->IsFinishedAnim())
|
||||||
{
|
{
|
||||||
m_bLookAt = true;
|
m_bLookAt = true;
|
||||||
Get_PartObject<CTroll_Rock>()->Set_Attach(true);
|
|
||||||
Get_PartObject<CTroll_Rock>()->Set_Visible(false);
|
|
||||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||||
}
|
}
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
@@ -292,6 +290,8 @@ HRESULT CTroll::Behavior_ThrowExitCheck(_float fTimeDelta)
|
|||||||
void CTroll::Behavior_ThrowExit()
|
void CTroll::Behavior_ThrowExit()
|
||||||
{
|
{
|
||||||
m_pFSM->Disable_State(FSMSTATE::THROW_ROCK);
|
m_pFSM->Disable_State(FSMSTATE::THROW_ROCK);
|
||||||
|
Get_PartObject<CTroll_Rock>()->Set_Attach(true);
|
||||||
|
Get_PartObject<CTroll_Rock>()->Set_Visible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTroll::Behavior_HitEnter()
|
void CTroll::Behavior_HitEnter()
|
||||||
@@ -300,7 +300,8 @@ void CTroll::Behavior_HitEnter()
|
|||||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||||
pair<_uint, _bool> pairAnimInfo;
|
pair<_uint, _bool> pairAnimInfo;
|
||||||
|
|
||||||
if (iCurrAnimIndex == m_Animation[STATEANIM::SKILL].first)
|
m_bLookAt = true;
|
||||||
|
if (iCurrAnimIndex == m_Animation[STATEANIM::SLAM].first)
|
||||||
{
|
{
|
||||||
pairAnimInfo = m_Animation[STATEANIM::HIT_FACE];
|
pairAnimInfo = m_Animation[STATEANIM::HIT_FACE];
|
||||||
}
|
}
|
||||||
@@ -366,12 +367,9 @@ void CTroll::Add_FSM()
|
|||||||
CState_Move::STATE_MOVE_DESC Desc{};
|
CState_Move::STATE_MOVE_DESC Desc{};
|
||||||
Desc.pOwner = this;
|
Desc.pOwner = this;
|
||||||
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
||||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); };
|
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
|
||||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
Desc.funcPriorityUpdate = nullptr;
|
||||||
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;
|
Desc.funcLateUpdate = nullptr;
|
||||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||||
}
|
}
|
||||||
@@ -445,7 +443,7 @@ void CTroll::Set_Anim()
|
|||||||
m_Animation[STATEANIM::DODGE_RIGHT] = { 126, false };
|
m_Animation[STATEANIM::DODGE_RIGHT] = { 126, false };
|
||||||
m_Animation[STATEANIM::SPRINT] = { 90, true };
|
m_Animation[STATEANIM::SPRINT] = { 90, true };
|
||||||
|
|
||||||
m_Animation[STATEANIM::SKILL] = { 66,false }; // 도끼 찍기
|
m_Animation[STATEANIM::SLAM] = { 66,false }; // 도끼 찍기
|
||||||
m_Animation[STATEANIM::SKILL2] = { 70,false };
|
m_Animation[STATEANIM::SKILL2] = { 70,false };
|
||||||
|
|
||||||
m_Animation[STATEANIM::THROW_ROCK_START] = { 77,false };
|
m_Animation[STATEANIM::THROW_ROCK_START] = { 77,false };
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class CBuildingContainer final : public CMapContainer // OCCLUSION CONTAINER
|
|||||||
CVIBuffer_Box* m_pVIBufferCom = { nullptr };
|
CVIBuffer_Box* m_pVIBufferCom = { nullptr };
|
||||||
COcclusionQuery* m_pOcclusionQueryCom = { nullptr };
|
COcclusionQuery* m_pOcclusionQueryCom = { nullptr };
|
||||||
|
|
||||||
|
_float m_fRadius = {};
|
||||||
_float3 m_vExtentWorldPosition = {};
|
_float3 m_vExtentWorldPosition = {};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -9,6 +9,14 @@ NS_BEGIN(Client)
|
|||||||
|
|
||||||
class CGoblin final : public CMonster
|
class CGoblin final : public CMonster
|
||||||
{
|
{
|
||||||
|
enum class GOBLIN_SKILL
|
||||||
|
{
|
||||||
|
SWING,
|
||||||
|
SLAM,
|
||||||
|
THROW,
|
||||||
|
TP,
|
||||||
|
END
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
CGoblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
CGoblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
CGoblin(const CGoblin& Prototype);
|
CGoblin(const CGoblin& Prototype);
|
||||||
@@ -51,6 +59,9 @@ class CGoblin final : public CMonster
|
|||||||
virtual void Add_FSM();
|
virtual void Add_FSM();
|
||||||
virtual void Set_Anim();
|
virtual void Set_Anim();
|
||||||
|
|
||||||
|
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = {};
|
||||||
|
_float m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_SKILL::END)] = { 5.f,10.f,10.f };
|
||||||
|
|
||||||
|
|
||||||
void Behavior_IdleEnter();
|
void Behavior_IdleEnter();
|
||||||
HRESULT Behavior_IdleExitCheck();
|
HRESULT Behavior_IdleExitCheck();
|
||||||
@@ -61,7 +72,7 @@ class CGoblin final : public CMonster
|
|||||||
void Behavior_MoveExit();
|
void Behavior_MoveExit();
|
||||||
|
|
||||||
void Behavior_CombatEnter();
|
void Behavior_CombatEnter();
|
||||||
HRESULT Behavior_CombatExitCheck();
|
HRESULT Behavior_CombatExitCheck(_float fTimeDelta);
|
||||||
void Behavior_CombatExit();
|
void Behavior_CombatExit();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class CMonster abstract : public CUnit
|
|||||||
_float3 m_vToTargetDir = { };
|
_float3 m_vToTargetDir = { };
|
||||||
_float m_fTargetDistance = { FLT_MAX };
|
_float m_fTargetDistance = { FLT_MAX };
|
||||||
_bool m_bDrawOutLine = { false };
|
_bool m_bDrawOutLine = { false };
|
||||||
|
_bool m_bLookAt = { true };
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual HRESULT Initialize_Prototype() override;
|
virtual HRESULT Initialize_Prototype() override;
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ class CTroll final : public CMonster
|
|||||||
_float2 m_vStunTimer = { 0.f, 4.f };
|
_float2 m_vStunTimer = { 0.f, 4.f };
|
||||||
_uint iIndex;
|
_uint iIndex;
|
||||||
|
|
||||||
_bool m_bLookAt = { true };
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual HRESULT Initialize_Prototype() override;
|
virtual HRESULT Initialize_Prototype() override;
|
||||||
virtual HRESULT Initialize(void* pArg) override;
|
virtual HRESULT Initialize(void* pArg) override;
|
||||||
@@ -65,10 +63,11 @@ class CTroll final : public CMonster
|
|||||||
virtual void Set_Anim();
|
virtual void Set_Anim();
|
||||||
|
|
||||||
_float m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = {};
|
_float m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = {};
|
||||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = { 20.f,15.f, 10.f, 5.f ,10.f};
|
_float m_fMaxSkillCoolTime[ENUM_CLASS(TROLL_SKILL::END)] = { 20.f,15.f, 7.f, 5.f ,10.f};
|
||||||
|
|
||||||
|
|
||||||
_float m_fRushTime = {};
|
_float m_fRushTime = {};
|
||||||
|
_float m_fAttackDelay = {};
|
||||||
|
|
||||||
|
|
||||||
void Behavior_IdleEnter();
|
void Behavior_IdleEnter();
|
||||||
@@ -76,7 +75,7 @@ class CTroll final : public CMonster
|
|||||||
void Behavior_IdleExit();
|
void Behavior_IdleExit();
|
||||||
|
|
||||||
void Behavior_MoveEnter();
|
void Behavior_MoveEnter();
|
||||||
HRESULT Behavior_MoveExitCheck();
|
HRESULT Behavior_MoveExitCheck(_float fTimeDelta);
|
||||||
void Behavior_MoveExit();
|
void Behavior_MoveExit();
|
||||||
|
|
||||||
void Behavior_CombatEnter();
|
void Behavior_CombatEnter();
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -76,7 +76,7 @@ technique11 NorTechnique11
|
|||||||
pass BoundingDebugPass
|
pass BoundingDebugPass
|
||||||
{
|
{
|
||||||
SetRasterizerState(RS_Nocull);
|
SetRasterizerState(RS_Nocull);
|
||||||
SetDepthStencilState(DSS_None, 0);
|
SetDepthStencilState(DSS_Default, 0);
|
||||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||||
VertexShader = compile vs_5_0 VS_MAIN();
|
VertexShader = compile vs_5_0 VS_MAIN();
|
||||||
GeometryShader = NULL;
|
GeometryShader = NULL;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ void CBuildingContainer::Update(_float fTimeDelta)
|
|||||||
_vector vCamPosition = XMLoadFloat4(m_pGameInstance->Get_CamPosition());
|
_vector vCamPosition = XMLoadFloat4(m_pGameInstance->Get_CamPosition());
|
||||||
|
|
||||||
// m_fCamDepth = XMVectorGetX(XMVector3LengthSq(vCamPosition - XMVectorSetW(XMLoadFloat3(&m_vExtentPosition), 1.f)));
|
// m_fCamDepth = XMVectorGetX(XMVector3LengthSq(vCamPosition - XMVectorSetW(XMLoadFloat3(&m_vExtentPosition), 1.f)));
|
||||||
m_fCamDepth = XMVectorGetX(XMVector3Length(vCamPosition - XMLoadFloat3(&m_vExtentPosition)));
|
m_fCamDepth = XMVectorGetX(XMVector3LengthSq(vCamPosition - WorldPosition));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,15 +66,15 @@ void CBuildingContainer::Late_Update(_float fTimeDelta)
|
|||||||
|
|
||||||
if (m_bOcclusionPassed)
|
if (m_bOcclusionPassed)
|
||||||
{
|
{
|
||||||
if(m_fCamDepth > 80.f)
|
if(m_fCamDepth > 3000.f)
|
||||||
{
|
{
|
||||||
if (m_pOcclusionQueryCom->isDraw())
|
if (m_pOcclusionQueryCom->isDraw())
|
||||||
__super::Late_Update(fTimeDelta);
|
__super::Late_Update(fTimeDelta);
|
||||||
|
|
||||||
m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
__super::Late_Update(fTimeDelta);
|
__super::Late_Update(fTimeDelta);
|
||||||
|
|
||||||
|
m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -327,8 +327,6 @@ void CLevel_ObjectViewer::Show_AnimList()
|
|||||||
if (GUI::Button(pModel->Get_AnimList(i)))
|
if (GUI::Button(pModel->Get_AnimList(i)))
|
||||||
{
|
{
|
||||||
pModel->Set_AnimationIndex(i);
|
pModel->Set_AnimationIndex(i);
|
||||||
pModel->Set_CurrentTrackPosition(0.f);
|
|
||||||
pModel->Play_Animation(0.f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -661,8 +659,6 @@ void CLevel_ObjectViewer::Find_Anim()
|
|||||||
if (GUI::Button(pModel->Get_AnimList(m_iAnimIndex)))
|
if (GUI::Button(pModel->Get_AnimList(m_iAnimIndex)))
|
||||||
{
|
{
|
||||||
pModel->Set_AnimationIndex(m_iAnimIndex);
|
pModel->Set_AnimationIndex(m_iAnimIndex);
|
||||||
pModel->Set_CurrentTrackPosition(0.f);
|
|
||||||
pModel->Play_Animation(0.f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -677,8 +673,6 @@ void CLevel_ObjectViewer::Find_Anim()
|
|||||||
if (GUI::Button(pModel->Get_AnimList(i)))
|
if (GUI::Button(pModel->Get_AnimList(i)))
|
||||||
{
|
{
|
||||||
pModel->Set_AnimationIndex(i);
|
pModel->Set_AnimationIndex(i);
|
||||||
pModel->Set_CurrentTrackPosition(0.f);
|
|
||||||
pModel->Play_Animation(0.f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1950,6 +1950,7 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
|||||||
MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
|
MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
|
||||||
TEXT("Prototype_Component_Goblin_Model")
|
TEXT("Prototype_Component_Goblin_Model")
|
||||||
));
|
));
|
||||||
|
|
||||||
futures.emplace_back(Deferred_ModelLoad(
|
futures.emplace_back(Deferred_ModelLoad(
|
||||||
MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
|
MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
|
||||||
TEXT("Prototype_Component_TombProtector_Model")
|
TEXT("Prototype_Component_TombProtector_Model")
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ call Update_Lib.bat
|
|||||||
<ClCompile Include="..\private\QuadTree.cpp" />
|
<ClCompile Include="..\private\QuadTree.cpp" />
|
||||||
<ClCompile Include="..\private\OcclusionQuery.cpp" />
|
<ClCompile Include="..\private\OcclusionQuery.cpp" />
|
||||||
<ClCompile Include="..\Private\Renderer_Declare.cpp" />
|
<ClCompile Include="..\Private\Renderer_Declare.cpp" />
|
||||||
|
<ClCompile Include="..\private\Resource_Manager.cpp" />
|
||||||
<ClCompile Include="..\Private\RigidBody_Dynamic_Joint.cpp">
|
<ClCompile Include="..\Private\RigidBody_Dynamic_Joint.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||||
@@ -428,6 +429,7 @@ call Update_Lib.bat
|
|||||||
<ClInclude Include="..\public\FSM.h" />
|
<ClInclude Include="..\public\FSM.h" />
|
||||||
<ClInclude Include="..\public\QuadTree.h" />
|
<ClInclude Include="..\public\QuadTree.h" />
|
||||||
<ClInclude Include="..\public\OcclusionQuery.h" />
|
<ClInclude Include="..\public\OcclusionQuery.h" />
|
||||||
|
<ClInclude Include="..\public\Resource_Manager.h" />
|
||||||
<ClInclude Include="..\Public\RigidBody_Dynamic_Joint.h">
|
<ClInclude Include="..\Public\RigidBody_Dynamic_Joint.h">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||||
|
|||||||
@@ -49,9 +49,6 @@
|
|||||||
<Filter Include="03.Management\00.GameObject_Manager">
|
<Filter Include="03.Management\00.GameObject_Manager">
|
||||||
<UniqueIdentifier>{1cc7e2f7-559a-4b58-9e84-bbfafb84f81c}</UniqueIdentifier>
|
<UniqueIdentifier>{1cc7e2f7-559a-4b58-9e84-bbfafb84f81c}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="03.Management\02.Asset_Manager">
|
|
||||||
<UniqueIdentifier>{685d2cc6-b29a-4018-b72f-d66a2807463d}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="02.Element\00.Level">
|
<Filter Include="02.Element\00.Level">
|
||||||
<UniqueIdentifier>{beb918fe-e798-41b2-8076-6d0cbc525ada}</UniqueIdentifier>
|
<UniqueIdentifier>{beb918fe-e798-41b2-8076-6d0cbc525ada}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
@@ -295,6 +292,9 @@
|
|||||||
<Filter Include="01.Utility\07.Fog">
|
<Filter Include="01.Utility\07.Fog">
|
||||||
<UniqueIdentifier>{d566d9e6-6183-48dc-a196-25fd47a10c48}</UniqueIdentifier>
|
<UniqueIdentifier>{d566d9e6-6183-48dc-a196-25fd47a10c48}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="03.Management\02.Resource_Manager">
|
||||||
|
<UniqueIdentifier>{685d2cc6-b29a-4018-b72f-d66a2807463d}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\Private\Base.cpp">
|
<ClCompile Include="..\Private\Base.cpp">
|
||||||
@@ -561,6 +561,9 @@
|
|||||||
<ClCompile Include="..\Private\Renderer_Declare.cpp">
|
<ClCompile Include="..\Private\Renderer_Declare.cpp">
|
||||||
<Filter>01.Utility\01.Renderer</Filter>
|
<Filter>01.Utility\01.Renderer</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\private\Resource_Manager.cpp">
|
||||||
|
<Filter>03.Management\02.Resource_Manager</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\Public\Base.h">
|
<ClInclude Include="..\Public\Base.h">
|
||||||
@@ -1193,6 +1196,9 @@
|
|||||||
<ClInclude Include="..\Public\Renderer.h">
|
<ClInclude Include="..\Public\Renderer.h">
|
||||||
<Filter>01.Utility\01.Renderer</Filter>
|
<Filter>01.Utility\01.Renderer</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\public\Resource_Manager.h">
|
||||||
|
<Filter>03.Management\02.Resource_Manager</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\Public\Assimp\color4.inl">
|
<None Include="..\Public\Assimp\color4.inl">
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "PhysX_Manager.h"
|
#include "PhysX_Manager.h"
|
||||||
#include "ThreadHolder.h"
|
#include "ThreadHolder.h"
|
||||||
#include "Fog.h"
|
#include "Fog.h"
|
||||||
|
#include "Resource_Manager.h"
|
||||||
|
|
||||||
IMPLEMENT_SINGLETON(CGameInstance)
|
IMPLEMENT_SINGLETON(CGameInstance)
|
||||||
|
|
||||||
@@ -108,6 +109,11 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_pResource_Manager = CResource_Manager::Create(*ppDevice, 500);
|
||||||
|
if (nullptr == m_pResource_Manager) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -783,6 +789,10 @@ HRESULT CGameInstance::Bind_FogValue(class CShader* pShader)
|
|||||||
{
|
{
|
||||||
return m_pFog->Bind_FogValue(pShader);
|
return m_pFog->Bind_FogValue(pShader);
|
||||||
}
|
}
|
||||||
|
ID3D11ShaderResourceView* CGameInstance::Add_Resource(const _char* pFilePath)
|
||||||
|
{
|
||||||
|
return m_pResource_Manager->Add_Texture(pFilePath);
|
||||||
|
}
|
||||||
#pragma endregion // FOG
|
#pragma endregion // FOG
|
||||||
|
|
||||||
bool CGameInstance::Key_Pressing(int _iKey)
|
bool CGameInstance::Key_Pressing(int _iKey)
|
||||||
@@ -910,6 +920,7 @@ void CGameInstance::Release_Engine()
|
|||||||
SAFE_RELEASE(m_pLevel_Manager);
|
SAFE_RELEASE(m_pLevel_Manager);
|
||||||
SAFE_RELEASE(m_pPrototype_Manager);
|
SAFE_RELEASE(m_pPrototype_Manager);
|
||||||
SAFE_RELEASE(m_pLight_Manager); // Light Manager�� m_pObject_Manager ���� ���� �ҷ�����
|
SAFE_RELEASE(m_pLight_Manager); // Light Manager�� m_pObject_Manager ���� ���� �ҷ�����
|
||||||
|
SAFE_RELEASE(m_pResource_Manager);
|
||||||
SAFE_RELEASE(m_pGraphic_Device);
|
SAFE_RELEASE(m_pGraphic_Device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -536,15 +536,10 @@ HRESULT CMaterial::Initialize(const _char* pModelFilePath, const SaveMaterial& _
|
|||||||
const char* ext = strrchr(szFullPath, '.');
|
const char* ext = strrchr(szFullPath, '.');
|
||||||
if (ext)
|
if (ext)
|
||||||
{
|
{
|
||||||
if (strcmp(ext, ".dds") == 0)
|
pSRV = m_pGameInstance->Add_Resource(szFullPath);
|
||||||
hr = CreateDDSTextureFromFile(m_pDevice, szPerfectPath, nullptr, &pSRV);
|
|
||||||
else if (strcmp(ext, ".tga") == 0)
|
|
||||||
hr = S_OK;
|
|
||||||
else
|
|
||||||
hr = CreateWICTextureFromFile(m_pDevice, szPerfectPath, nullptr, &pSRV);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
if (nullptr == pSRV) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
m_SRVs[type].push_back(pSRV);
|
m_SRVs[type].push_back(pSRV);
|
||||||
|
|||||||
@@ -13,34 +13,27 @@ COcclusionQuery::COcclusionQuery(const COcclusionQuery& rhs)
|
|||||||
|
|
||||||
void COcclusionQuery::Begin_Query()
|
void COcclusionQuery::Begin_Query()
|
||||||
{
|
{
|
||||||
if(0 == m_iCheckFrame)
|
m_pContext->Begin(m_pQuery[m_iCheckFrame]);
|
||||||
m_pContext->Begin(m_pQuery[0]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_bool COcclusionQuery::isDraw()
|
_bool COcclusionQuery::isDraw()
|
||||||
{
|
{
|
||||||
|
|
||||||
bool bVisible = m_bPreFrameDraw;
|
bool bVisible = m_bPreFrameDraw;
|
||||||
|
|
||||||
if (++m_iCheckFrame >= 5)
|
_uint iIndex = (m_iCheckFrame + 3) % 5;
|
||||||
|
|
||||||
|
UINT64 iSampleCount = 0;
|
||||||
|
HRESULT hr = m_pContext->GetData(
|
||||||
|
m_pQuery[iIndex],
|
||||||
|
&iSampleCount,
|
||||||
|
sizeof(UINT64),
|
||||||
|
D3D11_ASYNC_GETDATA_DONOTFLUSH
|
||||||
|
);
|
||||||
|
|
||||||
|
if (hr == S_OK)
|
||||||
{
|
{
|
||||||
UINT64 iSampleCount = 0;
|
bVisible = (iSampleCount > 0);
|
||||||
HRESULT hr = m_pContext->GetData(
|
|
||||||
m_pQuery[0],
|
|
||||||
&iSampleCount,
|
|
||||||
sizeof(UINT64),
|
|
||||||
D3D11_ASYNC_GETDATA_DONOTFLUSH
|
|
||||||
);
|
|
||||||
|
|
||||||
m_iCheckFrame = 0;
|
|
||||||
|
|
||||||
if (hr == S_OK)
|
|
||||||
{
|
|
||||||
bVisible = (iSampleCount > 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return m_bPreFrameDraw;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return m_bPreFrameDraw;
|
return m_bPreFrameDraw;
|
||||||
@@ -52,10 +45,10 @@ _bool COcclusionQuery::isDraw()
|
|||||||
|
|
||||||
void COcclusionQuery::End_Query()
|
void COcclusionQuery::End_Query()
|
||||||
{
|
{
|
||||||
if (0 == m_iCheckFrame)
|
m_pContext->End(m_pQuery[m_iCheckFrame++]);
|
||||||
m_pContext->End(m_pQuery[0]);
|
|
||||||
|
if (5 <= m_iCheckFrame)
|
||||||
|
m_iCheckFrame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT COcclusionQuery::Initialize_Prototype()
|
HRESULT COcclusionQuery::Initialize_Prototype()
|
||||||
|
|||||||
@@ -93,6 +93,10 @@ void CRenderer::Render_PreShadow()
|
|||||||
|
|
||||||
void CRenderer::Render_Occlusion()
|
void CRenderer::Render_Occlusion()
|
||||||
{
|
{
|
||||||
|
if (FAILED(m_pGameInstance->Begin_MRT_NonClear(TEXT("MRT_Combined")))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_RenderObjects[ENUM_CLASS(RENDER::OCCLUSION)].sort([](CGameObject* pSour, CGameObject* pDest)->_bool {
|
m_RenderObjects[ENUM_CLASS(RENDER::OCCLUSION)].sort([](CGameObject* pSour, CGameObject* pDest)->_bool {
|
||||||
return pSour->Get_Depth() < pDest->Get_Depth();
|
return pSour->Get_Depth() < pDest->Get_Depth();
|
||||||
});
|
});
|
||||||
@@ -109,6 +113,10 @@ void CRenderer::Render_Occlusion()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_RenderObjects[ENUM_CLASS(RENDER::OCCLUSION)].clear();
|
m_RenderObjects[ENUM_CLASS(RENDER::OCCLUSION)].clear();
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->End_MRT())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRenderer::Render_Priority()
|
void CRenderer::Render_Priority()
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ HRESULT CRenderer::Initialize()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
/* Target_Shadow_Near */
|
/* Target_Shadow_Near */
|
||||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shadow_Near"), (_uint)g_iMaxShadowWidth, (_uint)g_iMaxShadowHeight,
|
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shadow_Near"), (_uint)g_iMaxShadowWidth >> 2, (_uint)g_iMaxShadowHeight >> 2,
|
||||||
DXGI_FORMAT_R32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) {
|
DXGI_FORMAT_R32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "Resource_Manager.h"
|
||||||
|
|
||||||
|
CResource_Manager::CResource_Manager(ID3D11Device* pDevice)
|
||||||
|
:m_pDevice{ pDevice }
|
||||||
|
{
|
||||||
|
SAFE_ADDREF(pDevice);
|
||||||
|
}
|
||||||
|
|
||||||
|
ID3D11ShaderResourceView* CResource_Manager::Add_Texture(const _char* pFilePath)
|
||||||
|
{
|
||||||
|
lock_guard<mutex> lock(m_mtxTexture);
|
||||||
|
|
||||||
|
ID3D11ShaderResourceView* pSRV = Find_SRV(pFilePath);
|
||||||
|
|
||||||
|
if (nullptr == pSRV)
|
||||||
|
{
|
||||||
|
pSRV = Load_SRV(pFilePath);
|
||||||
|
|
||||||
|
if (nullptr == pSRV)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SAFE_ADDREF(pSRV);
|
||||||
|
|
||||||
|
return pSRV;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CResource_Manager::Initialize(_uint iResourceCount)
|
||||||
|
{
|
||||||
|
m_Resources.reserve(iResourceCount);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ID3D11ShaderResourceView* CResource_Manager::Find_SRV(const _char* pFilePath)
|
||||||
|
{
|
||||||
|
_char szFileName[MAX_PATH] = {};
|
||||||
|
_splitpath_s(pFilePath, nullptr, 0, nullptr, 0, szFileName, MAX_PATH, nullptr, 0);
|
||||||
|
|
||||||
|
auto iter = m_Resources.find(CMyTools::ToWstring(szFileName));
|
||||||
|
|
||||||
|
if (iter == m_Resources.end())
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
return iter->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
ID3D11ShaderResourceView* CResource_Manager::Load_SRV(const _char* pFilePath)
|
||||||
|
{
|
||||||
|
ID3D11ShaderResourceView* pSRV = nullptr;
|
||||||
|
|
||||||
|
_char szTextureFileName[MAX_PATH] = {};
|
||||||
|
_char szTextureFilePath[MAX_PATH] = {};
|
||||||
|
_char szDrive[MAX_PATH] = {};
|
||||||
|
_char szDir[MAX_PATH] = {};
|
||||||
|
_char szFileName[MAX_PATH] = {};
|
||||||
|
_char szEXT[MAX_PATH] = {};
|
||||||
|
_splitpath_s(pFilePath, szDrive, MAX_PATH, szDir, MAX_PATH, szFileName, MAX_PATH, szEXT, MAX_PATH);
|
||||||
|
strcpy_s(szTextureFileName, szDrive);
|
||||||
|
strcat_s(szTextureFileName, szDir);
|
||||||
|
strcat_s(szTextureFileName, szFileName);
|
||||||
|
|
||||||
|
strcat_s(szTextureFilePath, szTextureFileName);
|
||||||
|
strcat_s(szTextureFilePath, ".dds");
|
||||||
|
|
||||||
|
HRESULT hr = {};
|
||||||
|
|
||||||
|
hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV, 1024); // 일단 dds로 시도하고
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
memset(szTextureFilePath, 0, sizeof(_char) * MAX_PATH); // 실패하면 원래 확장자로 다시 시도
|
||||||
|
strcat_s(szTextureFilePath, szTextureFileName);
|
||||||
|
strcat_s(szTextureFilePath, szEXT);
|
||||||
|
|
||||||
|
if (false == strcmp(".tga", szEXT)) {
|
||||||
|
assert(false); // trying to Load TGA
|
||||||
|
hr = S_OK;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
hr = CreateWICTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, &pSRV);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (E_FAIL == hr)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
m_Resources.emplace(CMyTools::ToWstring(szFileName), pSRV);
|
||||||
|
++m_iCount;
|
||||||
|
|
||||||
|
return pSRV;
|
||||||
|
}
|
||||||
|
|
||||||
|
CResource_Manager* CResource_Manager::Create(ID3D11Device* pDevice, _uint iResourceCount)
|
||||||
|
{
|
||||||
|
CResource_Manager* pInstance = new CResource_Manager(pDevice);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize(iResourceCount)))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Create CResource_Manager");
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CResource_Manager::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pDevice);
|
||||||
|
|
||||||
|
unordered_map<_wstring, ID3D11ShaderResourceView*>::iterator iter = m_Resources.begin();
|
||||||
|
|
||||||
|
for (; iter != m_Resources.end();)
|
||||||
|
{
|
||||||
|
SAFE_RELEASE(iter->second);
|
||||||
|
iter = m_Resources.erase(iter);
|
||||||
|
}
|
||||||
|
m_Resources.clear();
|
||||||
|
}
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
#include "Texture.h"
|
#include "Texture.h"
|
||||||
#include "Shader.h"
|
#include "Shader.h"
|
||||||
|
|
||||||
|
#include "GameInstance.h"
|
||||||
|
|
||||||
CTexture::CTexture(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
CTexture::CTexture(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
: CComponent(pDevice, pContext)
|
: CComponent(pDevice, pContext)
|
||||||
{
|
{
|
||||||
@@ -89,39 +91,14 @@ HRESULT CTexture::Initialize(void* pArg)
|
|||||||
|
|
||||||
HRESULT CTexture::Load_SRV(const _char* szPath, ID3D11ShaderResourceView** ppSRV)
|
HRESULT CTexture::Load_SRV(const _char* szPath, ID3D11ShaderResourceView** ppSRV)
|
||||||
{
|
{
|
||||||
*ppSRV = nullptr;
|
ID3D11ShaderResourceView* pSRV = m_pGameInstance->Add_Resource(szPath);
|
||||||
_char szTextureFileName[MAX_PATH] = {};
|
|
||||||
_char szTextureFilePath[MAX_PATH] = {};
|
|
||||||
_char szDrive[MAX_PATH] = {};
|
|
||||||
_char szDir[MAX_PATH] = {};
|
|
||||||
_char szFileName[MAX_PATH] = {};
|
|
||||||
_char szEXT[MAX_PATH] = {};
|
|
||||||
_splitpath_s(szPath, szDrive, MAX_PATH, szDir, MAX_PATH, szFileName, MAX_PATH, szEXT, MAX_PATH);
|
|
||||||
strcpy_s(szTextureFileName, szDrive);
|
|
||||||
strcat_s(szTextureFileName, szDir);
|
|
||||||
strcat_s(szTextureFileName, szFileName);
|
|
||||||
|
|
||||||
strcat_s(szTextureFilePath, szTextureFileName);
|
if (nullptr == pSRV)
|
||||||
strcat_s(szTextureFilePath, ".dds");
|
return E_FAIL;
|
||||||
|
|
||||||
HRESULT hr = {};
|
*ppSRV = pSRV;
|
||||||
|
|
||||||
hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, ppSRV, 1024); // 일단 dds로 시도하고
|
return S_OK;
|
||||||
if (FAILED(hr)) {
|
|
||||||
memset(szTextureFilePath, 0, sizeof(_char) * MAX_PATH); // 실패하면 원래 확장자로 다시 시도
|
|
||||||
strcat_s(szTextureFilePath, szTextureFileName);
|
|
||||||
strcat_s(szTextureFilePath, szEXT);
|
|
||||||
|
|
||||||
if (false == strcmp(".tga", szEXT)) {
|
|
||||||
assert(false); // trying to Load TGA
|
|
||||||
hr = S_OK;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
hr = CreateWICTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, ppSRV);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return hr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CTexture::ParseTextureIncrementalToSRVs(_uint iNumTextures, const _tchar* pTextureFilePath)
|
HRESULT CTexture::ParseTextureIncrementalToSRVs(_uint iNumTextures, const _tchar* pTextureFilePath)
|
||||||
@@ -182,15 +159,11 @@ HRESULT CTexture::ParseTexturePathToSRVs(const _tchar* pTextureFolderPath)
|
|||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
for (const auto& filePath : files)
|
for (const auto& filePath : files)
|
||||||
{
|
{
|
||||||
hr = CreateDDSTextureFromFile(m_pDevice, filePath.c_str(), nullptr, &pSRV);
|
hr = Load_SRV(CMyTools::ToString(filePath).c_str(), &pSRV);
|
||||||
if (FAILED(hr)) {
|
|
||||||
hr = CreateWICTextureFromFile(m_pDevice, filePath.c_str(), nullptr, &pSRV);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
return hr;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_SRVs.push_back(pSRV);
|
m_SRVs.push_back(pSRV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "VIBuffer_Model_Instance.h"
|
#include "VIBuffer_Model_Instance.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
|
||||||
#include "Mesh.h"
|
#include "Mesh.h"
|
||||||
#include "Bone.h"
|
#include "Bone.h"
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
@@ -268,11 +270,10 @@ HRESULT CVIBuffer_Model_Instance::Ready_Materials()
|
|||||||
{
|
{
|
||||||
ID3D11ShaderResourceView* pSRV = { nullptr };
|
ID3D11ShaderResourceView* pSRV = { nullptr };
|
||||||
|
|
||||||
if (FAILED(CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(m_MeshMaterialPathes[i][j]).c_str(), nullptr, &pSRV)))
|
pSRV = m_pGameInstance->Add_Resource(m_MeshMaterialPathes[i][j].c_str());
|
||||||
{
|
|
||||||
if (FAILED(CreateWICTextureFromFile(m_pDevice, CMyTools::ToWstring(m_MeshMaterialPathes[i][j]).c_str(), nullptr, &pSRV)))
|
if (nullptr == pSRV)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
|
||||||
|
|
||||||
SRVs.push_back(pSRV);
|
SRVs.push_back(pSRV);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ enum ESTATE : _u64Flag
|
|||||||
THROW_ROCK = 1ULL << 23,
|
THROW_ROCK = 1ULL << 23,
|
||||||
BACKHAND_SWING = 1ULL << 24,
|
BACKHAND_SWING = 1ULL << 24,
|
||||||
SWING = 1ULL << 25,
|
SWING = 1ULL << 25,
|
||||||
|
SLAM = 1ULL << 26,
|
||||||
END
|
END
|
||||||
};
|
};
|
||||||
NS_END
|
NS_END
|
||||||
|
|||||||
@@ -237,6 +237,11 @@ class ENGINE_DLL CGameInstance final : public CBase
|
|||||||
HRESULT Bind_FogValue(class CShader* pShader);
|
HRESULT Bind_FogValue(class CShader* pShader);
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
|
#pragma region RESOURCE_MANGER
|
||||||
|
public:
|
||||||
|
ID3D11ShaderResourceView* Add_Resource(const _char* pFilePath);
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Add_ModelToMap(const _char* filePath, CModel* pModel);
|
void Add_ModelToMap(const _char* filePath, CModel* pModel);
|
||||||
@@ -272,6 +277,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
|||||||
class CPicking* m_pPicking = { nullptr };
|
class CPicking* m_pPicking = { nullptr };
|
||||||
class CThreadHolder* m_pThreadHolder = { nullptr };
|
class CThreadHolder* m_pThreadHolder = { nullptr };
|
||||||
class CFog* m_pFog = { nullptr };
|
class CFog* m_pFog = { nullptr };
|
||||||
|
class CResource_Manager* m_pResource_Manager = { nullptr };
|
||||||
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Base.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Engine)
|
||||||
|
|
||||||
|
class CResource_Manager final : public CBase
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
CResource_Manager(ID3D11Device* pDevice);
|
||||||
|
virtual ~CResource_Manager() = default;
|
||||||
|
mutex m_mtxTexture = {};
|
||||||
|
public:
|
||||||
|
ID3D11ShaderResourceView* Add_Texture(const _char* pFilePath);
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
HRESULT Initialize(_uint iResourceCount);
|
||||||
|
ID3D11ShaderResourceView* Find_SRV(const _char* pFilePath);
|
||||||
|
ID3D11ShaderResourceView* Load_SRV(const _char* pFilePath);
|
||||||
|
|
||||||
|
private:
|
||||||
|
_uint m_iCount = {};
|
||||||
|
ID3D11Device* m_pDevice = { nullptr };
|
||||||
|
|
||||||
|
unordered_map<_wstring, ID3D11ShaderResourceView*> m_Resources;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static CResource_Manager* Create(ID3D11Device* pDevice, _uint iResourceCount);
|
||||||
|
virtual void Free() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
@@ -6,7 +6,7 @@ enum ESTATE
|
|||||||
{
|
{
|
||||||
IDLE,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, IDLE_COMBAT_TURN_BWD,IDLE_BREAK1,IDLE_BREAK2,IDLE_BREAK3,IDLE_BREAK4,
|
IDLE,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, IDLE_COMBAT_TURN_BWD,IDLE_BREAK1,IDLE_BREAK2,IDLE_BREAK3,IDLE_BREAK4,
|
||||||
MOVE,
|
MOVE,
|
||||||
WALK, WALK_FWD,WALK_RIGHT,WALK_LEFT, WALK_BWD,WALK_STOP,
|
WALK, WALK_FWD,WALK_RIGHT,WALK_LEFT, WALK_BWD,WALK_START,WALK_STOP,
|
||||||
JOG,JOG_START, JOG_FWD, JOG_RIGHT, JOG_LEFT, JOG_BWD, JOG_STOP, JOG_AIM_LEFT, JOG_AIM_RIGHT, JOG_AIM_BWD, JOG_AIM_STOP_L, JOG_AIM_STOP_R, JOG_AIM_STOP_BWD,
|
JOG,JOG_START, JOG_FWD, JOG_RIGHT, JOG_LEFT, JOG_BWD, JOG_STOP, JOG_AIM_LEFT, JOG_AIM_RIGHT, JOG_AIM_BWD, JOG_AIM_STOP_L, JOG_AIM_STOP_R, JOG_AIM_STOP_BWD,
|
||||||
SPRINT,
|
SPRINT,
|
||||||
JUMP,JUMP_JOG,JUMP_SPRINT,
|
JUMP,JUMP_JOG,JUMP_SPRINT,
|
||||||
@@ -18,7 +18,7 @@ enum ESTATE
|
|||||||
BROOM_IDLE,BROOM_FWD,BROOM_LEFT,BROOM_RIGHT,BROOM_DOWN,BROOM_UP, BROOM_HOVER_IDLE, BROOM_HOVER_FWD, BROOM_HOVER_LEFT, BROOM_HOVER_RIGHT, BROOM_HOVER_START,BROOM_MOUNT, BROOM_MOUNT_END,BROOM_DISMOUNT,
|
BROOM_IDLE,BROOM_FWD,BROOM_LEFT,BROOM_RIGHT,BROOM_DOWN,BROOM_UP, BROOM_HOVER_IDLE, BROOM_HOVER_FWD, BROOM_HOVER_LEFT, BROOM_HOVER_RIGHT, BROOM_HOVER_START,BROOM_MOUNT, BROOM_MOUNT_END,BROOM_DISMOUNT,
|
||||||
RUSH_START,RUSH_LOOP,RUSH_END,
|
RUSH_START,RUSH_LOOP,RUSH_END,
|
||||||
THROW_ROCK_START,THROW_ROCK,
|
THROW_ROCK_START,THROW_ROCK,
|
||||||
BACKHAND_SWING_JOG,SWING_FWD,
|
BACKHAND_SWING_JOG,SWING_FWD,SLAM,
|
||||||
HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R,HIT_FACE,HIT_FACE_END,
|
HIT, HIT_FWD, HIT_BWD, HIT_BWD2, HIT_BWD3, HIT_BWD4, HIT_L, HIT_R,HIT_FACE,HIT_FACE_END,
|
||||||
KNOCKDOWN, KNOCKDOWN_FWD, KNOCKDOWN_FWD_SPLT, KNOCKDOWN_FWD_SPLT_HOLD, KNOCKDOWN_BWD, KNOCKDOWN_BWD_SPLT, KNOCKDOWN_BWD_SPLT_HOLD,
|
KNOCKDOWN, KNOCKDOWN_FWD, KNOCKDOWN_FWD_SPLT, KNOCKDOWN_FWD_SPLT_HOLD, KNOCKDOWN_BWD, KNOCKDOWN_BWD_SPLT, KNOCKDOWN_BWD_SPLT_HOLD,
|
||||||
GETUP, GETUP_BWD, GETUP_FWD, GETUP_L, GETUP_L_FD, GETUP_L_FU, GETUP_R, GETUP_R_FD, GETUP_R_FU, GETUP_SLOUCH,
|
GETUP, GETUP_BWD, GETUP_FWD, GETUP_L, GETUP_L_FD, GETUP_L_FU, GETUP_R, GETUP_R_FD, GETUP_R_FU, GETUP_SLOUCH,
|
||||||
|
|||||||
@@ -32,8 +32,12 @@ class ENGINE_DLL CTexture final :
|
|||||||
HRESULT ParseTexturePathToSRVs(const _tchar* pTextureFolderPath);
|
HRESULT ParseTexturePathToSRVs(const _tchar* pTextureFolderPath);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
vector<ID3D11ShaderResourceView*> m_SRVs = { };
|
vector<ID3D11ShaderResourceView*> m_SRVs = {};
|
||||||
|
|
||||||
|
#ifdef EDITOR_PROJECT
|
||||||
_wstring m_wstrPrototypeName = {};
|
_wstring m_wstrPrototypeName = {};
|
||||||
|
#endif //
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static CTexture* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, _uint iNumTextures, _wstring wstrPrototypeName = L"");
|
static CTexture* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, _uint iNumTextures, _wstring wstrPrototypeName = L"");
|
||||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user