Prepare base DHO for HO application

This commit is contained in:
Bartłomiej Dach 2020-12-14 22:20:35 +01:00
parent cdde156d0f
commit a25cd910f8
1 changed files with 6 additions and 8 deletions

View File

@ -3,7 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using JetBrains.Annotations;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
@ -22,7 +22,7 @@ public abstract class DrawableTaikoHitObject : DrawableHitObject<TaikoHitObject>
private readonly Container nonProxiedContent;
protected DrawableTaikoHitObject(TaikoHitObject hitObject)
protected DrawableTaikoHitObject([CanBeNull] TaikoHitObject hitObject)
: base(hitObject)
{
AddRangeInternal(new[]
@ -113,25 +113,23 @@ public abstract class DrawableTaikoHitObject<TObject> : DrawableTaikoHitObject
{
public override Vector2 OriginPosition => new Vector2(DrawHeight / 2);
public new TObject HitObject;
public new TObject HitObject => (TObject)base.HitObject;
protected Vector2 BaseSize;
protected SkinnableDrawable MainPiece;
protected DrawableTaikoHitObject(TObject hitObject)
protected DrawableTaikoHitObject([CanBeNull] TObject hitObject)
: base(hitObject)
{
HitObject = hitObject;
Anchor = Anchor.CentreLeft;
Origin = Anchor.Custom;
RelativeSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load()
protected override void OnApply()
{
base.OnApply();
RecreatePieces();
}