1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-10 14:47:45 +08:00
osu-lazer/osu.Game.Tests/Visual/TestCaseIntroSequence.cs

55 lines
1.6 KiB
C#
Raw Normal View History

2018-01-05 20:21:19 +09:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-10-26 14:42:23 +03:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-11-01 17:07:03 +09:00
using System;
using System.Collections.Generic;
2018-03-02 15:34:31 +09:00
using NUnit.Framework;
2017-10-26 14:42:23 +03:00
using OpenTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Timing;
using osu.Game.Screens.Menu;
namespace osu.Game.Tests.Visual
{
2018-03-02 15:34:31 +09:00
[TestFixture]
2017-11-03 17:54:35 +09:00
public class TestCaseIntroSequence : OsuTestCase
2017-10-26 14:42:23 +03:00
{
2017-11-01 17:07:03 +09:00
public override IReadOnlyList<Type> RequiredTypes => new[]
{
2017-11-03 17:54:35 +09:00
typeof(OsuLogo),
2017-11-01 17:07:03 +09:00
};
2017-11-03 17:54:35 +09:00
public TestCaseIntroSequence()
2017-10-26 14:42:23 +03:00
{
2017-11-03 17:54:35 +09:00
OsuLogo logo;
2017-10-26 14:42:23 +03:00
var rateAdjustClock = new StopwatchClock(true);
var framedClock = new FramedClock(rateAdjustClock);
framedClock.ProcessFrame();
Add(new Container
{
RelativeSizeAxes = Axes.Both,
Clock = framedClock,
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black,
},
2017-11-03 17:54:35 +09:00
logo = new OsuLogo
{
Anchor = Anchor.Centre,
}
2017-10-26 14:42:23 +03:00
}
});
2017-11-03 17:54:35 +09:00
AddStep(@"Restart", logo.PlayIntro);
2017-10-26 14:42:23 +03:00
AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v);
}
}
}