1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Rename GetBeatmap() to GetPlayableBeatmap()

This commit is contained in:
smoogipoo 2018-05-07 10:40:30 +09:00
parent 9128e64c9a
commit db3e48c194
5 changed files with 13 additions and 10 deletions

View File

@ -30,7 +30,7 @@ namespace osu.Game.Beatmaps
this.audioManager = audioManager;
}
protected override IBeatmap GetBeatmap()
protected override IBeatmap GetPlayableBeatmap()
{
try
{

View File

@ -40,7 +40,7 @@ namespace osu.Game.Beatmaps
this.game = game;
}
protected override IBeatmap GetBeatmap() => new Beatmap();
protected override IBeatmap GetPlayableBeatmap() => new Beatmap();
protected override Texture GetBackground() => game.Textures.Get(@"Backgrounds/bg4");

View File

@ -57,7 +57,7 @@ namespace osu.Game.Beatmaps
Process.Start(path);
}
protected abstract IBeatmap GetBeatmap();
protected abstract IBeatmap GetPlayableBeatmap();
protected abstract Texture GetBackground();
protected abstract Track GetTrack();
protected virtual Skin GetSkin() => new DefaultSkin();
@ -71,7 +71,7 @@ namespace osu.Game.Beatmaps
private IBeatmap populateBeatmap()
{
var b = GetBeatmap() ?? new Beatmap();
var b = GetPlayableBeatmap() ?? new Beatmap();
// use the database-backed info.
b.BeatmapInfo = BeatmapInfo;
@ -80,13 +80,16 @@ namespace osu.Game.Beatmaps
}
/// <summary>
/// Retrieves the resulting <see cref="IBeatmap"/> from the conversion of <see cref="Beatmap"/> to a specific <see cref="RulesetInfo"/>.
/// All mods have been applied to the returned <see cref="IBeatmap"/>.
/// Constructs a playable <see cref="IBeatmap"/> from <see cref="Beatmap"/> using the applicable converters for a specific <see cref="RulesetInfo"/>.
/// <para>
/// The returned <see cref="IBeatmap"/> is in a playable state - all <see cref="HitObject"/> and <see cref="BeatmapDifficulty"/> <see cref="Mod"/>s
/// have been applied, and <see cref="HitObject"/>s have been fully constructed.
/// </para>
/// </summary>
/// <param name="ruleset">The <see cref="RulesetInfo"/> to convert <see cref="Beatmap"/> to.</param>
/// <param name="ruleset">The <see cref="RulesetInfo"/> to create a playable <see cref="IBeatmap"/> for.</param>
/// <returns>The converted <see cref="IBeatmap"/>.</returns>
/// <exception cref="BeatmapInvalidForRulesetException">If <see cref="Beatmap"/> could not be converted to <paramref name="ruleset"/>.</exception>
public IBeatmap GetBeatmap(RulesetInfo ruleset)
public IBeatmap GetPlayableBeatmap(RulesetInfo ruleset)
{
var rulesetInstance = ruleset.CreateInstance();

View File

@ -212,7 +212,7 @@ namespace osu.Game.Rulesets.UI
RelativeSizeAxes = Axes.Both;
Beatmap = (Beatmap<TObject>)workingBeatmap.GetBeatmap(ruleset.RulesetInfo);
Beatmap = (Beatmap<TObject>)workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo);
KeyBindingInputManager = CreateInputManager();
KeyBindingInputManager.RelativeSizeAxes = Axes.Both;

View File

@ -24,7 +24,7 @@ namespace osu.Game.Tests.Beatmaps
}
private readonly IBeatmap beatmap;
protected override IBeatmap GetBeatmap() => beatmap;
protected override IBeatmap GetPlayableBeatmap() => beatmap;
protected override Texture GetBackground() => null;
protected override Track GetTrack()