private void Next() { if (targets_.Count == 0) { SetOrderIndex(-1); CheckGaze(); CheckBlink(); return; } if (targets_.Count != order_.Count) { order_.Shuffle(targets_.Count); } var i = CurrentOrderIndex; SetOrderIndex(-1); var start = i; for (; ;) { ++i; if (i >= order_.Count) { order_.Shuffle(targets_.Count); i = 0; } if (GetTarget(i).Enabled) { SetOrderIndex(i); break; } if (start < 0) { // no index when started start = 0; } else if (i == start) { // nothing enabled SetOrderIndex(-1); break; } } }
private void Reshuffle() { clipOrder_.Shuffle(clips_.Count); currentIndex_ = 0; }
protected override List <int> Regenerate(List <int> old, int count) { return(ShuffledOrder.Shuffle(old, count)); }