Ejemplo n.º 1
0
        void SetInteractable(Interactable newInteractable)
        {
            if (interactable != newInteractable || (hasInteractable && (interactable == null || !interactable.gameObject.activeInHierarchy)))
            {
                UnInspectInteractable(interactable);

                interactable = newInteractable;

                if (interactable != null)
                {
                    interactable.OnInspectedStart(this, baseInteractor.interactionMode, out string message, out currentActionOptions, out List <string> hints);
                    UIEvents.ShowActionPrompt(associatedController, message, currentActionOptions, hints);

                    if (onInspectStart != null)
                    {
                        onInspectStart(this, interactable);
                    }
                }
            }
            hasInteractable = newInteractable != null;
        }