mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Merge branch 'dho-remove-onparentreceived' into fix-hidden-mod-crash
This commit is contained in:
@ -6,7 +6,6 @@ using System.Diagnostics;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
@ -14,14 +13,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
public class DrawableSliderHead : DrawableHitCircle
|
||||
{
|
||||
[CanBeNull]
|
||||
public Slider Slider => drawableSlider?.HitObject;
|
||||
public Slider Slider => DrawableSlider?.HitObject;
|
||||
|
||||
protected DrawableSlider DrawableSlider => (DrawableSlider)ParentHitObject;
|
||||
|
||||
private readonly IBindable<int> pathVersion = new Bindable<int>();
|
||||
|
||||
protected override OsuSkinComponents CirclePieceComponent => OsuSkinComponents.SliderHeadHitCircle;
|
||||
|
||||
private DrawableSlider drawableSlider;
|
||||
|
||||
public DrawableSliderHead()
|
||||
{
|
||||
}
|
||||
@ -42,19 +41,17 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
base.OnFree();
|
||||
|
||||
pathVersion.UnbindFrom(drawableSlider.PathVersion);
|
||||
pathVersion.UnbindFrom(DrawableSlider.PathVersion);
|
||||
}
|
||||
|
||||
protected override void OnParentReceived(DrawableHitObject parent)
|
||||
protected override void OnApply()
|
||||
{
|
||||
base.OnParentReceived(parent);
|
||||
base.OnApply();
|
||||
|
||||
drawableSlider = (DrawableSlider)parent;
|
||||
pathVersion.BindTo(DrawableSlider.PathVersion);
|
||||
|
||||
pathVersion.BindTo(drawableSlider.PathVersion);
|
||||
|
||||
OnShake = drawableSlider.Shake;
|
||||
CheckHittable = (d, t) => drawableSlider.CheckHittable?.Invoke(d, t) ?? true;
|
||||
OnShake = DrawableSlider.Shake;
|
||||
CheckHittable = (d, t) => DrawableSlider.CheckHittable?.Invoke(d, t) ?? true;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
Reference in New Issue
Block a user