mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
38 lines
1 KiB
C#
38 lines
1 KiB
C#
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps
|
|
{
|
|
/// <summary>
|
|
/// Test that waits N frames.
|
|
/// </summary>
|
|
internal class WaitFramesAgingStep : IAgingStep
|
|
{
|
|
private readonly int frames;
|
|
private int cFrames;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="WaitFramesAgingStep"/> class.
|
|
/// </summary>
|
|
/// <param name="frames">Amount of frames to wait.</param>
|
|
public WaitFramesAgingStep(int frames)
|
|
{
|
|
this.frames = frames;
|
|
this.cFrames = frames;
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public string Name => $"Wait {this.cFrames} frames";
|
|
|
|
/// <inheritdoc/>
|
|
public SelfTestStepResult RunStep(Dalamud dalamud)
|
|
{
|
|
this.cFrames--;
|
|
|
|
return this.cFrames <= 0 ? SelfTestStepResult.Pass : SelfTestStepResult.Waiting;
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public void CleanUp(Dalamud dalamud)
|
|
{
|
|
this.cFrames = this.frames;
|
|
}
|
|
}
|
|
}
|