1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 02:32:59 +08:00

Remove use of HitObject in DHO constructors.

This commit is contained in:
ekrctb 2020-11-30 12:52:58 +09:00
parent 7ce752391d
commit 5d3a5081a0
2 changed files with 4 additions and 7 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using JetBrains.Annotations;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.UI;
@ -19,12 +20,9 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
protected override float SamplePlaybackPosition => HitObject.X / CatchPlayfield.WIDTH;
protected DrawableCatchHitObject(CatchHitObject hitObject)
protected DrawableCatchHitObject([CanBeNull] CatchHitObject hitObject)
: base(hitObject)
{
if (hitObject != null)
XBindable.Value = hitObject.X;
Anchor = Anchor.BottomLeft;
}

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@ -31,7 +32,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
protected readonly Container ScaleContainer;
protected DrawablePalpableCatchHitObject(CatchHitObject h)
protected DrawablePalpableCatchHitObject([CanBeNull] CatchHitObject h)
: base(h)
{
Origin = Anchor.Centre;
@ -43,8 +44,6 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
});
IndexInBeatmap.Value = h.IndexInBeatmap;
}
[BackgroundDependencyLoader]