Fix defaults not being set (keep in mind this will be changed in a later pullrequest).

This commit is contained in:
smoogipooo
2017-03-14 19:04:40 +09:00
parent 785b970125
commit 069a7a24ce
9 changed files with 13 additions and 19 deletions

View File

@ -16,7 +16,8 @@ namespace osu.Game.Beatmaps
/// Sets default values for a HitObject.
/// </summary>
/// <param name="hitObject">The HitObject to set default values for.</param>
void SetDefaults(T hitObject);
/// <param name="beatmap">The Beatmap to extract the default values from.</param>
void SetDefaults(T hitObject, Beatmap<T> beatmap);
/// <summary>
/// Post-processes a Beatmap to add mode-specific components that aren't added during conversion.

View File

@ -23,11 +23,5 @@ namespace osu.Game.Modes.Objects
/// The sample to be played when this HitObject is hit.
/// </summary>
public HitSampleInfo Sample { get; set; }
/// <summary>
/// Sets default parameters from a beatmap.
/// </summary>
/// <param name="beatmap">The beatmap to set from.</param>
public virtual void SetDefaultsFromBeatmap(Beatmap beatmap) { }
}
}

View File

@ -65,7 +65,7 @@ namespace osu.Game.Modes.UI
// Convert + process the beatmap
Beatmap = CreateBeatmapConverter().Convert(beatmap.Beatmap);
Beatmap.HitObjects.ForEach(CreateBeatmapProcessor().SetDefaults);
Beatmap.HitObjects.ForEach(h => CreateBeatmapProcessor().SetDefaults(h, Beatmap));
CreateBeatmapProcessor().PostProcess(Beatmap);
applyMods(beatmap.Mods.Value);