열차 목업의 내부 확인용 프로젝트
smchoi
2024-07-22 3fc9f79ca436203b0b5ba39b6a079ee086227c11
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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.XR.Interaction.Toolkit;
public class XRButton : XRBaseInteractable
{
 
    
 
    //[SerializeField]
    //float m_PressDistance = 1f;
 
    //[SerializeField]
    //float speed = 1f;
 
    //bool m_Pressed = false;
 
    //Vector3 m_PressedButtonOffset;
    //Vector3 m_ButtonOffset;
 
    //private void Start()
    //{
    //    m_PressedButtonOffset = m_Button.localPosition;
    //    m_PressedButtonOffset.z = -m_PressDistance;
    //    m_ButtonOffset = m_Button.localPosition;
    //}
 
    //protected override void OnHoverEntered(HoverEnterEventArgs args)
    //{
    //    base.OnHoverEntered(args);
        
    //    m_Pressed = true;
    //}
 
 
 
    //protected override void OnHoverExited(HoverExitEventArgs args)
    //{
    //    base.OnHoverExited(args);
    //    m_Pressed = false;
    //}
 
 
    //private void Update()
    //{
    //    if(m_Pressed)
    //    {
    //        UpdateValue(m_PressedButtonOffset);
    //    } else
    //    {
          
    //        UpdateValue(m_ButtonOffset);
    //    }
    //}
 
 
 
    //void UpdateValue(Vector3 value) {
    //    m_Button.localPosition = Vector3.Lerp(m_Button.localPosition, value, Time.deltaTime * speed);
    //}
  
 
 
 
 
    //void OnDrawGizmosSelected()
    //{
    //    var pressStartPoint = Vector3.zero;
 
    //    if (m_Button != null)
    //    {
    //        pressStartPoint = m_Button.localPosition;
    //    }
 
    //    pressStartPoint.y += m_ButtonOffset - (m_PressDistance * 0.5f);
 
    //    Gizmos.color = Color.green;
    //    Gizmos.matrix = transform.localToWorldMatrix;
    //    Gizmos.DrawWireCube(pressStartPoint, new Vector3(1, m_PressDistance, 1));
    //}
 
}