1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00

Split out testcase player for use in slider input tests

This commit is contained in:
David Zhao 2019-01-24 14:42:09 +09:00 committed by Dean Herbert
parent 147a9c2440
commit 8e09c66cbb
3 changed files with 18 additions and 10 deletions

View File

@ -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[]
{

View File

@ -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,

View 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;
}
}
}