2020-04-11 04:14:34 +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.
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
|
|
|
using osu.Game.Rulesets.Taiko.Objects;
|
|
|
|
using osu.Game.Rulesets.Taiko.Objects.Drawables;
|
|
|
|
|
2020-04-15 07:01:49 +00:00
|
|
|
namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
2020-04-11 04:14:34 +00:00
|
|
|
{
|
|
|
|
[TestFixture]
|
|
|
|
public class TestSceneDrawableHit : TaikoSkinnableTestScene
|
|
|
|
{
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
2021-06-02 07:04:53 +00:00
|
|
|
AddStep("Centre hit", () => SetContents(_ => new DrawableHit(createHitAtCurrentTime())
|
2020-04-11 04:14:34 +00:00
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
}));
|
2020-04-11 05:43:57 +00:00
|
|
|
|
2021-06-02 07:04:53 +00:00
|
|
|
AddStep("Centre hit (strong)", () => SetContents(_ => new DrawableHit(createHitAtCurrentTime(true))
|
2020-04-11 05:43:57 +00:00
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
}));
|
|
|
|
|
2021-06-02 07:04:53 +00:00
|
|
|
AddStep("Rim hit", () => SetContents(_ => new DrawableHit(createHitAtCurrentTime())
|
2020-04-11 04:14:34 +00:00
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
}));
|
2020-04-11 05:43:57 +00:00
|
|
|
|
2021-06-02 07:04:53 +00:00
|
|
|
AddStep("Rim hit (strong)", () => SetContents(_ => new DrawableHit(createHitAtCurrentTime(true))
|
2020-04-11 05:43:57 +00:00
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
}));
|
2020-04-11 04:14:34 +00:00
|
|
|
}
|
|
|
|
|
2020-04-11 05:43:57 +00:00
|
|
|
private Hit createHitAtCurrentTime(bool strong = false)
|
2020-04-11 04:14:34 +00:00
|
|
|
{
|
|
|
|
var hit = new Hit
|
|
|
|
{
|
2020-04-11 05:43:57 +00:00
|
|
|
IsStrong = strong,
|
2020-04-11 04:14:34 +00:00
|
|
|
StartTime = Time.Current + 3000,
|
|
|
|
};
|
|
|
|
|
|
|
|
hit.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
|
|
|
|
|
|
|
return hit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|