void LeprechaunSound::update(const GameTime& gameTime)
{
	SoundComponent::update(gameTime);

	LeprechaunController& leprechaun = getController();
	setEmitter(leprechaun.getPosition(), leprechaun.getForward(), Vector3::up);

	if (leprechaun.isBeginKick() || leprechaun.isBeginCaneAnimation() || leprechaun.isBeginHatAnimation())
		play3DSound("hey");

	if (leprechaun.isBeginCaneHit() || leprechaun.isBeginFly() || leprechaun.isBeginStoneHit())
		play3DSound("punch");

	if (!leprechaun.isLocal())
		return;

	if (leprechaun.hasUsedItem())
	{
		stopSound("yes hahaha");
		playSound("yes hahaha");
		//play3DSound("yes hahaha");
	}

	if (leprechaun.hasCollectedItem())
	{
		stopSound("door slamming");
		playSound("door slamming");
		//play3DSound("door slamming");
	}
}
void AudioManager::playBlootSplat(Ogre::Vector3 v)
{
	current_blood++;
	if(current_blood == SOUNDS_NUM_BLOOD)
		current_blood = 0;
	play3DSound(_blood_splats[current_blood], 0, v);
}
void AudioManager::playPintoDie(Ogre::Vector3 v)
{
	play3DSound(_pinto_die, 0, v);
}
void AudioManager::playHairChange(Ogre::Vector3 v)
{
	play3DSound(_change_hair, 0, v);
}
void AudioManager::playPintoSpawn(Ogre::Vector3 v)
{
	play3DSound(_pinto_spawn, 0, v);
}
void AudioManager::playPickWeapon(Ogre::Vector3 v)
{
	play3DSound(_pick_weapon, 0, v);
}
void AudioManager::playOutOfAmmo(Ogre::Vector3 v)
{
	play3DSound(_out_of_ammo, 0, v);
}
void AudioManager::playBlasterCharge(Ogre::Vector3 v, uint32_t sound_volume)
{
	play3DSound(_blaster_charge, 0, v, sound_volume);
}
void AudioManager::playDeath(Ogre::Vector3 v) {
	play3DSound(_death, 0, v);
}
示例#10
0
void AudioManager::playReload(Ogre::Vector3 v, uint32_t weapon_id) 
{
	play3DSound(_reloads[weapon_id], 0, v);
}
示例#11
0
void AudioManager::playJetPack(Ogre::Vector3 v) {
	play3DSound(_jetpack, 0, v);
}
示例#12
0
void AudioManager::playWalkStep(Ogre::Vector3 v) {
	play3DSound(_footstep[RAND_RANGE(0, 7)], 0, v);
}
示例#13
0
void AudioManager::playBulletDirtCollision(Ogre::Vector3 v) {
	current_dust++;
	if(current_dust == SOUNDS_NUM_BULLET)
		current_dust = 0;
	play3DSound(_bulletDirtCollision[current_dust], 0, v);
}
示例#14
0
void AudioManager::playWeaponFire(Ogre::Vector3 v, uint32_t weapon_id, uint32_t sound_volume) {
	current_fire++;
	if(current_fire == SOUNDS_NUM_PER_WEAPON)
		current_fire = 0;
	play3DSound(_rifleFire[weapon_id][current_fire], 0, v, sound_volume);
}