mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Register bar line pool & use in drawable ruleset
This commit is contained in:
parent
c103c3691f
commit
ea09cbddc6
@ -151,7 +151,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
Major = major
|
||||
};
|
||||
|
||||
DrawableRuleset.Playfield.Add(new DrawableBarLine(bl));
|
||||
DrawableRuleset.Playfield.Add(bl);
|
||||
}
|
||||
|
||||
private void addSwell(double duration = default_duration)
|
||||
|
@ -1,11 +1,19 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Rulesets.Taiko.Objects;
|
||||
using osu.Game.Rulesets.Taiko.Objects.Drawables;
|
||||
using osu.Game.Rulesets.UI.Scrolling;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.UI
|
||||
{
|
||||
public class BarLinePlayfield : ScrollingPlayfield
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
RegisterPool<BarLine, DrawableBarLine>(15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
new BarLineGenerator<BarLine>(Beatmap).BarLines.ForEach(bar => Playfield.Add(new DrawableBarLine(bar)));
|
||||
new BarLineGenerator<BarLine>(Beatmap).BarLines.ForEach(bar => Playfield.Add(bar));
|
||||
|
||||
FrameStableComponents.Add(scroller = new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.Scroller), _ => Empty())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user