Beispiel #1
0
 private void OnTriggerStay(Collider other)
 {
     if (!deactivateFirefly)
     {
         // Follow fire flies attract object (AttractBall or controller)
         FirefliesInteraction fireFliesAttract = other.gameObject.GetComponent <FirefliesInteraction>();
         if (fireFliesAttract && fireFliesAttract.shouldFollow)
         {
             StartMovement(other.gameObject.transform.position);
         }
     }
 }
Beispiel #2
0
 private void Awake()
 {
     firstFireflies = GameObject.Find("Fireflies").GetComponent <Fireflies>();
     attractBall    = GameObject.Find("AttractBall")?.GetComponent <FirefliesInteraction>();
 }