void Start()
    {
        manager = GameObject.FindGameObjectWithTag("PathManager").GetComponent <GuestPathManager>();
        path    = Instantiate(manager.getPath());

        destination = path.getNextDestination();

        speed *= Random.Range(0.5f, 1.5f);
    }
Beispiel #2
0
    public GuestPath getPath()
    {
        //returns a random path from paths
        int       randIndex = rng.Next(0, paths.Count);
        GuestPath chosen    = paths[randIndex];

        chosen.gameObject.SetActive(true);
        return(chosen);
    }
Beispiel #3
0
 public GuestPath(GuestPath other)       //copy constructor
 {
     foreach (GuestWaypoint wp in other.waypoints)
     {
         waypoints.Add(wp);
     }
     foreach (GuestWaypoint wp in other.wps)
     {
         wps.Enqueue(wp);
     }
 }