Propagate clock state from editor to gameplay test

This commit is contained in:
Bartłomiej Dach
2021-11-12 12:50:38 +01:00
parent ca239ca40a
commit d2ddc25ab3
3 changed files with 28 additions and 12 deletions

View File

@ -3,6 +3,7 @@
using osu.Framework.Allocation;
using osu.Framework.Screens;
using osu.Game.Beatmaps;
using osu.Game.Overlays;
using osu.Game.Screens.Play;
@ -10,14 +11,20 @@ namespace osu.Game.Screens.Edit.GameplayTest
{
public class EditorPlayer : Player
{
public EditorPlayer()
: base(new PlayerConfiguration { ShowResults = false })
{
}
private readonly EditorState editorState;
[Resolved]
private MusicController musicController { get; set; }
public EditorPlayer(EditorState editorState)
: base(new PlayerConfiguration { ShowResults = false })
{
this.editorState = editorState;
}
protected override GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart)
=> new MasterGameplayClockContainer(beatmap, editorState.Time, true);
protected override void LoadComplete()
{
base.LoadComplete();