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:
parent
9128e64c9a
commit
db3e48c194
@ -30,7 +30,7 @@ namespace osu.Game.Beatmaps
|
|||||||
this.audioManager = audioManager;
|
this.audioManager = audioManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IBeatmap GetBeatmap()
|
protected override IBeatmap GetPlayableBeatmap()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Beatmaps
|
|||||||
this.game = game;
|
this.game = game;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IBeatmap GetBeatmap() => new Beatmap();
|
protected override IBeatmap GetPlayableBeatmap() => new Beatmap();
|
||||||
|
|
||||||
protected override Texture GetBackground() => game.Textures.Get(@"Backgrounds/bg4");
|
protected override Texture GetBackground() => game.Textures.Get(@"Backgrounds/bg4");
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Beatmaps
|
|||||||
Process.Start(path);
|
Process.Start(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract IBeatmap GetBeatmap();
|
protected abstract IBeatmap GetPlayableBeatmap();
|
||||||
protected abstract Texture GetBackground();
|
protected abstract Texture GetBackground();
|
||||||
protected abstract Track GetTrack();
|
protected abstract Track GetTrack();
|
||||||
protected virtual Skin GetSkin() => new DefaultSkin();
|
protected virtual Skin GetSkin() => new DefaultSkin();
|
||||||
@ -71,7 +71,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
private IBeatmap populateBeatmap()
|
private IBeatmap populateBeatmap()
|
||||||
{
|
{
|
||||||
var b = GetBeatmap() ?? new Beatmap();
|
var b = GetPlayableBeatmap() ?? new Beatmap();
|
||||||
|
|
||||||
// use the database-backed info.
|
// use the database-backed info.
|
||||||
b.BeatmapInfo = BeatmapInfo;
|
b.BeatmapInfo = BeatmapInfo;
|
||||||
@ -80,13 +80,16 @@ namespace osu.Game.Beatmaps
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the resulting <see cref="IBeatmap"/> from the conversion of <see cref="Beatmap"/> to a specific <see cref="RulesetInfo"/>.
|
/// Constructs a playable <see cref="IBeatmap"/> from <see cref="Beatmap"/> using the applicable converters for a specific <see cref="RulesetInfo"/>.
|
||||||
/// All mods have been applied to the returned <see cref="IBeatmap"/>.
|
/// <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>
|
/// </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>
|
/// <returns>The converted <see cref="IBeatmap"/>.</returns>
|
||||||
/// <exception cref="BeatmapInvalidForRulesetException">If <see cref="Beatmap"/> could not be converted to <paramref name="ruleset"/>.</exception>
|
/// <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();
|
var rulesetInstance = ruleset.CreateInstance();
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
Beatmap = (Beatmap<TObject>)workingBeatmap.GetBeatmap(ruleset.RulesetInfo);
|
Beatmap = (Beatmap<TObject>)workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo);
|
||||||
|
|
||||||
KeyBindingInputManager = CreateInputManager();
|
KeyBindingInputManager = CreateInputManager();
|
||||||
KeyBindingInputManager.RelativeSizeAxes = Axes.Both;
|
KeyBindingInputManager.RelativeSizeAxes = Axes.Both;
|
||||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
}
|
}
|
||||||
|
|
||||||
private readonly IBeatmap beatmap;
|
private readonly IBeatmap beatmap;
|
||||||
protected override IBeatmap GetBeatmap() => beatmap;
|
protected override IBeatmap GetPlayableBeatmap() => beatmap;
|
||||||
protected override Texture GetBackground() => null;
|
protected override Texture GetBackground() => null;
|
||||||
|
|
||||||
protected override Track GetTrack()
|
protected override Track GetTrack()
|
||||||
|
Loading…
Reference in New Issue
Block a user