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