//using UnityEngine.Events;
//using UnityEngine.XR.Interaction.Toolkit;
//namespace UnityEngine.XR.Content.Interaction
//{
// ///
// /// An interactable lever that snaps into an on or off position by a direct interactor
// ///
// public class XRWindow : XRBaseInteractable
// {
// const float k_LeverDeadZone = 0.1f; // Prevents rapid switching between on and off states when right in the middle
// [SerializeField]
// Transform m_BaseLine = null;
// [SerializeField]
// [Tooltip("The object that is visually grabbed and manipulated")]
// Transform m_Handle = null;
// [SerializeField]
// [Tooltip("The value of the Window")]
// bool m_Value = false;
// [SerializeField]
// [Tooltip("If enabled, the lever will snap to the value position when released")]
// bool m_LockToValue;
// [SerializeField]
// [Range(0f, 90f)]
// float m_MaxValue = 90f;
// private float m_MinValue = 0f;
// [SerializeField]
// [Tooltip("Events to trigger when the lever activates")]
// UnityEvent m_OnWindowActivate = new UnityEvent();
// [SerializeField]
// [Tooltip("Events to trigger when the lever deactivates")]
// UnityEvent m_OnWindowDeactivate = new UnityEvent();
// IXRSelectInteractor m_Interactor;
// private float radius = 0;
// ///
// /// The object that is visually grabbed and manipulated
// ///
// public Transform handle
// {
// get => m_Handle;
// set => m_Handle = value;
// }
// ///
// /// The value of the lever
// ///
// public bool value
// {
// get => m_Value;
// set => SetValue(value, true);
// }
// public bool lockToValue { get; set; }
// public float maxValue
// {
// get => m_MaxValue;
// set => m_MaxValue = value;
// }
// public float minValue
// {
// get => m_MinValue;
// set => m_MinValue = value;
// }
// public UnityEvent onLeverActivate => m_OnWindowActivate;
// public UnityEvent onLeverDeactivate => m_OnWindowDeactivate;
// void Start()
// {
// m_MinValue = m_BaseLine.localPosition.y;
// //SetValue(m_Value, true);
// }
// protected override void OnEnable()
// {
// base.OnEnable();
// selectEntered.AddListener(StartGrab);
// selectExited.AddListener(EndGrab);
// }
// protected override void OnDisable()
// {
// selectEntered.RemoveListener(StartGrab);
// selectExited.RemoveListener(EndGrab);
// base.OnDisable();
// }
// void StartGrab(SelectEnterEventArgs args)
// {
// m_Interactor = args.interactorObject;
// }
// void EndGrab(SelectExitEventArgs args)
// {
// m_Interactor = null;
// }
// public override void ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase updatePhase)
// {
// base.ProcessInteractable(updatePhase);
// if (updatePhase == XRInteractionUpdateOrder.UpdatePhase.Dynamic)
// {
// if (isSelected)
// {
// UpdateValue();
// }
// }
// }
// }
//}