示例#1
0
    private void OnTriggerEnter(Collider other)
    {
        NVRHead playerHead = other.GetComponent <NVRHead>();

        if (playerHead)
        {
            playerHealth.DecreaseHealth(penaltyAmount);
        }
    }
示例#2
0
        private void Awake()
        {
            Instance = this;
            NVRInteractables.Initialize();

            if (Head == null)
            {
                Head = GetComponentInChildren<NVRHead>();
            }

            if (LeftHand == null || RightHand == null)
            {
                Debug.LogError("[FATAL ERROR] Please set the left and right hand to a nvrhands.");
            }

            if (Hands == null || Hands.Length == 0)
            {
                Hands = new[] { LeftHand, RightHand };
            }

            _colliderToHandMapping = new Dictionary<Collider, NVRHand>();
        }
 public override string GetDeviceName(NVRHead head)
 {
     return("RoboHead");
 }
示例#4
0
 public override string GetDeviceName(NVRHead head)
 {
     return("ROS Simple Robot Head");
 }
示例#5
0
 public override string GetDeviceName(NVRHead head)
 {
     return("HTC Vive HMD");
 }
示例#6
0
 public abstract string GetDeviceName(NVRHead head);