Rename method

This commit is contained in:
smoogipoo 2020-08-07 22:31:41 +09:00
parent d1765c8a45
commit e87f50f74f
16 changed files with 21 additions and 16 deletions

View File

@ -106,7 +106,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
protected override Texture GetBackground() => throw new NotImplementedException();
protected override Track GetTrack() => throw new NotImplementedException();
protected override Track GetBeatmapTrack() => throw new NotImplementedException();
}
}
}

View File

@ -22,7 +22,7 @@ namespace osu.Game.Tests.Gameplay
AddStep("create container", () =>
{
var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
Add(gcc = new GameplayClockContainer(working.GetRealTrack(), working, Array.Empty<Mod>(), 0));
Add(gcc = new GameplayClockContainer(working.GetTrack(), working, Array.Empty<Mod>(), 0));
});
AddStep("start track", () => gcc.Start());

View File

@ -61,7 +61,7 @@ namespace osu.Game.Tests.Gameplay
{
var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
Add(gameplayContainer = new GameplayClockContainer(working.GetRealTrack(), working, Array.Empty<Mod>(), 0));
Add(gameplayContainer = new GameplayClockContainer(working.GetTrack(), working, Array.Empty<Mod>(), 0));
gameplayContainer.Add(sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
{

View File

@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual.Gameplay
var working = CreateWorkingBeatmap(CreateBeatmap(new OsuRuleset().RulesetInfo));
Child = gameplayClockContainer = new GameplayClockContainer(working.GetRealTrack(), working, Array.Empty<Mod>(), 0)
Child = gameplayClockContainer = new GameplayClockContainer(working.GetTrack(), working, Array.Empty<Mod>(), 0)
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]

View File

@ -52,7 +52,7 @@ namespace osu.Game.Tests
protected override Waveform GetWaveform() => new Waveform(trackStore.GetStream(firstAudioFile));
protected override Track GetTrack() => trackStore.Get(firstAudioFile);
protected override Track GetBeatmapTrack() => trackStore.Get(firstAudioFile);
private string firstAudioFile
{

View File

@ -476,7 +476,7 @@ namespace osu.Game.Beatmaps
protected override IBeatmap GetBeatmap() => beatmap;
protected override Texture GetBackground() => null;
protected override Track GetTrack() => null;
protected override Track GetBeatmapTrack() => null;
}
}

View File

@ -70,7 +70,7 @@ namespace osu.Game.Beatmaps
}
}
protected override Track GetTrack()
protected override Track GetBeatmapTrack()
{
try
{

View File

@ -45,7 +45,7 @@ namespace osu.Game.Beatmaps
protected override Texture GetBackground() => textures?.Get(@"Backgrounds/bg4");
protected override Track GetTrack() => GetVirtualTrack();
protected override Track GetBeatmapTrack() => GetVirtualTrack();
private class DummyRulesetInfo : RulesetInfo
{

View File

@ -54,5 +54,10 @@ namespace osu.Game.Beatmaps
/// <returns>The converted <see cref="IBeatmap"/>.</returns>
/// <exception cref="BeatmapInvalidForRulesetException">If <see cref="Beatmap"/> could not be converted to <paramref name="ruleset"/>.</exception>
IBeatmap GetPlayableBeatmap(RulesetInfo ruleset, IReadOnlyList<Mod> mods = null, TimeSpan? timeout = null);
/// <summary>
/// Retrieves the <see cref="Track"/> which this <see cref="WorkingBeatmap"/> provides.
/// </summary>
Track GetTrack();
}
}

View File

@ -249,9 +249,9 @@ namespace osu.Game.Beatmaps
protected abstract Texture GetBackground();
private readonly RecyclableLazy<Texture> background;
public Track GetRealTrack() => GetTrack() ?? GetVirtualTrack(1000);
public Track GetTrack() => GetBeatmapTrack() ?? GetVirtualTrack(1000);
protected abstract Track GetTrack();
protected abstract Track GetBeatmapTrack();
public bool WaveformLoaded => waveform.IsResultAvailable;
public Waveform Waveform => waveform.Value;

View File

@ -324,7 +324,7 @@ namespace osu.Game.Overlays
CurrentTrack = new DrawableTrack(new TrackVirtual(1000));
if (current != null)
CurrentTrack = new DrawableTrack(current.GetRealTrack());
CurrentTrack = new DrawableTrack(current.GetTrack());
CurrentTrack.Completed += () => onTrackCompleted(current);
AddInternal(CurrentTrack);

View File

@ -107,7 +107,7 @@ namespace osu.Game.Screens.Edit
protected override Texture GetBackground() => throw new NotImplementedException();
protected override Track GetTrack() => throw new NotImplementedException();
protected override Track GetBeatmapTrack() => throw new NotImplementedException();
}
}
}

View File

@ -115,7 +115,7 @@ namespace osu.Game.Screens.Menu
if (setInfo != null)
{
initialBeatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]);
UsingThemedIntro = initialBeatmap.GetRealTrack().IsDummyDevice == false;
UsingThemedIntro = initialBeatmap.GetTrack().IsDummyDevice == false;
}
return UsingThemedIntro;

View File

@ -208,7 +208,7 @@ namespace osu.Game.Tests.Beatmaps
protected override Texture GetBackground() => throw new NotImplementedException();
protected override Track GetTrack() => throw new NotImplementedException();
protected override Track GetBeatmapTrack() => throw new NotImplementedException();
protected override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap, Ruleset ruleset)
{

View File

@ -35,6 +35,6 @@ namespace osu.Game.Tests.Beatmaps
protected override Texture GetBackground() => null;
protected override Track GetTrack() => null;
protected override Track GetBeatmapTrack() => null;
}
}

View File

@ -223,7 +223,7 @@ namespace osu.Game.Tests.Visual
store?.Dispose();
}
protected override Track GetTrack() => track;
protected override Track GetBeatmapTrack() => track;
public class TrackVirtualStore : AudioCollectionManager<Track>, ITrackStore
{