예제 #1
0
 private void Start()
 {
     // Attampt to bind onto the distance active callback
     foreach (Rigidbody rb in velocityPoints)
     {
         DistanceFrom df = rb.GetComponent <DistanceFrom>();
         if (df != null)
         {
             df.ActiveDistance += DistanceActive;
         }
     }
 }
예제 #2
0
 void DistanceActive(bool active, DistanceFrom distFrom)
 {
     activeCount += active ? 1 : -1;
 }