本文整理汇总了C++中ISkeletonAnim::StopAnimationInLayer方法的典型用法代码示例。如果您正苦于以下问题:C++ ISkeletonAnim::StopAnimationInLayer方法的具体用法?C++ ISkeletonAnim::StopAnimationInLayer怎么用?C++ ISkeletonAnim::StopAnimationInLayer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISkeletonAnim
的用法示例。
在下文中一共展示了ISkeletonAnim::StopAnimationInLayer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReplayStopThirdPersonAnimations
void CMountedGunController::ReplayStopThirdPersonAnimations( ICharacterInstance* pCharacter )
{
assert(pCharacter);
ISkeletonAnim *pSkeletonAnim = pCharacter->GetISkeletonAnim();
assert(pSkeletonAnim);
pSkeletonAnim->StopAnimationInLayer(REPLAY_PLAYER_ANIMATION_LAYER_AIM_UP, 0.1f);
pSkeletonAnim->StopAnimationInLayer(REPLAY_PLAYER_ANIMATION_LAYER_AIM_DOWN, 0.1f);
}
示例2: StopAnimationOnLayer
void CActionScope::StopAnimationOnLayer(uint32 layer, float blendTime)
{
CRY_ASSERT_MESSAGE(layer < m_numLayers, "Overrunning scope!");
ISkeletonAnim *pSkelAnim = m_scopeContext.charInst->GetISkeletonAnim();
const uint32 actualLayer = layer + m_layer;
pSkelAnim->StopAnimationInLayer(actualLayer, blendTime);
}
示例3: StopAnimationInLayer
bool CAnimationProxyDualCharacterUpper::StopAnimationInLayer(IEntity *entity, int32 nLayer, f32 BlendOutTime)
{
ICharacterInstance* pICharacter = entity->GetCharacter(m_characterMain);
if (pICharacter)
{
ISkeletonAnim* pISkeletonAnim = pICharacter->GetISkeletonAnim();
ICharacterInstance* pIShadowCharacter = m_firstPersonMode ? entity->GetCharacter(m_characterShadow) : NULL;
if (pIShadowCharacter)
{
ISkeletonAnim* pIShadowSkeletonAnim = pIShadowCharacter->GetISkeletonAnim();
pIShadowSkeletonAnim->StopAnimationInLayer(nLayer, BlendOutTime);
}
return pISkeletonAnim->StopAnimationInLayer(nLayer, BlendOutTime);
}
return false;
}
示例4: StopAnimationInLayer
void CScriptbind_Entity::StopAnimationInLayer(IEntity *pEntity, int slot, int layer, float blendOutTime)
{
ICharacterInstance *pCharacter = pEntity->GetCharacter(slot);
if(!pCharacter)
return;
ISkeletonAnim *pSkeletonAnim = pCharacter->GetISkeletonAnim();
if(!pSkeletonAnim)
return;
pSkeletonAnim->StopAnimationInLayer(layer, blendOutTime);
}
示例5: StopLipSync
void CLipSyncProvider_TransitionQueue::StopLipSync(IEntityAudioProxy* pProxy, const AudioControlId audioTriggerId, const ELipSyncMethod lipSyncMethod)
{
CRY_ASSERT(pProxy);
CRY_ASSERT(audioTriggerId != INVALID_AUDIO_CONTROL_ID);
CRY_ASSERT((m_state == eS_Started) || (m_state == eS_Requested) || (m_state == eS_Unpaused) || (m_state == eS_Paused));
if (lipSyncMethod != eLSM_None)
{
if (m_state == eS_Requested)
{
CRY_ASSERT(m_soundId == INVALID_AUDIO_CONTROL_ID);
}
else
{
CRY_ASSERT(audioTriggerId == m_soundId);
if (ICharacterInstance* pChar = GetCharacterInstance())
{
if (m_requestedAnimId >= 0)
{
ISkeletonAnim* skeletonAnimation = pChar->GetISkeletonAnim();
// NOTE: there is no simple way to just stop the exact animation we started, but this should do too:
bool success = skeletonAnimation->StopAnimationInLayer(m_nAnimLayer, LIPSYNC_STOP_TRANSITION_TIME);
CRY_ASSERT(success);
}
}
m_soundId = INVALID_AUDIO_CONTROL_ID;
m_isSynchronized = false;
}
m_cachedAnim = CAutoResourceCache_CAF();
}
m_state = eS_Stopped;
}
示例6: Resume
void CActionScope::Resume(float forcedBlendTime, uint32 resumeFlags)
{
if (!m_scopeContext.charInst)
{
return;
}
IAnimationSet *pAnimSet = m_scopeContext.charInst->GetIAnimationSet();
if (!pAnimSet)
{
return;
}
ISkeletonAnim *pSkeletonAnim = m_scopeContext.charInst->GetISkeletonAnim();
if (!pSkeletonAnim)
{
return;
}
const bool useDefaultBlendTime = (forcedBlendTime < 0);
for (int i = 0; i < m_numLayers; ++i)
{
SSequencer &sequencer = m_layerSequencers[i];
const int animationLayer = m_layer + i;
const float blendTime = useDefaultBlendTime ? sequencer.blend.duration : forcedBlendTime;
if (sequencer.savedAnimNormalisedTime < 0)
{
pSkeletonAnim->StopAnimationInLayer(animationLayer, blendTime);
}
else
{
const uint32 pos = sequencer.pos - 1;
if (pos < sequencer.sequence.size())
{
SAnimClip& clip = sequencer.sequence[pos];
const int animID = pAnimSet->GetAnimIDByCRC(clip.animation.animRef.crc);
if (0 <= animID)
{
CryCharAnimationParams params;
InitAnimationParams(clip.animation, i, clip.blend, params);
const bool installAnimationSuccess = InstallAnimation(animID, params);
if (installAnimationSuccess)
{
const int animationsInLayer = pSkeletonAnim->GetNumAnimsInFIFO(animationLayer);
CRY_ASSERT(1 <= animationsInLayer);
const bool loopingAnimation = ((clip.animation.flags & CA_LOOP_ANIMATION) != 0);
const uint32 restoreAnimationTimeFlagToCheck = loopingAnimation ? IActionController::ERF_RestoreLoopingAnimationTime : IActionController::ERF_RestoreNonLoopingAnimationTime;
const bool restoreAnimationTime = ((restoreAnimationTimeFlagToCheck & resumeFlags) != 0);
if (restoreAnimationTime)
{
const int lastAnimationIndex = animationsInLayer - 1;
CAnimation &animation = pSkeletonAnim->GetAnimFromFIFO(animationLayer, lastAnimationIndex);
pSkeletonAnim->SetAnimationNormalizedTime(&animation, sequencer.savedAnimNormalisedTime);
}
}
}
}
}
}
}