Beispiel #1
0
        /// <summary>
        /// Deselects all selected <see cref="DrawableHitObject"/>s.
        /// </summary>
        public void DeselectAll()
        {
            selectedHitObjects.ForEach(h => ObjectDeselected?.Invoke(h));
            selectedHitObjects.Clear();

            clearCapture();
        }
Beispiel #2
0
        /// <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);
        }
Beispiel #3
0
    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();
    }