void OnTriggerEnter(Collider other) { if (other.CompareTag("PathSwitcher")) { nextSwitcher = other.GetComponent <AbstractSegmentSwitcher>(); } }
public void SetNextSwitcher(AbstractSegmentSwitcher switcher) { nextSwitcher = switcher; }
void OnTriggerExit(Collider other) { nextSwitcher = null; }
/* void Awake() * { * if (IsMobilePlayer) * return; * * Destroy(switcher); * * if (immediateSwitcher) * Destroy(immediateSwitcher); * } */ #if UNITY_EDITOR void OnValidate() { switcher = GetComponent <AbstractSegmentSwitcher>(); immediateSwitcher = GetComponent <ImmediateSegmentSwitcher>(); }