public void TestSampleHasLifetimeEndWithInitialClockTime()
        {
            GameplayClockContainer   gameplayContainer = null;
            DrawableStoryboardSample sample            = null;

            AddStep("create container", () =>
            {
                var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
                working.LoadTrack();

                Add(gameplayContainer = new MasterGameplayClockContainer(working, 1000, true)
                {
                    IsPaused = { Value = true },
                    Child    = new FrameStabilityContainer
                    {
                        Child = sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
                    }
                });
            });

            AddStep("start time", () => gameplayContainer.Start());

            AddUntilStep("sample not played", () => !sample.RequestedPlaying);
            AddUntilStep("sample has lifetime end", () => sample.LifetimeEnd < double.MaxValue);
        }
Example #2
0
        public void TestSamplePlaybackAtZero()
        {
            GameplayClockContainer   gameplayContainer = null;
            DrawableStoryboardSample sample            = null;

            AddStep("create container", () =>
            {
                Add(gameplayContainer = new GameplayClockContainer(CreateWorkingBeatmap(new OsuRuleset().RulesetInfo), Array.Empty <Mod>(), 0));

                gameplayContainer.Add(sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
                {
                    Clock = gameplayContainer.GameplayClock
                });
            });

            AddStep("start time", () => gameplayContainer.Start());

            AddUntilStep("sample playback succeeded", () => sample.LifetimeEnd < double.MaxValue);
        }
Example #3
0
        public void TestSamplePlaybackAtZero()
        {
            GameplayClockContainer   gameplayContainer = null;
            DrawableStoryboardSample sample            = null;

            AddStep("create container", () =>
            {
                var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
                working.LoadTrack();

                Add(gameplayContainer = new GameplayClockContainer(working, 0));

                gameplayContainer.Add(sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
                {
                    Clock = gameplayContainer.GameplayClock
                });
            });

            AddStep("start time", () => gameplayContainer.Start());

            AddUntilStep("sample played", () => sample.RequestedPlaying);
            AddUntilStep("sample has lifetime end", () => sample.LifetimeEnd < double.MaxValue);
        }