2017-02-28 19:14:48 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using System;
|
2017-03-01 21:56:20 +08:00
|
|
|
|
using System.IO;
|
2017-03-04 14:29:15 +08:00
|
|
|
|
using osu.Framework.Input.Handlers;
|
2017-03-06 09:05:42 +08:00
|
|
|
|
using osu.Game.Beatmaps;
|
2017-03-01 21:56:20 +08:00
|
|
|
|
using osu.Game.Modes;
|
|
|
|
|
using osu.Game.Screens.Play;
|
2017-02-28 19:14:48 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Desktop.VisualTests.Tests
|
|
|
|
|
{
|
2017-03-09 12:55:29 +08:00
|
|
|
|
internal class TestCaseReplay : TestCasePlayer
|
2017-02-28 19:14:48 +08:00
|
|
|
|
{
|
2017-03-01 21:56:20 +08:00
|
|
|
|
private WorkingBeatmap beatmap;
|
2017-03-02 15:08:37 +08:00
|
|
|
|
|
2017-03-04 14:29:15 +08:00
|
|
|
|
private InputHandler replay;
|
|
|
|
|
|
|
|
|
|
private Func<Stream> getReplayStream;
|
2017-03-02 15:08:37 +08:00
|
|
|
|
|
2017-03-01 21:56:20 +08:00
|
|
|
|
public override string Description => @"Testing replay playback.";
|
|
|
|
|
|
2017-03-04 14:29:15 +08:00
|
|
|
|
protected override Player CreatePlayer(WorkingBeatmap beatmap)
|
|
|
|
|
{
|
|
|
|
|
var player = base.CreatePlayer(beatmap);
|
2017-03-06 09:06:14 +08:00
|
|
|
|
player.ReplayInputHandler = Ruleset.GetRuleset(beatmap.PlayMode).CreateAutoplayScore(beatmap.Beatmap)?.Replay?.GetInputHandler();
|
2017-03-04 14:29:15 +08:00
|
|
|
|
return player;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-02-28 19:14:48 +08:00
|
|
|
|
}
|