public static void GH3MusicPlayerOnCustomFolder(string FileInGameData, string Track) { if (File.Exists(FileInGameData)) { using (PackageStream IEFContainer = new PackageStream(FileInGameData)) { HostedStream MusicToPlay = IEFContainer.GetContainedFileStream(Track); SoundPlayer Player = new SoundPlayer(MusicToPlay); Player.PlayLooping(); } } else { Velotage3DGameEngine.ExceptionManager.GetException.Exception(ExceptionManager.ErrorList.ErrorLoadingToRam); } }
public static void GH3MusicPlayer(string GameContent, string FileInsideContainer) { string FileToLoad = Velotage3DGameEngine.EngineInfo.EngineInfo.GetGameDataFolder() + @"VelotageMusic/" + GameContent; if (File.Exists(FileToLoad)) { using (PackageStream IEFContainer = new PackageStream(FileToLoad)) { HostedStream MusicToPlay = IEFContainer.GetContainedFileStream(FileInsideContainer); SoundPlayer Player = new SoundPlayer(MusicToPlay); Player.PlayLooping(); } } else { Velotage3DGameEngine.ExceptionManager.GetException.Exception(ExceptionManager.ErrorList.ErrorLoadingToRam); } }