Пример #1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="IntralismHelper"/> class.
        /// </summary>
        /// <param name="maniaBeatMap"> The beatmap that the helper class is reading from. </param>
        public IntralismHelper(ManiaBeatMap maniaBeatMap)
        {
            this.maniaBeatMap     = maniaBeatMap;
            this.storyboardHelper = new IntralismStoryboardHelper(maniaBeatMap);
            this.ImagePaths       = this.storyboardHelper.ImagePaths;
            this.IconFile         = this.storyboardHelper.ImagePaths[0];

            this.AllEvents      = this.GetAllEvents();
            this.LevelResources = this.ImagePaths.Select(path => new LevelResource(Path.GetFileName(path)));
        }
Пример #2
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="IntralismBeatMap"/> class.
        /// </summary>
        /// <param name="maniaBeatMap">Creates a <see cref="IntralismBeatMap"/> from a <see cref="ManiaBeatMap"/>.</param>
        public IntralismBeatMap(ManiaBeatMap maniaBeatMap)
        {
            this.Helper = new IntralismHelper(maniaBeatMap);

            this.Name           = this.Helper.Name;
            this.Info           = this.Helper.Info;
            this.LevelResources = this.Helper.LevelResources;
            this.MusicTime      = this.Helper.MusicTime;
            this.Events         = this.Helper.AllEvents;
            this.IconFile       = this.Helper.IconFile;
        }
Пример #3
0
        /// <summary>
        ///     Reads mania data and saves it as an intralism beatmap.
        /// </summary>
        /// <param name="pathToBeatmapFile"> The path to a osu mania ".osu" file. </param>
        /// <param name="outputFolder"> The path to the intralism beatmap output. </param>
        /// <param name="speed">The speed of the beatmap.</param>
        /// <returns> A <see cref="Task"/> representing the asynchronous operation. </returns>
        public static async Task AsyncConvertManiaToIntralism(string pathToBeatmapFile, string outputFolder, double speed = 0)
        {
            ManiaBeatMap     maniaBeatMap     = ManiaBeatMap.ReadFromOsuFile(pathToBeatmapFile);
            IntralismBeatMap intralismBeatMap = new(maniaBeatMap);

            if (speed != 0)
            {
                intralismBeatMap.Speed = speed;
            }

            string audioFileName = maniaBeatMap.GeneralSection.AudioFilename;

            await SaveFiles(pathToBeatmapFile, outputFolder, audioFileName, intralismBeatMap.Helper, intralismBeatMap);
        }
 /// <summary>
 ///     Initializes a new instance of the <see cref="IntralismStoryboardHelper"/> class.
 /// </summary>
 /// <param name="maniaBeatMap"> A beatmap having data pulled from. </param>
 public IntralismStoryboardHelper(ManiaBeatMap maniaBeatMap)
 {
     this.maniaBeatMap = maniaBeatMap;
     this.FillStoryboardAndImagePaths();
 }