Beispiel #1
0
 public override void Off()
 {
     if (!IsActive)
     {
         return;
     }
     base.Off();
     _infoCastCollider = null;
     _highlightUI.SetActive(false);
 }
Beispiel #2
0
        public bool InfoCast()
        {
            RaycastHit rayCastHit;

            Physics.Raycast(_transform.position, _transform.forward, out rayCastHit);
            if (rayCastHit.collider != null)
            {
                if (rayCastHit.collider.gameObject.TryGetComponent <IHighlitable>(out _infoCastCollider))
                {
                    return(true);
                }
            }
            _infoCastCollider = null;
            return(false);
        }