using System;
using UnityEngine.Scripting.APIUpdating;
namespace UnityEngine.Perception.Randomization.Scenarios
{
///
/// A scenario that runs for a fixed number of frames during each iteration
///
[AddComponentMenu("Perception/Randomization/Scenarios/Fixed Length Scenario")]
[MovedFrom("UnityEngine.Experimental.Perception.Randomization.Scenarios")]
public class FixedLengthScenario: UnitySimulationScenario
{
///
/// Constants describing the execution of this scenario
///
[Serializable]
public class Constants : UnitySimulationScenarioConstants
{
///
/// The number of frames to render per iteration.
///
[Tooltip("The number of frames to render per iteration.")]
public int framesPerIteration = 1;
}
///
/// Returns whether the current scenario iteration has completed
///
public override bool isIterationComplete => currentIterationFrame >= constants.framesPerIteration;
}
}