mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +08:00
Move caching of IBeatmap
to base DrawableRuleset
This commit is contained in:
parent
db815f7930
commit
a551958eeb
@ -45,9 +45,6 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
|
|
||||||
public new ManiaBeatmap Beatmap => (ManiaBeatmap)base.Beatmap;
|
public new ManiaBeatmap Beatmap => (ManiaBeatmap)base.Beatmap;
|
||||||
|
|
||||||
[Cached(typeof(IBeatmap))]
|
|
||||||
private ManiaBeatmap cachedBeatmap { get; set; }
|
|
||||||
|
|
||||||
public IEnumerable<BarLine> BarLines;
|
public IEnumerable<BarLine> BarLines;
|
||||||
|
|
||||||
protected override bool RelativeScaleBeatLengths => true;
|
protected override bool RelativeScaleBeatLengths => true;
|
||||||
@ -80,7 +77,6 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
: base(ruleset, beatmap, mods)
|
: base(ruleset, beatmap, mods)
|
||||||
{
|
{
|
||||||
BarLines = new BarLineGenerator<BarLine>(Beatmap).BarLines;
|
BarLines = new BarLineGenerator<BarLine>(Beatmap).BarLines;
|
||||||
cachedBeatmap = Beatmap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -85,6 +85,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The beatmap.
|
/// The beatmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Cached(typeof(IBeatmap))]
|
||||||
public readonly Beatmap<TObject> Beatmap;
|
public readonly Beatmap<TObject> Beatmap;
|
||||||
|
|
||||||
public override IEnumerable<HitObject> Objects => Beatmap.HitObjects;
|
public override IEnumerable<HitObject> Objects => Beatmap.HitObjects;
|
||||||
|
Loading…
Reference in New Issue
Block a user