예제 #1
0
 public void LeaveObject(GazeTarget target)
 {
     foreach (var listener in _stateListeners)
     {
         listener.OnGazeExit(target);
     }
 }
예제 #2
0
 public void EnterObejct(GazeTarget target)
 {
     foreach (var listener in _stateListeners)
     {
         listener.OnGazeEnter(target);
     }
 }
예제 #3
0
 public override void OnGazeEnter(GazeTarget target)
 {
     //gameObject.SetActive(true);
     UpdateLocalDistanceFromTarget(target);
     if (target.Reactable)
     {
         _inExplosion = true;
     }
 }
예제 #4
0
        public void MoveOverObject(GazeTarget target)
        {
            foreach (var listener in _stateListeners)
            {
                listener.OnGazeMoveOver(target);
            }

            ExecuteEvents.Execute <IPointerMoveHandler>(_currentTarget.Target, _pointerData, (x, y) => x.OnPointerMove(_pointerData));
        }
예제 #5
0
        void UpdateCurrentDataToGazeTarget(GazeTarget target)
        {
            Camera     camera               = _pointerData.enterEventCamera;
            GameObject gazeObject           = GetCurrentGameObject();
            Vector3    intersectionPosition = _pointerData.pointerCurrentRaycast.worldPosition;

            bool clickable = _pointerData.pointerPress != null ||
                             ExecuteEvents.GetEventHandler <IPointerClickHandler>(gazeObject) != null;

            target.Source    = camera;
            target.Target    = gazeObject;
            target.Position  = intersectionPosition;
            target.Reactable = clickable;
        }
예제 #6
0
        public override void OnGazeExit(GazeTarget target)
        {
            if (GameObject.Find("LarCamera").GetComponent <LarManager>().HideEnableGazeInput == true)
            {
                gameObject.SetActive(false);
            }
            else
            {
                gameObject.SetActive(true);
            }


            _distance = _maxDistance;
            if (target.Reactable)
            {
                _inExplosion = false;
            }
        }
예제 #7
0
        protected void UpdateLocalDistanceFromTarget(GazeTarget target)
        {
            Vector3 targetLocalPosition = new Vector3(target.Position.x, target.Position.y, target.Position.z);

            if (Vector3.zero.Equals(targetLocalPosition))
            {
                //Debug.Log("target Position is zero : ");
                if (target.Target != null)
                {
                    targetLocalPosition = new Vector3(target.Target.transform.position.x,
                                                      target.Target.transform.position.y,
                                                      target.Target.transform.position.z);
                }
            }

            float tmpDistance = Vector3.Distance(GazeCursorBase.Instance().transform.position, targetLocalPosition);

            _distance = Mathf.Clamp(tmpDistance, _minDistance, _maxDistance);
        }
예제 #8
0
 public override void OnGazeMoveOver(GazeTarget target)
 {
     UpdateLocalDistanceFromTarget(target);
 }
예제 #9
0
 public abstract void OnGazeMoveOver(GazeTarget target);
예제 #10
0
 public abstract void OnGazeExit(GazeTarget target);
예제 #11
0
 public abstract void OnGazeEnter(GazeTarget target);