Repository URL to install this package:
Version:
1.0.0 ▾
|
using Fluctio.FluctioSim.Common.Configuration;
using UnityEngine;
namespace Fluctio.FluctioSim.Core.Components.MachineLearning.Triggers
{
[AddComponentMenu(Config.PrefixedName+"/Machine Learning/Triggers/Steps Trigger", Config.ComponentMenuOrder + 60)]
public class StepsTrigger : Trigger
{
[SerializeField]
[Min(1)]
public int stepsInterval = 1;
private int _stepsPassed = 0;
private void FixedUpdate()
{
_stepsPassed = (_stepsPassed + 1) % stepsInterval;
if (_stepsPassed == 0)
{
ScheduleActions();
}
}
}
}