void OnTriggerExit(Collider other) { if (other.gameObject.tag == "Stops") { if (gunnerScript != null) { gunnerScript.isCurrentlyHere = false; gunnerScript = null; } } }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Stops") { gunnerScript = other.gameObject.GetComponent <AddGunnerSpawn> (); if (gunnerScript != null) { gunnerScript.isCurrentlyHere = true; } } }