/// <summary> /// Schedules a new budget pad. /// </summary> /// <param name="snd">The Sound that is to play.</param> /// <param name="priority">The priority of the pad.</param> /// <param name="fadeInTimeSec">The pads fadein time in seconds.</param> /// <returns>A new SoundBudgetPad.</returns> public SoundBudgetPad Push(ContentRef <Sound> snd, SoundBudgetPriority priority, float fadeInTimeSec = DefaultFadeInTime) { SoundInstance inst = DualityApp.Sound.PlaySound(snd); SoundBudgetPad bP = new SoundBudgetPad(inst, priority); bP.Instance.Paused = true; if (fadeInTimeSec > 0.05f) { bP.Instance.BeginFadeIn(fadeInTimeSec); } this.budgetPads.Add(bP); return(bP); }
/// <summary> /// Schedules a new budget pad. /// </summary> /// <param name="snd">The Sound that is to play.</param> /// <param name="priority">The priority of the pad.</param> /// <param name="fadeInTimeSec">The pads fadein time in seconds.</param> /// <returns>A new SoundBudgetPad.</returns> public SoundBudgetPad Push(ContentRef<Sound> snd, SoundBudgetPriority priority, float fadeInTimeSec = DefaultFadeInTime) { SoundInstance inst = DualityApp.Sound.PlaySound(snd); SoundBudgetPad bP = new SoundBudgetPad(inst, priority); bP.Instance.Paused = true; if (fadeInTimeSec > 0.05f) bP.Instance.BeginFadeIn(fadeInTimeSec); this.budgetPads.Add(bP); return bP; }