mirror of https://github.com/ppy/osu
Fix storyboard sample test scene
This commit is contained in:
parent
ec080fcb32
commit
f144661c31
|
@ -20,6 +20,7 @@
|
|||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Storyboards;
|
||||
|
@ -67,15 +68,17 @@ public void TestSamplePlaybackAtZero()
|
|||
var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
|
||||
working.LoadTrack();
|
||||
|
||||
Add(gameplayContainer = new MasterGameplayClockContainer(working, 0));
|
||||
|
||||
gameplayContainer.Add(sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
|
||||
Add(gameplayContainer = new MasterGameplayClockContainer(working, 0)
|
||||
{
|
||||
Clock = gameplayContainer.GameplayClock
|
||||
IsPaused = { Value = true },
|
||||
Child = new FrameStabilityContainer
|
||||
{
|
||||
Child = sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
AddStep("start time", () => gameplayContainer.Start());
|
||||
AddStep("reset clock", () => gameplayContainer.Start());
|
||||
|
||||
AddUntilStep("sample played", () => sample.RequestedPlaying);
|
||||
AddUntilStep("sample has lifetime end", () => sample.LifetimeEnd < double.MaxValue);
|
||||
|
@ -92,11 +95,13 @@ public void TestSampleHasLifetimeEndWithInitialClockTime()
|
|||
var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
|
||||
working.LoadTrack();
|
||||
|
||||
Add(gameplayContainer = new MasterGameplayClockContainer(working, 1000, true));
|
||||
|
||||
gameplayContainer.Add(sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
|
||||
Add(gameplayContainer = new MasterGameplayClockContainer(working, 1000, true)
|
||||
{
|
||||
Clock = gameplayContainer.GameplayClock
|
||||
IsPaused = { Value = true },
|
||||
Child = new FrameStabilityContainer
|
||||
{
|
||||
Child = sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue