public virtual void ApplyToDrawableRuleset(DrawableRuleset <T> drawableRuleset) { drawableRuleset.SetReplayScore(CreateReplayScore(drawableRuleset.Beatmap)); // AlwaysPresent required for hitsounds drawableRuleset.Playfield.AlwaysPresent = true; drawableRuleset.Playfield.Hide(); }
protected override void PrepareReplay() { // Generally, replay generation is handled by whatever is constructing the player. // This is implemented locally here to ease migration of test scenes that have some executions // running with autoplay and some not, but are not written in a way that lends to instantiating // different `Player` types. // // Eventually we will want to remove this and update all test usages which rely on autoplay to use // a `TestReplayPlayer`. var autoplayMod = Mods.Value.OfType <ModAutoplay>().FirstOrDefault(); if (autoplayMod != null) { DrawableRuleset?.SetReplayScore(autoplayMod.CreateReplayScore(GameplayState.Beatmap, Mods.Value)); return; } base.PrepareReplay(); }
protected override void PrepareReplay() { if (currentTestData.Autoplay && currentTestData.ReplayFrames?.Count > 0) { throw new InvalidOperationException(@$ "{nameof(ModTestData.Autoplay)} must be false when {nameof(ModTestData.ReplayFrames)} is specified."); } if (currentTestData.ReplayFrames != null) { DrawableRuleset?.SetReplayScore(new Score { Replay = new Replay { Frames = currentTestData.ReplayFrames }, ScoreInfo = new ScoreInfo { User = new APIUser { Username = @"Test" } }, }); } base.PrepareReplay(); }
protected override void PrepareReplay() { DrawableRuleset?.SetReplayScore(score); }
private void regenerateAutoplay() { var autoplayMod = drawableRuleset.Mods.OfType <ModAutoplay>().Single(); drawableRuleset.SetReplayScore(autoplayMod.CreateReplayScore(drawableRuleset.Beatmap, drawableRuleset.Mods)); }
public virtual void ApplyToDrawableRuleset(DrawableRuleset <T> drawableRuleset) => drawableRuleset.SetReplayScore(CreateReplayScore(drawableRuleset.Beatmap));
protected override void LoadComplete() { base.LoadComplete(); DrawableRuleset?.SetReplayScore(score); }