[add] 간단한 묶음
This commit is contained in:
@@ -107,8 +107,9 @@ HRESULT CModel::Bind_BoneMatrices(_uint iMeshIndex, CShader* pShader, const _cha
|
||||
|
||||
_bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform)
|
||||
{
|
||||
if (!m_bPlayAnim)
|
||||
if (!m_bPlayAnim){
|
||||
return false;
|
||||
}
|
||||
if (-1 == m_iCurrentAnimIndex // 정지 혹은 시작을 안시켜준 애님
|
||||
|| m_iCurrentAnimIndex >= (_int)m_iNumAnimations) // 애님 인덱스 초과됨
|
||||
{
|
||||
@@ -120,7 +121,7 @@ _bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform)
|
||||
if (m_iPreAnimIndex != m_iCurrentAnimIndex && m_iPreAnimIndex != 0)
|
||||
{
|
||||
m_fBlendTime += fTimeDelta;
|
||||
_float fRatio = m_fBlendTime / m_fBlendDuration;
|
||||
_float fRatio = (m_fBlendTime / m_fBlendDuration);
|
||||
fRatio = min(fRatio, 1.f);
|
||||
|
||||
m_bIsFinishedAnim = m_Animations[m_iCurrentAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount);
|
||||
@@ -154,8 +155,9 @@ _bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform)
|
||||
|
||||
void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop,_float fAmount)
|
||||
{
|
||||
if (m_iCurrentAnimIndex == iIndex)
|
||||
if (m_iCurrentAnimIndex == iIndex){
|
||||
return;
|
||||
}
|
||||
if (iIndex >= 0 && iIndex < m_iNumAnimations)
|
||||
{
|
||||
m_iCurrentAnimIndex = iIndex;
|
||||
@@ -164,8 +166,9 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop,_float fAmount)
|
||||
m_Animations[m_iCurrentAnimIndex]->ResetRootMotion();
|
||||
m_Animations[m_iCurrentAnimIndex]->Depart_Animation();
|
||||
}
|
||||
else
|
||||
else {
|
||||
m_iCurrentAnimIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
const _float4x4* CModel::Get_BoneMatrixPtr(const _char* pBoneName) const
|
||||
|
||||
Reference in New Issue
Block a user