mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Split out testcase player for use in slider input tests
This commit is contained in:
parent
147a9c2440
commit
8e09c66cbb
@ -25,7 +25,7 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
public class TestCaseSliderInput : OsuTestCase
|
||||
public class TestCaseSliderInput : TestCasePlayerBase
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public abstract class TestCasePlayer : ScreenTestCase
|
||||
public abstract class TestCasePlayer : TestCasePlayerBase
|
||||
{
|
||||
private readonly Ruleset ruleset;
|
||||
|
||||
@ -121,14 +121,6 @@ namespace osu.Game.Tests.Visual
|
||||
return player;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
// note that this will override any mod rate application
|
||||
Beatmap.Value.Track.Rate = Clock.Rate;
|
||||
}
|
||||
|
||||
protected virtual Player CreatePlayer(Ruleset ruleset) => new Player
|
||||
{
|
||||
AllowPause = false,
|
||||
|
16
osu.Game/Tests/Visual/TestCasePlayerBase.cs
Normal file
16
osu.Game/Tests/Visual/TestCasePlayerBase.cs
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright (c) 2007-2019 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public class TestCasePlayerBase : ScreenTestCase
|
||||
{
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
// note that this will override any mod rate application
|
||||
Beatmap.Value.Track.Rate = Clock.Rate;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user