Exemple #1
0
        public void Cancel(OnCancelled onCancelled = null)
        {
            Collider2D    closestInteractee = GetClosestInteractee();
            IInteractible interactible      = closestInteractee?.GetComponent <IInteractible>();

            if (interactible != null)
            {
                onCancelled?.Invoke(interactible.InteractibleType, interactible.Transform);
                interactible.Cancel(INTERACTIBLE_TYPE.USER, transform);
            }
        }
        public void Cancel()
        {
            Collider      closestInteractee = GetClosestInteractee();
            IInteractible interactible      = closestInteractee?.GetComponent <IInteractible>();

            if (interactible != null)
            {
                interactionHandler.OnCancelled(interactible.InteractibleType, interactible.Transform);
                interactible.Cancel(transform);
            }
        }