mirror of https://github.com/ppy/osu
Cache `Playfield` for the sake of tests
I'm open to an alternative. Name it.
This commit is contained in:
parent
8f6b06fe40
commit
8f61f5e4c6
|
@ -25,9 +25,9 @@ internal partial class DrumSamplePlayer : CompositeDrawable, IKeyBindingHandler<
|
|||
private TaikoAction? lastAction;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(DrawableRuleset drawableRuleset)
|
||||
private void load(Playfield playfield)
|
||||
{
|
||||
var hitObjectContainer = drawableRuleset.Playfield.HitObjectContainer;
|
||||
var hitObjectContainer = playfield.HitObjectContainer;
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
leftCentreTrigger = CreateTriggerSource(hitObjectContainer, SampleBalance.Left),
|
||||
|
|
|
@ -28,6 +28,7 @@ namespace osu.Game.Rulesets.UI
|
|||
{
|
||||
[Cached(typeof(IPooledHitObjectProvider))]
|
||||
[Cached(typeof(IPooledSampleProvider))]
|
||||
[Cached]
|
||||
public abstract partial class Playfield : CompositeDrawable, IPooledHitObjectProvider, IPooledSampleProvider
|
||||
{
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue