Patrons now spawn in and are randomly assigned demon status.

This commit is contained in:
shakurass 2014-04-27 19:49:21 -06:00
commit 5d203d1e9d
12 changed files with 111 additions and 1189 deletions

View file

@ -3,12 +3,23 @@ using System.Collections;
public class WalkAI : MonoBehaviour {
public GameObject[] destinations;
private GameObject[] destinations;
public int currentDestIndex = 0;
private NavMeshAgent nva;
void Awake() {
GameObject[] allPois = GameObject.FindGameObjectsWithTag("pois");
GameObject poi1 = allPois[Random.Range (0, allPois.Length)];
GameObject poi2 = allPois[Random.Range (0, allPois.Length)];
destinations = new GameObject[2] {
poi1,
poi2
};
nva = GetComponent<NavMeshAgent>();
nva.updateRotation = false;
nva.SetDestination(destinations[currentDestIndex].transform.position);