Tidy up nullability and casting

This commit is contained in:
Dean Herbert 2022-07-15 16:40:48 +09:00
parent 1581f1a0ff
commit 0ade8db550
1 changed files with 2 additions and 6 deletions

View File

@ -12,7 +12,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
{
public abstract class FollowCircle : CompositeDrawable
{
[Resolved(canBeNull: true)]
[Resolved]
protected DrawableHitObject? ParentObject { get; private set; }
protected FollowCircle()
@ -23,11 +23,7 @@ protected FollowCircle()
[BackgroundDependencyLoader]
private void load()
{
if (ParentObject != null)
{
var slider = (DrawableSlider)ParentObject;
slider.Tracking.BindValueChanged(OnTrackingChanged, true);
}
((DrawableSlider?)ParentObject)?.Tracking.BindValueChanged(OnTrackingChanged, true);
}
protected override void LoadComplete()