Пример #1
0
 private void Start()
 {
     myRigibody  = GetComponent <Rigidbody>();
     raycastInfo = GetComponent <RaycastInfo>();
     MoveToStartPos();
     myTransform = transform;
     m_MouseLook.Init(transform, m_Camera.transform);
 }
Пример #2
0
 public void SetIsVive(bool _value)
 {
     if (raycastInfo == null)
     {
         raycastInfo = GetComponent <RaycastInfo>();
     }
     raycastInfo.SetIsVive(_value);
 }
Пример #3
0
        public void MoveToStartPos()
        {
            SetCanMove(true);
            if (raycastInfo == null)
            {
                raycastInfo = GetComponent <RaycastInfo>();
            }
            raycastInfo.ZeroRadarUse();
            GasMask.SetActive(false);
            Extinguisher.SetActive(false);
            transform.localPosition    = startPos;
            transform.localEulerAngles = startAngl;
            if (!raycastInfo.GetIsVive())
            {
                m_Camera.transform.localPosition = new Vector3(0, 1.7f, 0);
            }
            else
            {
                m_Camera.transform.localPosition = Vector3.zero;
            }

            StopCoroutine("MoveTo");
        }
Пример #4
0
 void Start()
 {
     raycastInfo    = MyVRMovement.GetComponent <RaycastInfo>();
     laserTransform = Laser.transform;
     trackedObj     = GetComponent <SteamVR_TrackedObject>();
 }