1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:47:28 +08:00

Implement swell application

Also removes a weird sizing application that seems to have no effect
(introduced in 27e63eb; compare removals for other taiko DHO types in
9d00e5b and 58bf288).
This commit is contained in:
Bartłomiej Dach 2020-12-14 23:06:22 +01:00
parent 8b6bc09b8f
commit e3b6eaa390

View File

@ -3,6 +3,7 @@
using System;
using System.Linq;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
@ -35,7 +36,12 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
private readonly CircularContainer targetRing;
private readonly CircularContainer expandingRing;
public DrawableSwell(Swell swell)
public DrawableSwell()
: this(null)
{
}
public DrawableSwell([CanBeNull] Swell swell)
: base(swell)
{
FillMode = FillMode.Fit;
@ -123,12 +129,13 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
Origin = Anchor.Centre,
});
protected override void LoadComplete()
protected override void OnFree()
{
base.LoadComplete();
base.OnFree();
// We need to set this here because RelativeSizeAxes won't/can't set our size by default with a different RelativeChildSize
Width *= Parent.RelativeChildSize.X;
UnproxyContent();
lastWasCentre = null;
}
protected override void AddNestedHitObject(DrawableHitObject hitObject)