当前位置: 首页>>代码示例>>C++>>正文


C++ CServerDE::KillSound方法代码示例

本文整理汇总了C++中CServerDE::KillSound方法的典型用法代码示例。如果您正苦于以下问题:C++ CServerDE::KillSound方法的具体用法?C++ CServerDE::KillSound怎么用?C++ CServerDE::KillSound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CServerDE的用法示例。


在下文中一共展示了CServerDE::KillSound方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: StopShieldSound

void Gabriel::StopShieldSound()
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE || !m_hShieldSound) return;

	if (m_hShieldSound)
	{
		pServerDE->KillSound(m_hShieldSound);
		m_hShieldSound = DNULL;
	}
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:11,代码来源:Gabriel.cpp

示例2: SetOff

void Rotating::SetOff()
{
	CServerDE* pServerDE = BaseClass::GetServerDE();
	if (!pServerDE) return;

	m_eState = RWM_OFF;

	if (m_sndLastSound)
	{
		pServerDE->KillSound(m_sndLastSound);
		m_sndLastSound = DNULL;
	}
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:13,代码来源:Rotating.cpp

示例3:

CProjectile::~CProjectile()
{
	CServerDE* pServerDE = BaseClass::GetServerDE();
	if (!pServerDE) return;

	if (m_hLight)
		pServerDE->RemoveObject(m_hLight);

	if (m_hSmokeTrail) 
		pServerDE->RemoveObject(m_hSmokeTrail);

	if (m_hstrShockwaveFilename)
		pServerDE->FreeString(m_hstrShockwaveFilename);

	if (m_hSound)
		{ pServerDE->KillSound(m_hSound); m_hSound = DNULL; }
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:17,代码来源:Projectile.cpp

示例4: StartSound

void Rotating::StartSound(HSTRING hstrSoundName, DBOOL bLoop)
{
	CServerDE* pServerDE = BaseClass::GetServerDE();
	if (!pServerDE) return;

	// Stop the last sound if there is one...

	if (m_sndLastSound)
	{
		pServerDE->KillSound(m_sndLastSound);
		m_sndLastSound = DNULL;
	}

	if (!hstrSoundName) return;

	char *pSoundName = pServerDE->GetStringData(hstrSoundName);
	if (!pSoundName) return;


	PlaySoundInfo playSoundInfo;
	PLAYSOUNDINFO_INIT(playSoundInfo);

	playSoundInfo.m_dwFlags = PLAYSOUND_3D | PLAYSOUND_REVERB;
	playSoundInfo.m_dwFlags |= PLAYSOUND_ATTACHED;

	if (bLoop)
	{
		playSoundInfo.m_dwFlags |= PLAYSOUND_LOOP | PLAYSOUND_GETHANDLE;
	}

	_mbsncpy((unsigned char*)playSoundInfo.m_szSoundName, (const unsigned char*)pSoundName, _MAX_PATH);
	playSoundInfo.m_hObject = m_hObject;
	playSoundInfo.m_fOuterRadius = m_fSoundRadius;
	playSoundInfo.m_fInnerRadius = 200;

	pServerDE->PlaySound(&playSoundInfo);

	// Save the handle of the sound...

	m_sndLastSound = playSoundInfo.m_hSound;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:41,代码来源:Rotating.cpp


注:本文中的CServerDE::KillSound方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。