/// <summary> /// Deselects all selected <see cref="DrawableHitObject"/>s. /// </summary> public void DeselectAll() { selectedHitObjects.ForEach(h => ObjectDeselected?.Invoke(h)); selectedHitObjects.Clear(); clearCapture(); }
/// <summary> /// Deselects a <see cref="DrawableHitObject"/> without performing capture updates. /// </summary> /// <param name="hitObject">The <see cref="DrawableHitObject"/> to deselect.</param> /// <returns>Whether the <see cref="DrawableHitObject"/> was deselected.</returns> private bool deselect(DrawableHitObject hitObject) { if (!selectedHitObjects.Remove(hitObject)) { return(false); } ObjectDeselected?.Invoke(hitObject); return(true); }
public void ResetSelectedObject() { // Play object deselect sound soundManager.PlayDeselectObjectSound(); // Reset the selected object and update listeners ObjectDeselected?.Invoke(selectedObject); selectedObject = null; hasSelectedObject = false; // Deselect all objects DeselectAllObjects(); // Let camera orbit the default target cameraController.ResetTarget(); }