2019-01-24 08:43:03 +00: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 08:38:58 +00:00
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.MathUtils;
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Tests
|
|
|
|
{
|
2019-05-14 19:37:25 +00:00
|
|
|
public class TestSceneShaking : TestSceneHitCircle
|
2018-07-06 08:38:58 +00:00
|
|
|
{
|
|
|
|
public override void Add(Drawable drawable)
|
|
|
|
{
|
|
|
|
base.Add(drawable);
|
|
|
|
|
|
|
|
if (drawable is TestDrawableHitCircle hitObject)
|
|
|
|
{
|
|
|
|
Scheduler.AddDelayed(() => hitObject.TriggerJudgement(),
|
|
|
|
hitObject.HitObject.StartTime - (hitObject.HitObject.HitWindows.HalfWindowFor(HitResult.Miss) + RNG.Next(0, 300)) - Time.Current);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|