本文整理汇总了C++中ISound::GetInterfaceDeprecated方法的典型用法代码示例。如果您正苦于以下问题:C++ ISound::GetInterfaceDeprecated方法的具体用法?C++ ISound::GetInterfaceDeprecated怎么用?C++ ISound::GetInterfaceDeprecated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISound
的用法示例。
在下文中一共展示了ISound::GetInterfaceDeprecated方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
//------------------------------------------------------------------------
void CScan::Update(float frameTime, uint32 frameId)
{
if (m_scanning && m_pWeapon->IsClient())
{
if (m_delayTimer>0.0f)
{
m_delayTimer -= frameTime;
if (m_delayTimer>0.0f)
return;
m_delayTimer = 0.0f;
int slot = m_pWeapon->GetStats().fp ? eIGS_FirstPerson : eIGS_ThirdPerson;
int id = m_pWeapon->GetStats().fp ? 0 : 1;
m_scanLoopId=m_pWeapon->PlayAction(m_scanactions.scan, 0, true, CItem::eIPAF_Default|CItem::eIPAF_CleanBlending);
ISound *pSound = m_pWeapon->GetSoundProxy()->GetSound(m_scanLoopId);
if (pSound)
pSound->GetInterfaceDeprecated()->SetLoopMode(true);
}
if(m_delayTimer==0.0f)
{
if(m_tagEntitiesDelay>0.0f)
{
m_tagEntitiesDelay-=frameTime;
if(m_tagEntitiesDelay<=0.0f)
{
m_tagEntitiesDelay = 0.0f;
//Here is when entities are displayed on Radar
if(gEnv->pGame->GetIGameFramework()->GetClientActor() == m_pWeapon->GetOwnerActor())
{
if(gEnv->bServer)
NetShoot(ZERO, 0);
else
m_pWeapon->RequestShoot(0, ZERO, ZERO, ZERO, ZERO, 1.0f, 0, false);
}
}
}
if (m_durationTimer>0.0f)
{
m_durationTimer-=frameTime;
if (m_durationTimer<=0.0f)
{
m_durationTimer=0.0f;
StopFire();
//m_pWeapon->RequestShoot(0, ZERO, ZERO, ZERO, ZERO, 1.0f, 0, false);
}
}
}
m_pWeapon->RequireUpdate(eIUS_FireMode);
}
}
示例2: NetStartFire
//------------------------------------------------------------------------
void CScan::NetStartFire()
{
if (!m_pWeapon->IsClient())
return;
m_scanLoopId=m_pWeapon->PlayAction(m_scanactions.scan);
ISound *pSound = m_pWeapon->GetSoundProxy()->GetSound(m_scanLoopId);
if (pSound)
pSound->GetInterfaceDeprecated()->SetLoopMode(true);
}