Merge branch 'master' into drawable-hit-object-hit-state-fix

This commit is contained in:
Dean Herbert
2020-11-05 17:07:52 +09:00
42 changed files with 294 additions and 264 deletions

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Objects.Drawables;
using osuTK;
@ -23,10 +22,15 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public override bool DisplayResult => false;
private readonly SkinnableDrawable scaleContainer;
private SkinnableDrawable scaleContainer;
public DrawableSliderTick(SliderTick sliderTick)
: base(sliderTick)
{
}
[BackgroundDependencyLoader]
private void load()
{
Size = new Vector2(OsuHitObject.OBJECT_RADIUS * 2);
Origin = Anchor.Centre;
@ -49,15 +53,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
};
}
private readonly IBindable<float> scaleBindable = new BindableFloat();
[BackgroundDependencyLoader]
private void load()
{
scaleBindable.BindValueChanged(scale => scaleContainer.Scale = new Vector2(scale.NewValue), true);
scaleBindable.BindTo(HitObject.ScaleBindable);
ScaleBindable.BindValueChanged(scale => scaleContainer.Scale = new Vector2(scale.NewValue), true);
}
protected override void CheckForResult(bool userTriggered, double timeOffset)