Пример #1
0
    public float FindPrevOrNextBeatline(float Time, bool Forward)
    {
        if (Beatlines.Count == 0)
        {
            return(Time);
        }
        int Index = OperationManager.FindNearestBeatlineIndexByTime(Time);

        if (Forward)
        {
            return(BeatlineTimes[Mathf.Clamp(Index + 1, 0, BeatlineTimes.Count - 1)]);
        }
        else
        {
            return(BeatlineTimes[Mathf.Clamp(Index - 1, 0, BeatlineTimes.Count - 1)]);
        }
    }