1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 02:22:56 +08:00

Change anchors in line with new ScrollingPlayfield implementation

(cherry picked from commit 079827d)
This commit is contained in:
Dean Herbert 2018-01-11 13:41:50 +09:00
parent 3b929ffd21
commit 9e3091bfe9
2 changed files with 5 additions and 11 deletions

View File

@ -4,7 +4,6 @@
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using OpenTK;
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Catch.Objects.Drawable
@ -16,22 +15,17 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
public DrawableBananaShower(BananaShower s)
: base(s)
{
RelativeSizeAxes = Axes.Both;
Height = (float)HitObject.Duration;
RelativeSizeAxes = Axes.X;
Origin = Anchor.BottomLeft;
X = 0;
Child = bananaContainer = new Container
{
RelativeSizeAxes = Axes.Both,
RelativeChildOffset = new Vector2(0, (float)HitObject.StartTime),
RelativeChildSize = new Vector2(1, (float)HitObject.Duration)
};
Child = bananaContainer = new Container { RelativeSizeAxes = Axes.Both };
foreach (var b in s.NestedHitObjects.Cast<BananaShower.Banana>())
AddNested(new DrawableFruit(b));
}
protected override void AddNested(DrawableHitObject<CatchHitObject> h)
protected override void AddNested(DrawableHitObject h)
{
((DrawableCatchHitObject)h).CheckPosition = o => CheckPosition?.Invoke(o) ?? false;
bananaContainer.Add(h);

View File

@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Catch.Tests
}
};
beatmap.HitObjects.Add(new BananaShower { StartTime = 200, Duration = 10000, NewCombo = true });
beatmap.HitObjects.Add(new BananaShower { StartTime = 200, Duration = 500, NewCombo = true });
return beatmap;
}