Use ScrollingHitRenderer

This commit is contained in:
Dean Herbert
2017-08-08 10:35:56 +09:00
parent debe13629f
commit e67379b6de
3 changed files with 21 additions and 17 deletions

View File

@ -14,7 +14,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Catch.UI
{
public class CatchHitRenderer : HitRenderer<CatchBaseHit, CatchJudgement>
public class CatchHitRenderer : ScrollingHitRenderer<CatchPlayfield, CatchBaseHit, CatchJudgement>
{
public CatchHitRenderer(WorkingBeatmap beatmap, bool isForCurrentRuleset)
: base(beatmap, isForCurrentRuleset)

View File

@ -6,20 +6,31 @@ using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.UI;
using OpenTK;
using osu.Game.Rulesets.Catch.Judgements;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Rulesets.Catch.UI
{
public class CatchPlayfield : Playfield<CatchBaseHit, CatchJudgement>
public class CatchPlayfield : ScrollingPlayfield<CatchBaseHit, CatchJudgement>
{
protected override Container<Drawable> Content => content;
private readonly Container<Drawable> content;
public CatchPlayfield()
: base(Axes.Y)
{
Size = new Vector2(1);
Anchor = Anchor.TopCentre;
Origin = Anchor.TopCentre;
Children = new Drawable[]
InternalChildren = new Drawable[]
{
content = new Container<Drawable>
{
Scale = new Vector2(1, -1),
RelativeSizeAxes = Axes.Both,
Origin = Anchor.BottomLeft
},
new CatcherArea
{
RelativeSizeAxes = Axes.Both,
@ -30,4 +41,4 @@ namespace osu.Game.Rulesets.Catch.UI
};
}
}
}
}