///<summary>Raises the SoundTrigger Event</summary> /// <param name="e">A SoundTriggerEventArgs object containing /// the data sent from the simulator</param> protected virtual void OnSoundTrigger(SoundTriggerEventArgs e) { EventHandler <SoundTriggerEventArgs> handler = m_SoundTrigger; if (handler != null) { handler(this, e); } }
/// <summary> /// Handle request to play a sound, which might (or mioght not) have been preloaded. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Sound_SoundTrigger(object sender, SoundTriggerEventArgs e) { if (e.SoundID == UUID.Zero) return; Logger.Log("Trigger sound " + e.SoundID.ToString() + " in object " + e.ObjectID.ToString(), Helpers.LogLevel.Debug); new BufferSound( e.ObjectID, e.SoundID, false, true, e.Position, e.Gain * ObjectVolume); }
///<summary>Raises the SoundTrigger Event</summary> /// <param name="e">A SoundTriggerEventArgs object containing /// the data sent from the simulator</param> protected virtual void OnSoundTrigger(SoundTriggerEventArgs e) { EventHandler<SoundTriggerEventArgs> handler = m_SoundTrigger; if (handler != null) handler(this, e); }
///<summary>Raises the SoundTrigger Event</summary> /// <param name="e">A SoundTriggerEventArgs object containing /// the data sent from the simulator</param> protected virtual void OnSoundTrigger(SoundTriggerEventArgs e) { EventHandler <SoundTriggerEventArgs> handler = m_SoundTrigger; handler?.Invoke(this, e); }
public override void Sound_OnSoundTrigger(object sender, SoundTriggerEventArgs e) { if (!MaintainSounds) return; var soundID = e.SoundID; var gain = e.Gain; var objectID = e.ObjectID; var ownerID = e.OwnerID; var parentID = e.ParentID; var position = e.Position; var p = GetRegion(e.RegionHandle).LocalToGlobal(position); EnqueueRequestAsset(soundID, AssetType.Sound, true); EventQueue.Enqueue(() => { if (objectID != UUID.Zero) OnObjectSound(objectID, soundID, gain); else { SendNewRegionEvent(SimEventType.EFFECT, "On-Sound-Position-Trigger", soundID, ownerID, parentID, gain, p); } }); }
public virtual void Sound_OnSoundTrigger(object sender, SoundTriggerEventArgs e) { OnEvent("On-Sound-Trigger", paramNamesOnSoundTrigger, paramTypesOnSoundTrigger, e); }