Ejemplo n.º 1
0
        /// <summary>
        /// Creates a SoundConnection.  You can use a scene name or a custom name.  This overload is used for PlayMethods that use Random Delay In Range.
        /// </summary>
        /// <returns>
        /// The SoundConnection.
        /// </returns>
        /// <param name='lvl'>
        /// The level name of the SoundConnection.
        /// </param>
        /// <param name='method'>
        /// The PlayMethod.
        /// </param>
        /// <param name='minDelayPlay'>
        /// The minimum delay.
        /// </param>
        /// <param name='maxDelayPlay'>
        /// The maximum delay.
        /// </param>
        /// <param name='audioList'>
        /// Audio list.
        /// </param>
        public static SoundConnection CreateSoundConnection(string lvl, SoundManager.PlayMethod method, float minDelayPlay, float maxDelayPlay, params AudioClip[] audioList)
        {
            SoundConnection sc = new SoundConnection(lvl, method, minDelayPlay, maxDelayPlay, audioList);

            if (!Application.CanStreamedLevelBeLoaded(lvl))
            {
                sc.SetToCustom();
            }
            return(sc);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a SoundConnection.  You can use a scene name or a custom name.  Will default to ContinousPlayThrough.
        /// </summary>
        /// <returns>
        /// The SoundConnection.
        /// </returns>
        /// <param name='lvl'>
        /// The level name of the SoundConnection.
        /// </param>
        /// <param name='audioList'>
        /// Audio list.
        /// </param>
        public static SoundConnection CreateSoundConnection(string lvl, params AudioClip[] audioList)
        {
            SoundConnection sc = new SoundConnection(lvl, SoundManager.PlayMethod.ContinuousPlayThrough, audioList);

            if (!Application.CanStreamedLevelBeLoaded(lvl))
            {
                sc.SetToCustom();
            }
            return(sc);
        }