1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-27 19:42:54 +08:00
osu-lazer/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleApplication.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.3 KiB
C#
Raw Normal View History

2020-11-06 22:56:02 +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.
2022-06-17 15:37:17 +08:00
#nullable disable
2020-11-06 22:56:02 +08:00
using NUnit.Framework;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Tests.Visual;
using osuTK;
namespace osu.Game.Rulesets.Osu.Tests
{
public partial class TestSceneHitCircleApplication : OsuTestScene
{
[Test]
public void TestApplyNewCircle()
{
DrawableHitCircle dho = null;
AddStep("create circle", () => Child = dho = new DrawableHitCircle(prepareObject(new HitCircle
{
Position = new Vector2(256, 192),
IndexInCurrentCombo = 0
}))
{
Clock = new FramedClock(new StopwatchClock())
});
AddStep("apply new circle", () => dho.Apply(prepareObject(new HitCircle
{
Position = new Vector2(128, 128),
ComboIndex = 1,
2021-04-21 13:32:37 +08:00
})));
2020-11-06 22:56:02 +08:00
}
private HitCircle prepareObject(HitCircle circle)
{
circle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
return circle;
}
}
}