예제 #1
0
 /// <summary>
 /// Find the last <see cref="BeatmapBPMChange"/> before a given beat time.
 /// </summary>
 /// <param name="beatTimeInSongBPM">Time in raw beats (Unmodified by any BPM Changes)</param>
 /// <param name="inclusive">Whether or not to include <see cref="BeatmapBPMChange"/>s with the same time value.</param>
 /// <returns>The last <see cref="BeatmapBPMChange"/> before the given beat (or <see cref="null"/> if there is none).</returns>
 public BeatmapBPMChange FindLastBPM(float beatTimeInSongBPM, bool inclusive = true)
 {
     if (inclusive)
     {
         return(LoadedObjects.LastOrDefault(x => x._time <= beatTimeInSongBPM + 0.01f) as BeatmapBPMChange);
     }
     return(LoadedObjects.LastOrDefault(x => x._time + 0.01f < beatTimeInSongBPM) as BeatmapBPMChange);
 }