1 using UnityEngine;
2 using
System.Collections;
3 using
UnityStandardAssets.Utility;
4
5 public
class Chase : MonoBehaviour {
6
7
8     WaypointProgressTracker pTracker;
9
10     
void Start()
11     {
12         pTracker = transform.parent.parent.GetComponent<WaypointProgressTracker> ();
13     }
14
15     
void OnTriggerEnter(Collider playerPlane)
16     {
17         Debug.Log (
"trigger");
18
19         
if (playerPlane.tag == "PlayerCollider")
20         {
21             
22             pTracker.circuit = GameObject.FindWithTag (
"ChaseCircuit").GetComponent<WaypointCircuit>();
23         }
24     }
25
26 }