2022-06-01 15:56: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.
|
|
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using osu.Framework.Allocation;
|
2022-07-22 15:18:14 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Testing;
|
2022-06-01 15:56:03 +08:00
|
|
|
|
using osu.Game.Rulesets.Taiko.UI;
|
2022-07-22 15:18:14 +08:00
|
|
|
|
using osu.Game.Tests.Visual;
|
2022-06-01 15:56:03 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Tests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2022-07-22 15:18:14 +08:00
|
|
|
|
public class TestSceneDrumTouchInputArea : OsuTestScene
|
2022-06-01 15:56:03 +08:00
|
|
|
|
{
|
2022-07-22 15:18:14 +08:00
|
|
|
|
[Cached]
|
|
|
|
|
private TaikoInputManager taikoInputManager = new TaikoInputManager(new TaikoRuleset().RulesetInfo);
|
2022-06-01 15:56:03 +08:00
|
|
|
|
|
2022-07-22 15:18:14 +08:00
|
|
|
|
private DrumTouchInputArea drumTouchInputArea = null!;
|
2022-06-01 15:56:03 +08:00
|
|
|
|
|
2022-07-22 15:18:14 +08:00
|
|
|
|
[SetUpSteps]
|
|
|
|
|
public void SetUpSteps()
|
2022-06-01 15:56:03 +08:00
|
|
|
|
{
|
2022-07-22 15:18:14 +08:00
|
|
|
|
AddStep("create drum", () =>
|
2022-06-02 13:36:07 +08:00
|
|
|
|
{
|
2022-07-22 15:18:14 +08:00
|
|
|
|
Children = new Drawable[]
|
2022-06-01 15:56:03 +08:00
|
|
|
|
{
|
2022-07-22 15:18:14 +08:00
|
|
|
|
new InputDrum
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
|
Origin = Anchor.TopCentre,
|
|
|
|
|
Height = 0.5f,
|
|
|
|
|
},
|
|
|
|
|
drumTouchInputArea = new DrumTouchInputArea
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.BottomCentre,
|
|
|
|
|
Origin = Anchor.BottomCentre,
|
|
|
|
|
Height = 0.5f,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
});
|
2022-06-01 15:56:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-07-22 15:18:14 +08:00
|
|
|
|
[Test]
|
|
|
|
|
public void TestDrum()
|
2022-06-02 13:36:07 +08:00
|
|
|
|
{
|
2022-07-22 15:18:14 +08:00
|
|
|
|
AddStep("show drum", () => drumTouchInputArea.Show());
|
2022-06-01 15:56:03 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|