2019-01-24 16:43:03 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2019-12-27 23:47:46 +08:00
|
|
|
|
using System.Linq;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using NUnit.Framework;
|
2019-04-10 16:54:57 +08:00
|
|
|
|
using osu.Framework.Allocation;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2022-10-04 14:17:11 +08:00
|
|
|
|
using osu.Framework.Graphics.Primitives;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
2019-12-27 23:47:46 +08:00
|
|
|
|
using osu.Framework.Threading;
|
2022-10-04 14:17:11 +08:00
|
|
|
|
using osu.Framework.Timing;
|
2020-02-06 04:52:36 +08:00
|
|
|
|
using osu.Framework.Utils;
|
2018-11-06 11:01:54 +08:00
|
|
|
|
using osu.Game.Configuration;
|
2019-04-10 16:54:57 +08:00
|
|
|
|
using osu.Game.Rulesets.Mods;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2020-05-22 02:10:51 +08:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Rulesets.Timing;
|
|
|
|
|
using osu.Game.Rulesets.UI.Scrolling;
|
2019-03-25 00:02:36 +08:00
|
|
|
|
using osuTK;
|
2020-02-06 04:52:36 +08:00
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2019-03-25 00:02:36 +08:00
|
|
|
|
namespace osu.Game.Tests.Visual.Gameplay
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2019-05-15 03:37:25 +08:00
|
|
|
|
public class TestSceneScrollingHitObjects : OsuTestScene
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-04-10 16:54:57 +08:00
|
|
|
|
[Cached(typeof(IReadOnlyList<Mod>))]
|
|
|
|
|
private IReadOnlyList<Mod> mods { get; set; } = Array.Empty<Mod>();
|
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
private const int time_range = 5000;
|
|
|
|
|
private const int spawn_rate = time_range / 10;
|
2019-12-27 23:47:46 +08:00
|
|
|
|
|
2018-11-06 14:46:36 +08:00
|
|
|
|
private readonly ScrollingTestContainer[] scrollContainers = new ScrollingTestContainer[4];
|
2018-04-13 17:19:50 +08:00
|
|
|
|
private readonly TestPlayfield[] playfields = new TestPlayfield[4];
|
2019-12-27 23:47:46 +08:00
|
|
|
|
private ScheduledDelegate hitObjectSpawnDelegate;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2019-12-27 23:47:46 +08:00
|
|
|
|
[SetUp]
|
2019-12-28 00:16:43 +08:00
|
|
|
|
public void Setup() => Schedule(() =>
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-12-27 23:47:46 +08:00
|
|
|
|
Child = new GridContainer
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Content = new[]
|
|
|
|
|
{
|
|
|
|
|
new Drawable[]
|
|
|
|
|
{
|
2018-11-06 14:46:36 +08:00
|
|
|
|
scrollContainers[0] = new ScrollingTestContainer(ScrollingDirection.Up)
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2019-12-27 23:47:46 +08:00
|
|
|
|
Child = playfields[0] = new TestPlayfield(),
|
2020-02-06 05:56:44 +08:00
|
|
|
|
TimeRange = time_range
|
2018-11-06 14:46:36 +08:00
|
|
|
|
},
|
2019-12-27 03:17:51 +08:00
|
|
|
|
scrollContainers[1] = new ScrollingTestContainer(ScrollingDirection.Down)
|
2018-11-06 14:46:36 +08:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2019-12-27 23:47:46 +08:00
|
|
|
|
Child = playfields[1] = new TestPlayfield(),
|
2020-02-06 05:56:44 +08:00
|
|
|
|
TimeRange = time_range
|
2018-11-06 14:46:36 +08:00
|
|
|
|
},
|
2018-04-13 17:19:50 +08:00
|
|
|
|
},
|
|
|
|
|
new Drawable[]
|
|
|
|
|
{
|
2019-12-27 03:17:51 +08:00
|
|
|
|
scrollContainers[2] = new ScrollingTestContainer(ScrollingDirection.Left)
|
2018-11-06 14:46:36 +08:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2019-12-27 23:47:46 +08:00
|
|
|
|
Child = playfields[2] = new TestPlayfield(),
|
2020-02-06 05:56:44 +08:00
|
|
|
|
TimeRange = time_range
|
2018-11-06 14:46:36 +08:00
|
|
|
|
},
|
2019-12-27 03:17:51 +08:00
|
|
|
|
scrollContainers[3] = new ScrollingTestContainer(ScrollingDirection.Right)
|
2018-11-06 14:46:36 +08:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2019-12-27 23:47:46 +08:00
|
|
|
|
Child = playfields[3] = new TestPlayfield(),
|
2020-02-06 05:56:44 +08:00
|
|
|
|
TimeRange = time_range
|
2018-11-06 14:46:36 +08:00
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-27 23:47:46 +08:00
|
|
|
|
};
|
2018-11-06 11:01:54 +08:00
|
|
|
|
|
2020-05-22 03:35:12 +08:00
|
|
|
|
hitObjectSpawnDelegate?.Cancel();
|
2019-12-28 00:16:43 +08:00
|
|
|
|
});
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2020-05-22 03:35:12 +08:00
|
|
|
|
private void setUpHitObjects() => AddStep("set up hit objects", () =>
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2018-11-06 14:46:36 +08:00
|
|
|
|
scrollContainers.ForEach(c => c.ControlPoints.Add(new MultiplierControlPoint(0)));
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
for (int i = spawn_rate / 2; i <= time_range; i += spawn_rate)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
addHitObject(Time.Current + i);
|
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
hitObjectSpawnDelegate = Scheduler.AddDelayed(() => addHitObject(Time.Current + time_range), spawn_rate, true);
|
2020-05-22 03:35:12 +08:00
|
|
|
|
});
|
2019-12-27 23:47:46 +08:00
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
private IList<MultiplierControlPoint> testControlPoints => new List<MultiplierControlPoint>
|
|
|
|
|
{
|
2021-09-06 13:56:34 +08:00
|
|
|
|
new MultiplierControlPoint(time_range) { EffectPoint = { ScrollSpeed = 1.25 } },
|
|
|
|
|
new MultiplierControlPoint(1.5 * time_range) { EffectPoint = { ScrollSpeed = 1 } },
|
|
|
|
|
new MultiplierControlPoint(2 * time_range) { EffectPoint = { ScrollSpeed = 1.5 } }
|
2020-02-06 05:56:44 +08:00
|
|
|
|
};
|
|
|
|
|
|
2019-12-27 23:47:46 +08:00
|
|
|
|
[Test]
|
|
|
|
|
public void TestScrollAlgorithms()
|
|
|
|
|
{
|
2020-05-22 03:35:12 +08:00
|
|
|
|
setUpHitObjects();
|
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
AddStep("constant scroll", () => setScrollAlgorithm(ScrollVisualisationMethod.Constant));
|
|
|
|
|
AddStep("overlapping scroll", () => setScrollAlgorithm(ScrollVisualisationMethod.Overlapping));
|
|
|
|
|
AddStep("sequential scroll", () => setScrollAlgorithm(ScrollVisualisationMethod.Sequential));
|
|
|
|
|
|
|
|
|
|
AddSliderStep("time range", 100, 10000, time_range, v => scrollContainers.Where(c => c != null).ForEach(c => c.TimeRange = v));
|
2019-12-27 23:47:46 +08:00
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
AddStep("add control points", () => addControlPoints(testControlPoints, Time.Current));
|
2019-12-27 23:47:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
2020-02-06 05:56:44 +08:00
|
|
|
|
public void TestConstantScrollLifetime()
|
2019-12-27 23:47:46 +08:00
|
|
|
|
{
|
2020-05-22 03:35:12 +08:00
|
|
|
|
setUpHitObjects();
|
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
AddStep("set constant scroll", () => setScrollAlgorithm(ScrollVisualisationMethod.Constant));
|
2019-12-27 23:47:46 +08:00
|
|
|
|
// scroll container time range must be less than the rate of spawning hitobjects
|
|
|
|
|
// otherwise the hitobjects will spawn already partly visible on screen and look wrong
|
2020-02-06 05:56:44 +08:00
|
|
|
|
AddStep("set time range", () => scrollContainers.ForEach(c => c.TimeRange = time_range / 2.0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestSequentialScrollLifetime()
|
|
|
|
|
{
|
2020-05-22 03:35:12 +08:00
|
|
|
|
setUpHitObjects();
|
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
AddStep("set sequential scroll", () => setScrollAlgorithm(ScrollVisualisationMethod.Sequential));
|
|
|
|
|
AddStep("set time range", () => scrollContainers.ForEach(c => c.TimeRange = time_range / 2.0));
|
|
|
|
|
AddStep("add control points", () => addControlPoints(testControlPoints, Time.Current));
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-22 03:35:12 +08:00
|
|
|
|
[Test]
|
|
|
|
|
public void TestSlowSequentialScroll()
|
|
|
|
|
{
|
|
|
|
|
AddStep("set sequential scroll", () => setScrollAlgorithm(ScrollVisualisationMethod.Sequential));
|
|
|
|
|
AddStep("set time range", () => scrollContainers.ForEach(c => c.TimeRange = time_range));
|
|
|
|
|
AddStep("add control points", () => addControlPoints(
|
|
|
|
|
new List<MultiplierControlPoint>
|
|
|
|
|
{
|
|
|
|
|
new MultiplierControlPoint { Velocity = 0.1 }
|
|
|
|
|
},
|
|
|
|
|
Time.Current + time_range));
|
|
|
|
|
|
|
|
|
|
// All of the hit objects added below should be immediately visible on screen
|
|
|
|
|
AddStep("add hit objects", () =>
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < 20; ++i)
|
|
|
|
|
{
|
|
|
|
|
addHitObject(Time.Current + time_range * (2 + 0.1 * i));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
[Test]
|
|
|
|
|
public void TestOverlappingScrollLifetime()
|
|
|
|
|
{
|
2020-05-22 03:35:12 +08:00
|
|
|
|
setUpHitObjects();
|
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
AddStep("set overlapping scroll", () => setScrollAlgorithm(ScrollVisualisationMethod.Overlapping));
|
|
|
|
|
AddStep("set time range", () => scrollContainers.ForEach(c => c.TimeRange = time_range / 2.0));
|
|
|
|
|
AddStep("add control points", () => addControlPoints(testControlPoints, Time.Current));
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-04 14:17:11 +08:00
|
|
|
|
[Test]
|
|
|
|
|
public void TestVeryFlowScroll()
|
|
|
|
|
{
|
|
|
|
|
const double long_time_range = 100000;
|
|
|
|
|
var manualClock = new ManualClock();
|
|
|
|
|
|
|
|
|
|
AddStep("set manual clock", () =>
|
|
|
|
|
{
|
|
|
|
|
manualClock.CurrentTime = 0;
|
|
|
|
|
scrollContainers.ForEach(c => c.Clock = new FramedClock(manualClock));
|
|
|
|
|
|
|
|
|
|
setScrollAlgorithm(ScrollVisualisationMethod.Constant);
|
|
|
|
|
scrollContainers.ForEach(c => c.TimeRange = long_time_range);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
AddStep("add hit objects", () =>
|
|
|
|
|
{
|
|
|
|
|
addHitObject(long_time_range);
|
|
|
|
|
addHitObject(long_time_range + 100, 250);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
AddAssert("hit objects are alive", () => playfields.All(p => p.HitObjectContainer.AliveObjects.Count() == 2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addHitObject(double time, float size = 75)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
playfields.ForEach(p =>
|
|
|
|
|
{
|
2022-10-04 14:17:11 +08:00
|
|
|
|
var hitObject = new TestHitObject(size) { StartTime = time };
|
|
|
|
|
var drawable = new TestDrawableHitObject(hitObject);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2022-10-04 14:17:11 +08:00
|
|
|
|
setAnchor(drawable, p);
|
|
|
|
|
p.Add(drawable);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
private TestDrawableControlPoint createDrawablePoint(TestPlayfield playfield, double t)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2020-02-06 05:56:44 +08:00
|
|
|
|
var obj = new TestDrawableControlPoint(playfield.Direction, t);
|
|
|
|
|
setAnchor(obj, playfield);
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addControlPoints(IList<MultiplierControlPoint> controlPoints, double sequenceStartTime)
|
|
|
|
|
{
|
2022-10-18 15:01:04 +08:00
|
|
|
|
controlPoints.ForEach(point => point.Time += sequenceStartTime);
|
2020-02-06 05:56:44 +08:00
|
|
|
|
|
|
|
|
|
scrollContainers.ForEach(container =>
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2020-02-06 05:56:44 +08:00
|
|
|
|
container.ControlPoints.AddRange(controlPoints);
|
2018-11-06 14:46:36 +08:00
|
|
|
|
});
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2020-02-06 05:56:44 +08:00
|
|
|
|
foreach (var playfield in playfields)
|
2018-11-06 14:46:36 +08:00
|
|
|
|
{
|
2020-02-06 05:56:44 +08:00
|
|
|
|
foreach (var controlPoint in controlPoints)
|
2022-10-18 15:01:04 +08:00
|
|
|
|
playfield.Add(createDrawablePoint(playfield, controlPoint.Time));
|
2020-02-06 05:56:44 +08:00
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setAnchor(DrawableHitObject obj, TestPlayfield playfield)
|
|
|
|
|
{
|
|
|
|
|
switch (playfield.Direction)
|
|
|
|
|
{
|
|
|
|
|
case ScrollingDirection.Up:
|
|
|
|
|
obj.Anchor = Anchor.TopCentre;
|
|
|
|
|
break;
|
2019-04-01 11:44:46 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
case ScrollingDirection.Down:
|
|
|
|
|
obj.Anchor = Anchor.BottomCentre;
|
|
|
|
|
break;
|
2019-04-01 11:44:46 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
case ScrollingDirection.Left:
|
|
|
|
|
obj.Anchor = Anchor.CentreLeft;
|
|
|
|
|
break;
|
2019-04-01 11:44:46 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
case ScrollingDirection.Right:
|
|
|
|
|
obj.Anchor = Anchor.CentreRight;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-12 16:36:19 +08:00
|
|
|
|
private void setScrollAlgorithm(ScrollVisualisationMethod algorithm) => scrollContainers.ForEach(c => c.ScrollAlgorithm = algorithm);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
private class TestPlayfield : ScrollingPlayfield
|
|
|
|
|
{
|
2018-11-06 14:46:36 +08:00
|
|
|
|
public new ScrollingDirection Direction => base.Direction.Value;
|
2018-11-06 11:01:54 +08:00
|
|
|
|
|
2018-11-06 14:46:36 +08:00
|
|
|
|
public TestPlayfield()
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Padding = new MarginPadding(2);
|
|
|
|
|
|
2018-09-21 13:35:50 +08:00
|
|
|
|
InternalChildren = new Drawable[]
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2018-09-21 13:35:50 +08:00
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Alpha = 0.5f,
|
|
|
|
|
},
|
|
|
|
|
new Container
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Masking = true,
|
|
|
|
|
Child = HitObjectContainer
|
|
|
|
|
}
|
|
|
|
|
};
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
2022-10-04 14:17:11 +08:00
|
|
|
|
|
|
|
|
|
protected override ScrollingHitObjectContainer CreateScrollingHitObjectContainer() => new TestScrollingHitObjectContainer();
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private class TestDrawableControlPoint : DrawableHitObject<HitObject>
|
|
|
|
|
{
|
|
|
|
|
public TestDrawableControlPoint(ScrollingDirection direction, double time)
|
2020-05-22 02:10:51 +08:00
|
|
|
|
: base(new HitObject { StartTime = time, HitWindows = HitWindows.Empty })
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre;
|
|
|
|
|
|
2019-03-25 12:47:28 +08:00
|
|
|
|
AddInternal(new Box
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
RelativeSizeAxes = Axes.Both
|
2019-03-25 12:47:28 +08:00
|
|
|
|
});
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
switch (direction)
|
|
|
|
|
{
|
|
|
|
|
case ScrollingDirection.Up:
|
|
|
|
|
case ScrollingDirection.Down:
|
|
|
|
|
RelativeSizeAxes = Axes.X;
|
|
|
|
|
Height = 2;
|
|
|
|
|
break;
|
2019-04-01 11:44:46 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
case ScrollingDirection.Left:
|
|
|
|
|
case ScrollingDirection.Right:
|
|
|
|
|
RelativeSizeAxes = Axes.Y;
|
|
|
|
|
Width = 2;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-04 14:17:11 +08:00
|
|
|
|
private class TestHitObject : HitObject
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2022-10-04 14:17:11 +08:00
|
|
|
|
public readonly float Size;
|
|
|
|
|
|
|
|
|
|
public TestHitObject(float size)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2022-10-04 14:17:11 +08:00
|
|
|
|
Size = size;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-27 03:17:51 +08:00
|
|
|
|
|
2022-10-04 14:17:11 +08:00
|
|
|
|
private class TestDrawableHitObject : DrawableHitObject<TestHitObject>
|
|
|
|
|
{
|
|
|
|
|
public TestDrawableHitObject(TestHitObject hitObject)
|
|
|
|
|
: base(hitObject)
|
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre;
|
|
|
|
|
Size = new Vector2(hitObject.Size);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2020-02-06 04:52:36 +08:00
|
|
|
|
AddInternal(new Box
|
|
|
|
|
{
|
2022-10-04 14:17:11 +08:00
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2020-02-06 04:52:36 +08:00
|
|
|
|
Colour = new Color4(RNG.NextSingle(), RNG.NextSingle(), RNG.NextSingle(), 1)
|
|
|
|
|
});
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2022-10-04 14:17:11 +08:00
|
|
|
|
|
|
|
|
|
private class TestScrollingHitObjectContainer : ScrollingHitObjectContainer
|
|
|
|
|
{
|
|
|
|
|
protected override RectangleF GetConservativeBoundingBox(HitObjectLifetimeEntry entry)
|
|
|
|
|
{
|
2022-10-04 15:10:18 +08:00
|
|
|
|
if (entry.HitObject is TestHitObject testObject)
|
|
|
|
|
return new RectangleF().Inflate(testObject.Size / 2);
|
|
|
|
|
|
|
|
|
|
return base.GetConservativeBoundingBox(entry);
|
2022-10-04 14:17:11 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|