Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     firstFireflies = GameObject.Find("Fireflies").GetComponent <Fireflies>();
     attractBall    = GameObject.Find("AttractBall")?.GetComponent <FirefliesInteraction>();
 }