mirror of
https://github.com/ppy/osu.git
synced 2025-03-04 03:53:21 +08:00
Use ScrollingHitRenderer
This commit is contained in:
parent
debe13629f
commit
e67379b6de
@ -15,7 +15,7 @@ using OpenTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||||
{
|
{
|
||||||
internal class DrawableFruit : DrawableHitObject<CatchBaseHit, CatchJudgement>
|
internal class DrawableFruit : DrawableScrollingHitObject<CatchBaseHit, CatchJudgement>
|
||||||
{
|
{
|
||||||
private class Pulp : Circle, IHasAccentColour
|
private class Pulp : Circle, IHasAccentColour
|
||||||
{
|
{
|
||||||
@ -37,11 +37,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
{
|
{
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
Size = new Vector2(50);
|
Size = new Vector2(50);
|
||||||
RelativePositionAxes = Axes.Both;
|
|
||||||
Position = new Vector2(h.Position, -0.1f);
|
|
||||||
Rotation = (float)(RNG.NextDouble() - 0.5f) * 40;
|
|
||||||
|
|
||||||
Alpha = 0;
|
RelativePositionAxes = Axes.Both;
|
||||||
|
X = h.Position;
|
||||||
|
|
||||||
|
Rotation = (float)(RNG.NextDouble() - 0.5f) * 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -91,8 +91,6 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
Position = new Vector2(0, 0.6f),
|
Position = new Vector2(0, 0.6f),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
Alpha = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override CatchJudgement CreateJudgement() => new CatchJudgement();
|
protected override CatchJudgement CreateJudgement() => new CatchJudgement();
|
||||||
@ -103,14 +101,9 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
{
|
{
|
||||||
using (BeginAbsoluteSequence(HitObject.StartTime - preempt))
|
using (BeginAbsoluteSequence(HitObject.StartTime - preempt))
|
||||||
{
|
{
|
||||||
// default state
|
|
||||||
this.MoveToY(-0.1f).FadeOut();
|
|
||||||
|
|
||||||
// animation
|
// animation
|
||||||
this.FadeIn(200).MoveToY(1, preempt);
|
this.FadeIn(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
Expire(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ using osu.Game.Rulesets.UI;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Catch.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)
|
public CatchHitRenderer(WorkingBeatmap beatmap, bool isForCurrentRuleset)
|
||||||
: base(beatmap, isForCurrentRuleset)
|
: base(beatmap, isForCurrentRuleset)
|
||||||
|
@ -6,20 +6,31 @@ using osu.Game.Rulesets.Catch.Objects;
|
|||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Game.Rulesets.Catch.Judgements;
|
using osu.Game.Rulesets.Catch.Judgements;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Catch.UI
|
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()
|
public CatchPlayfield()
|
||||||
|
: base(Axes.Y)
|
||||||
{
|
{
|
||||||
Size = new Vector2(1);
|
Size = new Vector2(1);
|
||||||
|
|
||||||
Anchor = Anchor.TopCentre;
|
Anchor = Anchor.TopCentre;
|
||||||
Origin = 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
|
new CatcherArea
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Loading…
Reference in New Issue
Block a user