Example #1
0
 private void GrabSwitch()
 {
     Collider[] hits = Physics.OverlapSphere(transform.position + sphere.center,
         sphere.radius);
     if(hits.Length != 0) {
         currentSwitch = hits[0].GetComponent<Switch>();
         lr.enabled = true;
     }
 }
Example #2
0
 private void ReleaseSwitch()
 {
     currentSwitch = null;
     lr.enabled = false;
 }