System.Collections.Generic.List.IndexOf(TimingControlPoint)

Here are the examples of the csharp api System.Collections.Generic.List.IndexOf(TimingControlPoint) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : TestSceneBeatSyncedContainer.cs
with MIT License
from hornyyy

private TimingControlPoint getNextTimingPoint(TimingControlPoint current)
            {
                if (timingPoints[^1] == current)
                    return current;

                int index = timingPoints.IndexOf(current); // -1 means that this is a "default beat"

                return index == -1 ? current : timingPoints[index + 1];
            }

19 Source : TestSceneBeatSyncedContainer.cs
with MIT License
from hornyyy

protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes)
            {
                base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);

                timingPointCount.Value = timingPoints.Count;
                currentTimingPoint.Value = timingPoints.IndexOf(timingPoint);
                beatCount.Value = calculateBeatCount(timingPoint);
                currentBeat.Value = beatIndex;
                beatsPerMinute.Value = 60000 / timingPoint.BeatLength;
                adjustedBeatLength.Value = timingPoint.BeatLength;

                flashLayer.FadeOutFromOne(timingPoint.BeatLength);
            }