열차 목업의 내부 확인용 프로젝트
smchoi
2024-07-24 ec231f4110c782d44ea2820a1eaaa7a5711c6f16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//using UnityEngine.Events;
//using UnityEngine.XR.Interaction.Toolkit;
 
//namespace UnityEngine.XR.Content.Interaction
//{
//    /// <summary>
//    /// An interactable lever that snaps into an on or off position by a direct interactor
//    /// </summary>
//    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;
//        /// <summary>
//        /// The object that is visually grabbed and manipulated
//        /// </summary>
//        public Transform handle
//        {
//            get => m_Handle;
//            set => m_Handle = value;
//        }
 
//        /// <summary>
//        /// The value of the lever
//        /// </summary>
//        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();
 
 
//                }
//            }
//        }
 
      
//    }
//}