private void OnTriggerEnter(Collider other) { if (other.CompareTag("Buggy")) { // Next pusher starts running buggy = other.transform.parent.GetComponentInChildren <Buggy5>(); Debug.Log("Buggy entered transition zone to Hill " + NextHill); if (NextHill != 3) { buggy.InTransition = true; } else if (NextHill == 3 && buggy.CurrentPusher.hill != 3) { buggy.Transition(); } // UI indicate transition time } }
public void SetBuggy(Buggy5 _buggy) { buggy = _buggy; }
private void Start() { buggy = GetComponentInParent <Buggy5>(); }