1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-31 21:42:55 +08:00

Fix crashes

This commit is contained in:
smoogipoo 2021-05-12 16:40:46 +09:00
parent 5692cecaa4
commit 4e7551d50e
3 changed files with 19 additions and 16 deletions

View File

@ -41,9 +41,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
{ {
InternalChildren = new[] AddInternal(glowContainer = new CircularContainer
{
glowContainer = new CircularContainer
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
@ -58,8 +56,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
AlwaysPresent = true AlwaysPresent = true
} }
} }
} });
};
} }
protected override void LoadComplete() protected override void LoadComplete()

View File

@ -60,6 +60,12 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
Action.BindTo(action); Action.BindTo(action);
Direction.BindTo(scrollingInfo.Direction); Direction.BindTo(scrollingInfo.Direction);
}
protected override void LoadComplete()
{
base.LoadComplete();
Direction.BindValueChanged(OnDirectionChanged, true); Direction.BindValueChanged(OnDirectionChanged, true);
} }

View File

@ -51,11 +51,11 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
{ {
rulesetConfig?.BindWith(ManiaRulesetSetting.TimingBasedNoteColouring, configTimingBasedNoteColouring); rulesetConfig?.BindWith(ManiaRulesetSetting.TimingBasedNoteColouring, configTimingBasedNoteColouring);
InternalChild = headPiece = new SkinnableDrawable(new ManiaSkinComponent(Component), _ => new DefaultNotePiece()) AddInternal(headPiece = new SkinnableDrawable(new ManiaSkinComponent(Component), _ => new DefaultNotePiece())
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y AutoSizeAxes = Axes.Y
}; });
} }
protected override void LoadComplete() protected override void LoadComplete()