mirror of
https://github.com/ppy/osu
synced 2025-01-03 12:52:10 +00:00
Rename method
This commit is contained in:
parent
d1765c8a45
commit
e87f50f74f
@ -106,7 +106,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
|
|
||||||
protected override Texture GetBackground() => throw new NotImplementedException();
|
protected override Texture GetBackground() => throw new NotImplementedException();
|
||||||
|
|
||||||
protected override Track GetTrack() => throw new NotImplementedException();
|
protected override Track GetBeatmapTrack() => throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Tests.Gameplay
|
|||||||
AddStep("create container", () =>
|
AddStep("create container", () =>
|
||||||
{
|
{
|
||||||
var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
|
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());
|
AddStep("start track", () => gcc.Start());
|
||||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Tests.Gameplay
|
|||||||
{
|
{
|
||||||
var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
|
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))
|
gameplayContainer.Add(sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
|
|
||||||
var working = CreateWorkingBeatmap(CreateBeatmap(new OsuRuleset().RulesetInfo));
|
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,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
|
@ -52,7 +52,7 @@ namespace osu.Game.Tests
|
|||||||
|
|
||||||
protected override Waveform GetWaveform() => new Waveform(trackStore.GetStream(firstAudioFile));
|
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
|
private string firstAudioFile
|
||||||
{
|
{
|
||||||
|
@ -476,7 +476,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
protected override IBeatmap GetBeatmap() => beatmap;
|
protected override IBeatmap GetBeatmap() => beatmap;
|
||||||
protected override Texture GetBackground() => null;
|
protected override Texture GetBackground() => null;
|
||||||
protected override Track GetTrack() => null;
|
protected override Track GetBeatmapTrack() => null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ namespace osu.Game.Beatmaps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Track GetTrack()
|
protected override Track GetBeatmapTrack()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
protected override Texture GetBackground() => textures?.Get(@"Backgrounds/bg4");
|
protected override Texture GetBackground() => textures?.Get(@"Backgrounds/bg4");
|
||||||
|
|
||||||
protected override Track GetTrack() => GetVirtualTrack();
|
protected override Track GetBeatmapTrack() => GetVirtualTrack();
|
||||||
|
|
||||||
private class DummyRulesetInfo : RulesetInfo
|
private class DummyRulesetInfo : RulesetInfo
|
||||||
{
|
{
|
||||||
|
@ -54,5 +54,10 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <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>
|
||||||
IBeatmap GetPlayableBeatmap(RulesetInfo ruleset, IReadOnlyList<Mod> mods = null, TimeSpan? timeout = null);
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,9 +249,9 @@ namespace osu.Game.Beatmaps
|
|||||||
protected abstract Texture GetBackground();
|
protected abstract Texture GetBackground();
|
||||||
private readonly RecyclableLazy<Texture> background;
|
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 bool WaveformLoaded => waveform.IsResultAvailable;
|
||||||
public Waveform Waveform => waveform.Value;
|
public Waveform Waveform => waveform.Value;
|
||||||
|
@ -324,7 +324,7 @@ namespace osu.Game.Overlays
|
|||||||
CurrentTrack = new DrawableTrack(new TrackVirtual(1000));
|
CurrentTrack = new DrawableTrack(new TrackVirtual(1000));
|
||||||
|
|
||||||
if (current != null)
|
if (current != null)
|
||||||
CurrentTrack = new DrawableTrack(current.GetRealTrack());
|
CurrentTrack = new DrawableTrack(current.GetTrack());
|
||||||
|
|
||||||
CurrentTrack.Completed += () => onTrackCompleted(current);
|
CurrentTrack.Completed += () => onTrackCompleted(current);
|
||||||
AddInternal(CurrentTrack);
|
AddInternal(CurrentTrack);
|
||||||
|
@ -107,7 +107,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
protected override Texture GetBackground() => throw new NotImplementedException();
|
protected override Texture GetBackground() => throw new NotImplementedException();
|
||||||
|
|
||||||
protected override Track GetTrack() => throw new NotImplementedException();
|
protected override Track GetBeatmapTrack() => throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
if (setInfo != null)
|
if (setInfo != null)
|
||||||
{
|
{
|
||||||
initialBeatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]);
|
initialBeatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]);
|
||||||
UsingThemedIntro = initialBeatmap.GetRealTrack().IsDummyDevice == false;
|
UsingThemedIntro = initialBeatmap.GetTrack().IsDummyDevice == false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return UsingThemedIntro;
|
return UsingThemedIntro;
|
||||||
|
@ -208,7 +208,7 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
|
|
||||||
protected override Texture GetBackground() => throw new NotImplementedException();
|
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)
|
protected override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap, Ruleset ruleset)
|
||||||
{
|
{
|
||||||
|
@ -35,6 +35,6 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
|
|
||||||
protected override Texture GetBackground() => null;
|
protected override Texture GetBackground() => null;
|
||||||
|
|
||||||
protected override Track GetTrack() => null;
|
protected override Track GetBeatmapTrack() => null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
store?.Dispose();
|
store?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Track GetTrack() => track;
|
protected override Track GetBeatmapTrack() => track;
|
||||||
|
|
||||||
public class TrackVirtualStore : AudioCollectionManager<Track>, ITrackStore
|
public class TrackVirtualStore : AudioCollectionManager<Track>, ITrackStore
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user