1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-07 05:47:18 +08:00

26 lines
954 B
C#
Raw Normal View History

// 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-07-06 17:38:58 +09:00
using System.Diagnostics;
2020-01-09 13:43:44 +09:00
using osu.Framework.Utils;
2019-07-29 17:05:13 +09:00
using osu.Game.Rulesets.Osu.Objects;
2018-07-06 17:38:58 +09:00
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Osu.Tests
{
public class TestSceneShaking : TestSceneHitCircle
2018-07-06 17:38:58 +09:00
{
2019-07-29 17:05:13 +09:00
protected override TestDrawableHitCircle CreateDrawableHitCircle(HitCircle circle, bool auto)
2018-07-06 17:38:58 +09:00
{
2019-07-29 17:05:13 +09:00
var drawableHitObject = base.CreateDrawableHitCircle(circle, auto);
2018-07-06 17:38:58 +09:00
Debug.Assert(drawableHitObject.HitObject.HitWindows != null);
2019-09-06 15:24:00 +09:00
double delay = drawableHitObject.HitObject.StartTime - (drawableHitObject.HitObject.HitWindows.WindowFor(HitResult.Miss) + RNG.Next(0, 300)) - Time.Current;
Scheduler.AddDelayed(() => drawableHitObject.TriggerJudgement(), delay);
2019-07-29 17:05:13 +09:00
return drawableHitObject;
2018-07-06 17:38:58 +09:00
}
}
}