예제 #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;
     }
 }
예제 #2
0
 private void ReleaseSwitch()
 {
     currentSwitch = null;
     lr.enabled = false;
 }