mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Revert EditorBeatmap.Remove API
This commit is contained in:
@ -146,19 +146,17 @@ namespace osu.Game.Screens.Edit
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Removes a <see cref="HitObject"/> from this <see cref="EditorBeatmap"/>.
|
/// Removes a <see cref="HitObject"/> from this <see cref="EditorBeatmap"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="hitObjects">All <see cref="HitObject"/> to remove.</param>
|
/// <param name="hitObject">The <see cref="HitObject"/> to remove.</param>
|
||||||
/// <returns>True if the <see cref="HitObject"/> has been removed, false otherwise.</returns>
|
/// <returns>True if the <see cref="HitObject"/> has been removed, false otherwise.</returns>
|
||||||
public void Remove(params HitObject[] hitObjects)
|
public bool Remove(HitObject hitObject)
|
||||||
{
|
{
|
||||||
foreach (var h in hitObjects)
|
int index = FindIndex(hitObject);
|
||||||
{
|
|
||||||
int index = FindIndex(h);
|
|
||||||
|
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
continue;
|
return false;
|
||||||
|
|
||||||
RemoveAt(index);
|
RemoveAt(index);
|
||||||
}
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -195,9 +193,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
var removable = HitObjects.ToList();
|
foreach (var h in HitObjects.ToArray())
|
||||||
|
|
||||||
foreach (var h in removable)
|
|
||||||
Remove(h);
|
Remove(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user