Esempio n. 1
0
 void OnTriggerExit(Collider col)
 {
     if (col.gameObject.CompareTag("Spaceship"))
     {
         nearSpaceship = false;
         spaceship     = null;
     }
 }
Esempio n. 2
0
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.CompareTag("Spaceship"))
     {
         nearSpaceship = true;
         spaceship     = col.gameObject.GetComponent <SpaceshipFixing>();
     }
 }