Exemplo n.º 1
0
        /// <summary>
        /// Sets the sound (read from a file) that will be used.
        /// </summary>
        /// <param name="package">A ZIP package containing the soundfile to use.</param>
        /// <param name="soundFile">Soundfile relative to package. Must be in OGG format.</param>
        /// <param name="loop">Whether the sound should loop</param>
        public void SetSound(string package, string soundFile, bool loop)
        {
            if (System.IO.File.Exists(package) == false)
            {
                throw new System.IO.FileNotFoundException("The sound file : " + soundFile + "in" + package + " does not exist.");
            }
            _sound = FreeSL.fslLoadSoundFromZip(package, soundFile);

            LoopSound(loop);
            _withSound = true;
        }