mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:02:54 +08:00
Add sample trigger tests covering rewinding of gameplay
This commit is contained in:
parent
001d09057e
commit
7a3a14e50d
@ -107,7 +107,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
{
|
{
|
||||||
base.SetUpSteps();
|
base.SetUpSteps();
|
||||||
|
|
||||||
AddStep("Add trigger source", () => Player.GameplayClockContainer.Add(sampleTriggerSource = new TestGameplaySampleTriggerSource(Player.DrawableRuleset.Playfield.HitObjectContainer)));
|
AddStep("Add trigger source", () => Player.DrawableRuleset.FrameStableComponents.Add(sampleTriggerSource = new TestGameplaySampleTriggerSource(Player.DrawableRuleset.Playfield.HitObjectContainer)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -153,6 +153,14 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
waitForAliveObjectIndex(2);
|
waitForAliveObjectIndex(2);
|
||||||
checkValidObjectIndex(2);
|
checkValidObjectIndex(2);
|
||||||
|
|
||||||
|
// test rewinding
|
||||||
|
seekBeforeIndex(1);
|
||||||
|
waitForAliveObjectIndex(1);
|
||||||
|
checkValidObjectIndex(1);
|
||||||
|
|
||||||
|
seekBeforeIndex(1, 400);
|
||||||
|
checkValidObjectIndex(0);
|
||||||
|
|
||||||
seekBeforeIndex(3);
|
seekBeforeIndex(3);
|
||||||
waitForAliveObjectIndex(3);
|
waitForAliveObjectIndex(3);
|
||||||
checkValidObjectIndex(3);
|
checkValidObjectIndex(3);
|
||||||
|
Loading…
Reference in New Issue
Block a user