/// <summary> /// Handles raycast hit collision end on an object /// </summary> /// <param name="trans"> Transform finishing interaction with </param> private void InteractionEnd(Transform trans) { GazeInteractable interactable = trans.GetComponent <GazeInteractable>(); if (interactable == null) { return; } interactable.GazeEnd(); }
/// <summary> /// Initializes variables and sets callbacks. /// </summary> void Awake() { // references: _interactable = GetComponent <GazeInteractable>(); // Register Events _interactable.OnGazeBegan += HandleOnGazeBegan; _interactable.OnGazeEnded += HandleOnGazeEnded; _interactable.OnGazePressed += HandleOnGazePressed; _interactable.OnGazeReleased += HandleOnGazeReleased; }