mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:33:20 +08:00
Cleanups
This commit is contained in:
parent
474191fcec
commit
4763a41c7e
@ -18,9 +18,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
public class TestSceneMatchSettingsOverlay : MultiplayerTestScene
|
public class TestSceneMatchSettingsOverlay : MultiplayerTestScene
|
||||||
{
|
{
|
||||||
[Resolved]
|
|
||||||
private OsuGameBase game { get; set; }
|
|
||||||
|
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
typeof(MatchSettingsOverlay)
|
typeof(MatchSettingsOverlay)
|
||||||
|
@ -24,8 +24,6 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
var trackLoaded = lastBeatmap?.TrackLoaded ?? false;
|
var trackLoaded = lastBeatmap?.TrackLoaded ?? false;
|
||||||
|
|
||||||
//beatmap.AudioManager = AudioManager;
|
|
||||||
|
|
||||||
// compare to last beatmap as sometimes the two may share a track representation (optimisation, see WorkingBeatmap.TransferTo)
|
// compare to last beatmap as sometimes the two may share a track representation (optimisation, see WorkingBeatmap.TransferTo)
|
||||||
if (!trackLoaded || lastBeatmap?.Track != beatmap.Track)
|
if (!trackLoaded || lastBeatmap?.Track != beatmap.Track)
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,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(Beatmap);
|
protected override Track GetTrack() => GetVirtualTrack();
|
||||||
|
|
||||||
private class DummyRulesetInfo : RulesetInfo
|
private class DummyRulesetInfo : RulesetInfo
|
||||||
{
|
{
|
||||||
|
@ -51,18 +51,18 @@ namespace osu.Game.Beatmaps
|
|||||||
return b;
|
return b;
|
||||||
});
|
});
|
||||||
|
|
||||||
track = new RecyclableLazy<Track>(() => GetTrack() ?? GetVirtualTrack(Beatmap));
|
track = new RecyclableLazy<Track>(() => GetTrack() ?? GetVirtualTrack());
|
||||||
background = new RecyclableLazy<Texture>(GetBackground, BackgroundStillValid);
|
background = new RecyclableLazy<Texture>(GetBackground, BackgroundStillValid);
|
||||||
waveform = new RecyclableLazy<Waveform>(GetWaveform);
|
waveform = new RecyclableLazy<Waveform>(GetWaveform);
|
||||||
storyboard = new RecyclableLazy<Storyboard>(GetStoryboard);
|
storyboard = new RecyclableLazy<Storyboard>(GetStoryboard);
|
||||||
skin = new RecyclableLazy<Skin>(GetSkin);
|
skin = new RecyclableLazy<Skin>(GetSkin);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual Track GetVirtualTrack(IBeatmap beatmap)
|
protected virtual Track GetVirtualTrack()
|
||||||
{
|
{
|
||||||
const double excess_length = 1000;
|
const double excess_length = 1000;
|
||||||
|
|
||||||
var lastObject = beatmap.HitObjects.LastOrDefault();
|
var lastObject = Beatmap.HitObjects.LastOrDefault();
|
||||||
|
|
||||||
double length;
|
double length;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user