1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 14:12:54 +08:00

Fix GetBoundCopy on IGameBeatmap not working

This commit is contained in:
smoogipoo 2018-05-24 12:42:58 +09:00
parent a5d2d74447
commit 542eb848b0
2 changed files with 12 additions and 1 deletions

View File

@ -46,7 +46,13 @@ namespace osu.Game.Beatmaps
lastBeatmap = beatmap;
}
public GameBeatmap GetBoundCopy()
IGameBeatmap IGameBeatmap.GetBoundCopy() => GetBoundCopy();
/// <summary>
/// Retrieve a new <see cref="GameBeatmap"/> instance weakly bound to this <see cref="GameBeatmap"/>.
/// If you are further binding to events of the retrieved <see cref="GameBeatmap"/>, ensure a local reference is held.
/// </summary>
public new GameBeatmap GetBoundCopy()
{
var copy = new GameBeatmap(Default, audioManager);
copy.BindTo(this);

View File

@ -10,5 +10,10 @@ namespace osu.Game.Beatmaps
/// </summary>
public interface IGameBeatmap : IBindable<WorkingBeatmap>
{
/// <summary>
/// Retrieve a new <see cref="IGameBeatmap"/> instance weakly bound to this <see cref="IGameBeatmap"/>.
/// If you are further binding to events of the retrieved <see cref="IGameBeatmap"/>, ensure a local reference is held.
/// </summary>
IGameBeatmap GetBoundCopy();
}
}