示例#1
0
 // Use this for initialization
 void Awake()
 {
     playerTransform          = GameObject.FindGameObjectWithTag("Player").transform;
     waypointControllerScript = GameObject.FindGameObjectWithTag("WaypointController").GetComponent <WaypointController>();
     closestWaypoint          = waypointControllerScript.FindClosestWaypoint(transform);
     if (decoy == false)
     {
         targetTransform = playerTransform;
     }
 }
示例#2
0
 public float minSpeed, maxSpeed;    //minSpeed - higher number but low speed(eg. 3), maxSpeed - lower number max speed (eg.1)
 // Use this for initialization
 void Start()
 {
     playerTransform          = GameObject.FindGameObjectWithTag("Player").transform;
     waypointControllerScript = GameObject.FindGameObjectWithTag("WaypointController").GetComponent <WaypointController>();
     closestWaypoint          = waypointControllerScript.FindClosestWaypoint(transform);
 }