public abstract bool CanInteract(Interactive interactive);
示例#2
0
        public override bool CanInteract(Interactive interactive)
        {
            Vector3 toInteractive = (interactive.transform.position - Camera.transform.position).normalized;

            return(Mathf.Acos(Vector3.Dot(toInteractive, Camera.transform.forward)) < InteractionAngle);
        }
 public static void RegisterInteractive(Interactive interactive)
 {
     s_Interactives.Add(interactive);
 }
 public static void RemoveInteractive(Interactive interactive)
 {
     s_Interactives.Remove(interactive);
 }
        public override bool CanInteract(Interactive interactive)
        {
            Vector3 toInteractive = (interactive.transform.position - ReferencePoint.transform.position).normalized;

            return(Mathf.Acos(Vector3.Dot(toInteractive, ReferencePoint.transform.forward)) < Mathf.Deg2Rad * InteractionAngle * 0.5f);
        }