mirror of
https://github.com/ppy/osu
synced 2025-01-12 09:09:44 +00:00
Rename property
This commit is contained in:
parent
6d18b3db00
commit
359fae895f
@ -220,7 +220,7 @@ namespace osu.Game.Tests.NonVisual
|
|||||||
// no frames are arrived yet
|
// no frames are arrived yet
|
||||||
setTime(0, null);
|
setTime(0, null);
|
||||||
setTime(1000, null);
|
setTime(1000, null);
|
||||||
Assert.IsTrue(handler.WaitingNextFrame, "Should be waiting for the first frame");
|
Assert.IsTrue(handler.WaitingForFrame, "Should be waiting for the first frame");
|
||||||
|
|
||||||
replay.Frames.Add(new TestReplayFrame(0));
|
replay.Frames.Add(new TestReplayFrame(0));
|
||||||
replay.Frames.Add(new TestReplayFrame(1000));
|
replay.Frames.Add(new TestReplayFrame(1000));
|
||||||
@ -228,11 +228,11 @@ namespace osu.Game.Tests.NonVisual
|
|||||||
// should always play from beginning
|
// should always play from beginning
|
||||||
setTime(1000, 0);
|
setTime(1000, 0);
|
||||||
confirmCurrentFrame(0);
|
confirmCurrentFrame(0);
|
||||||
Assert.IsFalse(handler.WaitingNextFrame, "Should not be waiting yet");
|
Assert.IsFalse(handler.WaitingForFrame, "Should not be waiting yet");
|
||||||
setTime(1000, 1000);
|
setTime(1000, 1000);
|
||||||
confirmCurrentFrame(1);
|
confirmCurrentFrame(1);
|
||||||
confirmNextFrame(1);
|
confirmNextFrame(1);
|
||||||
Assert.IsTrue(handler.WaitingNextFrame, "Should be waiting");
|
Assert.IsTrue(handler.WaitingForFrame, "Should be waiting");
|
||||||
|
|
||||||
// cannot seek beyond the last frame
|
// cannot seek beyond the last frame
|
||||||
setTime(1500, null);
|
setTime(1500, null);
|
||||||
|
@ -83,7 +83,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
waitForPlayer();
|
waitForPlayer();
|
||||||
AddAssert("ensure frames arrived", () => replayHandler.HasFrames);
|
AddAssert("ensure frames arrived", () => replayHandler.HasFrames);
|
||||||
|
|
||||||
AddUntilStep("wait for frame starvation", () => replayHandler.WaitingNextFrame);
|
AddUntilStep("wait for frame starvation", () => replayHandler.WaitingForFrame);
|
||||||
checkPaused(true);
|
checkPaused(true);
|
||||||
|
|
||||||
double? pausedTime = null;
|
double? pausedTime = null;
|
||||||
@ -92,7 +92,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
|
|
||||||
sendFrames();
|
sendFrames();
|
||||||
|
|
||||||
AddUntilStep("wait for frame starvation", () => replayHandler.WaitingNextFrame);
|
AddUntilStep("wait for frame starvation", () => replayHandler.WaitingForFrame);
|
||||||
checkPaused(true);
|
checkPaused(true);
|
||||||
|
|
||||||
AddAssert("time advanced", () => currentFrameStableTime > pausedTime);
|
AddAssert("time advanced", () => currentFrameStableTime > pausedTime);
|
||||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Replays
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether we are waiting for new frames to be received.
|
/// Whether we are waiting for new frames to be received.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool WaitingNextFrame => !replay.HasReceivedAllFrames && currentFrameIndex == Frames.Count - 1;
|
public bool WaitingForFrame => !replay.HasReceivedAllFrames && currentFrameIndex == Frames.Count - 1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current frame of the replay.
|
/// The current frame of the replay.
|
||||||
@ -140,7 +140,7 @@ namespace osu.Game.Rulesets.Replays
|
|||||||
frameEnd = getFrameTime(currentFrameIndex + 1);
|
frameEnd = getFrameTime(currentFrameIndex + 1);
|
||||||
|
|
||||||
// Pause until more frames are arrived.
|
// Pause until more frames are arrived.
|
||||||
if (WaitingNextFrame && frameStart < time)
|
if (WaitingForFrame && frameStart < time)
|
||||||
{
|
{
|
||||||
CurrentTime = frameStart;
|
CurrentTime = frameStart;
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user