private void OnTriggerExit(Collider other) { CListableManager manager = other.GetComponent <CListableManager>(); if (manager) { bActiveListable = false; manager.RemoveNode(this); } }
private void OnTriggerEnter(Collider other) { CListableManager manager = other.GetComponent <CListableManager>(); if (manager) { rigidbody.isKinematic = true; bActiveListable = true; manager.AddNode(this); } }
private void Awake() { Layer = GetComponent <CLayer>(); listableManager = FindObjectOfType <CListableManager>(); grabbable = GetComponent <OVRGrabbable>(); rigidbody = GetComponent <Rigidbody>(); if (listableManager) { Speed = listableManager.Speed; } TargetLoc = transform.position; bActiveListable = false; }