private void Next() { _currentIndex++; _currentIndex %= _syncs.Count; _next = _syncs[_currentIndex]; _nextFireTime = (_timeBetweenFires / _syncs.Count) + Time; }
public void AddSync(SequencedFireControl sync) { _syncs.Add(sync); if (_syncs.Count == 1) { _currentIndex = 0; _next = _syncs[_currentIndex]; } }
public void RemoveSync(SequencedFireControl sync) { _syncs.Remove(sync); }
public void OnFire(SequencedFireControl sync) { Next(); }
public bool CanFire(SequencedFireControl sync) => sync == _next && _nextFireTime <= Time;