本文整理汇总了C++中IEntitySoundProxy::StopAllSounds方法的典型用法代码示例。如果您正苦于以下问题:C++ IEntitySoundProxy::StopAllSounds方法的具体用法?C++ IEntitySoundProxy::StopAllSounds怎么用?C++ IEntitySoundProxy::StopAllSounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEntitySoundProxy
的用法示例。
在下文中一共展示了IEntitySoundProxy::StopAllSounds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Quiet
//------------------------------------------------------------------------
void CItem::Quiet()
{
IEntitySoundProxy *pSoundProxy = GetSoundProxy(false);
if (pSoundProxy)
{
pSoundProxy->StopAllSounds();
}
}
示例2: ClearEntityAudio
//------------------------------------------------------------------------
void CGameRulesKingOfTheHillObjective::ClearEntityAudio( SHoldEntityDetails *pDetails )
{
IEntity *pEntity = gEnv->pEntitySystem->GetEntity(pDetails->m_id);
if(pEntity)
{
IEntitySoundProxy *soundProxy = (IEntitySoundProxy*) pEntity->GetProxy(ENTITY_PROXY_SOUND);
if(soundProxy)
{
soundProxy->StopAllSounds();
}
}
}
示例3: Quiet
//------------------------------------------------------------------------
void CItem::Quiet()
{
IEntitySoundProxy *pSoundProxy = GetSoundProxy(false);
if (pSoundProxy)
{
for (TInstanceActionMap::iterator it = m_instanceActions.begin(); it != m_instanceActions.end(); ++it)
{
SInstanceAction &action = it->second;
for (int i=0;i<2;i++)
{
if (action.sound[i].id != INVALID_SOUNDID)
{
pSoundProxy->SetStaticSound(action.sound[i].id, false);
action.sound[i].id = INVALID_SOUNDID;
}
}
}
pSoundProxy->StopAllSounds();
}
}