mirror of https://github.com/ppy/osu
Split out testcase player for use in slider input tests
This commit is contained in:
parent
147a9c2440
commit
8e09c66cbb
|
@ -25,7 +25,7 @@
|
|||
|
||||
namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
public class TestCaseSliderInput : OsuTestCase
|
||||
public class TestCaseSliderInput : TestCasePlayerBase
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public abstract class TestCasePlayer : ScreenTestCase
|
||||
public abstract class TestCasePlayer : TestCasePlayerBase
|
||||
{
|
||||
private readonly Ruleset ruleset;
|
||||
|
||||
|
@ -121,14 +121,6 @@ private Player loadPlayerFor(Ruleset r)
|
|||
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,
|
||||
|
|
|
@ -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