private string EnumToFilename(SongFiles song)
 {
     string enumName = song.ToString();
     return enumName.Remove(0, "song_".Length) + ".mid";
 }
        private string EnumToFilename(SongFiles song)
        {
            string enumName = song.ToString();

            return(enumName.Remove(0, "song_".Length) + ".mid");
        }
예제 #3
0
 /// <summary>
 /// Load custom sound file from disk.
 /// </summary>
 /// <param name="song"></param>
 /// <returns></returns>
 static public WWW LoadCustomSong(SongFiles song)
 {
     return(GetWwwFile(song.ToString() + songExtension));
 }
 /// <summary>
 /// Seek song from mods.
 /// </summary>
 /// <param name="song">Song to seek.</param>
 /// <param name="audioClip">Audioclip with imported sound data.</param>
 /// <returns>True if song is found.</returns>
 public static bool TryImportSong(SongFiles song, out AudioClip audioClip)
 {
     return(TryImportAudioClip(song.ToString(), ".ogg", true, out audioClip));
 }
예제 #5
0
 /// <summary>
 /// Check if song file exist on disk.
 /// </summary>
 /// <param name="song">Name of song.</param>
 /// <returns></returns>
 static public bool CustomSongExist(SongFiles song)
 {
     return(SoundFileExist(song.ToString() + songExtension));
 }