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-07-06 16:38:58 +08:00
|
|
|
|
|
|
|
using osu.Framework.MathUtils;
|
2019-07-29 16:05:13 +08:00
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
2018-07-06 16:38:58 +08:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Tests
|
|
|
|
{
|
2019-05-15 03:37:25 +08:00
|
|
|
public class TestSceneShaking : TestSceneHitCircle
|
2018-07-06 16:38:58 +08:00
|
|
|
{
|
2019-07-29 16:05:13 +08:00
|
|
|
protected override TestDrawableHitCircle CreateDrawableHitCircle(HitCircle circle, bool auto)
|
2018-07-06 16:38:58 +08:00
|
|
|
{
|
2019-07-29 16:05:13 +08:00
|
|
|
var drawableHitObject = base.CreateDrawableHitCircle(circle, auto);
|
2018-07-06 16:38:58 +08:00
|
|
|
|
2019-07-29 16:05:13 +08:00
|
|
|
Scheduler.AddDelayed(() => drawableHitObject.TriggerJudgement(),
|
|
|
|
drawableHitObject.HitObject.StartTime - (drawableHitObject.HitObject.HitWindows.HalfWindowFor(HitResult.Miss) + RNG.Next(0, 300)) - Time.Current);
|
|
|
|
|
|
|
|
return drawableHitObject;
|
2018-07-06 16:38:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|