mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 20:12:57 +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
|
namespace osu.Game.Rulesets.Osu.Tests
|
||||||
{
|
{
|
||||||
public class TestCaseSliderInput : OsuTestCase
|
public class TestCaseSliderInput : TestCasePlayerBase
|
||||||
{
|
{
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ using osuTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
{
|
{
|
||||||
public abstract class TestCasePlayer : ScreenTestCase
|
public abstract class TestCasePlayer : TestCasePlayerBase
|
||||||
{
|
{
|
||||||
private readonly Ruleset ruleset;
|
private readonly Ruleset ruleset;
|
||||||
|
|
||||||
@ -121,14 +121,6 @@ namespace osu.Game.Tests.Visual
|
|||||||
return player;
|
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
|
protected virtual Player CreatePlayer(Ruleset ruleset) => new Player
|
||||||
{
|
{
|
||||||
AllowPause = false,
|
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