Beispiel #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("PathSwitcher"))
     {
         nextSwitcher = other.GetComponent <AbstractSegmentSwitcher>();
     }
 }
Beispiel #2
0
 public void SetNextSwitcher(AbstractSegmentSwitcher switcher)
 {
     nextSwitcher = switcher;
 }
Beispiel #3
0
 void OnTriggerExit(Collider other)
 {
     nextSwitcher = null;
 }
Beispiel #4
0
    /* void Awake()
     * {
     *  if (IsMobilePlayer)
     *      return;
     *
     *  Destroy(switcher);
     *
     *  if (immediateSwitcher)
     *      Destroy(immediateSwitcher);
     * } */

#if UNITY_EDITOR
    void OnValidate()
    {
        switcher          = GetComponent <AbstractSegmentSwitcher>();
        immediateSwitcher = GetComponent <ImmediateSegmentSwitcher>();
    }