Skip to content

Commit

Permalink
Merge pull request #161 from QiuFeng54321/bookmark-plugin-api-2
Browse files Browse the repository at this point in the history
Add GetBookmarkAt() to Qua
  • Loading branch information
AiAe authored Apr 14, 2024
2 parents c2641dd + b39d7ec commit 43e800e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Quaver.API/Maps/Qua.cs
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,17 @@ public TimingPointInfo GetTimingPointAt(double time)
return TimingPoints[index];
}

/// <summary>
/// Gets the bookmark at a particular time in the map.
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public BookmarkInfo GetBookmarkAt(int time)
{
var index = Bookmarks.FindIndex(b => b.StartTime == time);
return index == -1 ? null : Bookmarks[index];
}

/// <summary>
/// Gets a scroll velocity at a particular time in the map
/// </summary>
Expand Down

0 comments on commit 43e800e

Please sign in to comment.