コード例 #1
0
ファイル: BeatmapManager.cs プロジェクト: Wieku/osu
        private WorkingBeatmap addDifficultyToSet(BeatmapSetInfo targetBeatmapSet, IBeatmap newBeatmap, ISkin beatmapSkin)
        {
            // populate circular beatmap set info <-> beatmap info references manually.
            // several places like `Save()` or `GetWorkingBeatmap()`
            // rely on them being freely traversable in both directions for correct operation.
            targetBeatmapSet.Beatmaps.Add(newBeatmap.BeatmapInfo);
            newBeatmap.BeatmapInfo.BeatmapSet = targetBeatmapSet;

            Save(newBeatmap.BeatmapInfo, newBeatmap, beatmapSkin);

            workingBeatmapCache.Invalidate(targetBeatmapSet);
            return(GetWorkingBeatmap(newBeatmap.BeatmapInfo));
        }
コード例 #2
0
 void IWorkingBeatmapCache.Invalidate(BeatmapSetInfo beatmapSetInfo) => workingBeatmapCache.Invalidate(beatmapSetInfo);