Skip to content

Commit

Permalink
Remove CreateCircle() - hitobjects should handle the addition of this…
Browse files Browse the repository at this point in the history
… to their hierarchy themselves.

CreateCircle() lends itself to a few issues:
- It can't be used for drum roll ticks unless it returned a Container instead, at which point the method loses its meaning, and I would rather that constructed in the ctor.
- Writing `return Accented ? new AccentedCirclePiece() : new CirclePiece()` in two places as the body of this method feels wrong - it's something I would expect to be taken care of in the base DrawableTaikoHitObject, but that leads back to #1.
- Swells don't have an AccentedCirclePiece, so #2 becomes more problematic.
  • Loading branch information
smoogipoo committed Mar 25, 2017
1 parent 4762e04 commit 5bd9147
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using osu.Framework.Graphics;
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Taiko.Judgements;
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;

namespace osu.Game.Modes.Taiko.Objects.Drawable
{
Expand All @@ -17,11 +16,6 @@ protected DrawableTaikoHitObject(TaikoHitObject hitObject)
Origin = Anchor.Centre;

RelativePositionAxes = Axes.X;

Children = new[]
{
CreateCircle()
};
}

protected override void LoadComplete()
Expand All @@ -48,7 +42,5 @@ protected override void Update()
{
UpdateScrollPosition(Time.Current);
}

protected abstract CirclePiece CreateCircle();
}
}

0 comments on commit 5bd9147

Please sign in to comment.